GNL.tv
GNL.tv is an open source racecast system for Papyrus Nascar Racing 2003. It allows thousands of people to watch a NR2003 race live on the internet. This is the first step to providing the online racing community a true live experience watching other racers competing in their leagues.

A small server application connects to a NR2003 installation on the same computer and collects standings data and all car positions during the race. A PHP based webpage connects to the server application and displays the results. There is also a java applet that displays the car positions on a track map.
Originally developed for the german Virtual Racing e.V. league, GNL.tv has now been released as open source software. The goal behind this step is to provide a solid framework for building a sophisticated TV application with the help of the racing community that addresses all requirements for a unique watching experience.

GNL.tv features:
- Very streamlined server with no impact on the performance of the hosting system
- Server may monitor a dedicated NR2003 server or run on a NR2003 client connecting to a dedicated server
- Communication with GNL.tv server is done via standardized XmlRpc interface
- Car Position updates are distributed using a custom streaming protocol
- Compressed communication leads to very low network bandwidth requirements
- Services up to thousands of viewers by caching the standing results and using proxy servers to distribute the load
- Easy to setup
- Works with all addon tracks
Visit the demo installation to get a glimpse of how GNL.tv works.
Running GNL.tv with PHP5
Please take a look at my blog entry to read how to enable PHP5 support in GNL.tv.
Downloads
For installation instructions, please consult the included readme-files. All files are released under the GPL license.
GNL.tv Version 1.4 (latest version)
GNL.tv Version 1.4 Source (source code for latest version)
GNL.tv uses the SVG file format to render track overviews. You can create these SVG files automatically based on the NR2003 track files with the utility PtfConverter. You only need this utility if you plan to convert new tracks yourself.
PtfConverter Version 1.0 (latest version)
PtfConverter Version 1.0 Source (source code for latest version)






Sometimes not all drivers are displayed in this standings but if you open the track overview you can see them. But great tool.
Thanks for the comment.
The standings screen does only display drivers which completed at least one timed lap. On the track overview you also do not see all drivers, but only those currently on the track.
I am currently setting up an offline league for NR2003 and i was wondering if this program supports IP address run events? I need this for my league. since seirra shut down and i can no longer run dedicated severs. I need a program like this so the owners of the ai cars on my league can watch the races.
Yes, of course. IP hosting is fully supported. You can connect to the NR2003 server via IP address or a full qualified domain name.
Right on thats awsome, i am also trying to figure out if there is a way to broad cast via ip addy and a video game like NR2003, you wouldnt have any idea on where i might find a program like that or if one even exists. I know there is fraps and you can record but i want a live feed.
I know some people who provide broadcast services. For example:
http://www.simracingnetwork.com
http://www.multibc.de
I guess building your own live broadcast setup is quite challenging, so a cooperation with one of the commercial providers might be a better idea.
is there a one for rfactor.. or can i make this work for rfactor.. or can you make it work for rfactor ??? please email me and let me know thanks
GNL.tv will not work for rFactor as both applications use completely different technologies. You could probably reuse the web parts of GNL.tv but you will need to completely rewrite the server part that connects to rFactor.
I know there exists a similar broadcast software for LFS, but I have no idea about rFactor.
i can input files to the data folder .. not sure how this works..
can you or tell me how to edit the marqueestats.php to read this http://autoclearingmotorsports.com/35mdobrowney/livedata/php/live/2007_11_29_19_24_41_Bercy_S1_live.txt this is the files that rfactor makes.. could you make the marqueestats.php work with this .. also need to change where is gets its info from.. thanks
No, I’m sorry. I looked into that topic about one or two years ago and the rFactor export files have proven to be too unreliable. It takes a lot of extra work to get consistent timing data out of these files.
Peter,
I E-mailed you a few weeks ago in reguards to the telemetry
files in Nr2003. How do I compile these files (papytelem etc..)
so I can extract the game data pitch roll and yaw and import
it to spreadsheet. Im building a motion simulator.
thanks
To compile the source files, you need Microsofts Visual Studio. I think I used version 6, but it should compile in the current version. But I did not test that.
Hi peter I need some help.
I tried to compile it as a windows console application,
but it wont build. Can you give me some instructions on how to compile this
thanks
steve>
What errors do you get?
Trying to get exe from (Tsample.ccp papytelemapp.h papytelemapp.obj)
First off peter,
I have never used a compiler, I downloaded microsoft visual c++ 2008.
I openen and started new project (win32 console app.)
In the next window (“console App” is checked and I unchecked “precompiled header”
when I get to the main program, I went under “project”—->
and “add existing item” and browsed for “tsample.ccp” in the folder that contains
“tsample.ccp” I also have “papytelem.app” and “papytelem.obj” I clicked build and
14 errors. Im sure im not doing something right.
Thanks for you patience, Im a Tree Doctor not a coder.
hey Peter,
If you can compile this program and write me a program that converts this
data to commands that my motion control card can read, I would gladly pay
you for your services. Im using a galil control card dmc 2200
http://www.galilmc.com I have spent years gathering these parts from e-bay
I can wait If you dont have the time right now. This is a DIY project.
Sorry, I have no longer a development environment running in Windows, as I have switched to a Mac. I even don’t have NR2003.
When you need to compile GNLtv you should use the included Makefile. It is too long ago that I have worked on GNLtv, so I can not tell you how to configure Visual C++, I simple don’t remember it anymore.
Thanks for your replys Peter,
I must get this figured out
Hiya Peter, got a question if you have a min or two. I’m trying to get it up and working. Thus far I have succeeded in getting the marquee and race stats, but not as much luck with the java. From reading the instructions, I’m kinda confused by all of it.
On the system that I have the server running, I put in the command gnltvproxy -p 9000 IP:8001
Not quite sure what the “-p” is for or what I’m supposed to put there. I also, on the router, opened the firewall in udp for ports 9000 as well as 8001.
I did see that you mentioned that I needed to run the gnltvproxy from the webserver itself. Not quite sure what you mean by that? Any help would be appreciated.
Hi again. I guess my biggest problem is setting up the router firewall to allow for it. ON the server itself, once it’s running reads “Listening for incoming connection on 192.168.X.XXX:9000
Or am I really off base here?
Hi again Peter. Sorry to bother ya. I had an error with the marquee tonight.. script error.
Everything was working fine and then after about 7 or 8 signed on, the marquee produced an error. Looking at the details, this is what it read:
Line: 30
Char. 988
Error: Expected ‘;’
Code: 0
URL: http://www.ffrl.org/marqueestats.php
I tried looking it up using Crimson Editor and couldn’t see where it was referring to.
Hey Peter,
I have installed GNL.tv correctly, the best that I can tell. For some reason, it always says that the GNL.tv Server Application is not running…even when it is. Drop me an email and I will send you the config file just so you can verify I have it set correctly.
I am running PHP 4, so the PHP 5 issue isn’t an issue.
Thanks for any help you can provide.
Hey Peter,
Got it all going…but one thing.
The Track Overview works fine, except doesn’t show the cars on the track, or the ticker that it shows in your example. I can’t figure it out. Any assistance would be greatly appreciated. THANKS!
@David: The gnltvproxy is supposed to be run on your webserver and not on the gameserver, where you run NR2003. The reason for this is that unsigned Java applets may only communicate with the webserver they have been loaded from. Therefore you need to run the proxy on the webserver so that it may relay the communication from the Java applets to gnltv running on your gameserver.
@John: Did you run the gnltvproxy on your webserver? The applets will only work with the proxy running.
Hey Peter. I tried running gnltvproxy.exe from the web and I get an error stating that it couldn’t find the “hawk.dll” and to reinstall the application. I do have the hawk.dll in the main directory along with the gnltvproxy. I’m not sure how to run it from the web, but I would think you just type it in the address bar.
Sorry, that was “HawkNL.dll” that it couldn’t find. In the config, I have the addy set as the IP. Having it set to localhost, doesn’t allow anything to work.
Sorry, I have no idea what is not working in your setup.
Then could you explain exactly how you run it on your webserver?
Or better yet, could you please tell me where the “hawkNL.dll” file is supposed to be at?
I am running a Linux webserver. On Linux you do not need the hawkNL.dll. On Windows the hawkNL.dll is supposed to be in the same directory where gnltv.exe and gnltvproxy.exe is. If that does not work, try copying the dll to your Windows system32 directory.
The server that hosts my webspace is also Linux. It did help putting the .dll file in the system 32 folder, but still not working.. the java applet that is.
I can get the picture of the track up, but it reads invalid.
Trying to run the proxy with the web browser isn’t working. I was trying like the instructions read; http://www.mydomain.com/gnltvproxy -p 9000 192.168.1.X:8100
With the spaces, the browser won’t even work.
I tried to run it in a command line and though it does initialize, it reads “Listening for incoming conenctions on port 9000″. I have read that YOU HAVE to run it in the webserver. How do you do this?
To start the proxy on your webserver, you login to the server via SSH oder Telnet and start it from the shell. You can not start the program via your browser. If you have no SSH-Access, you will not be able to use the Track Overview.
Hey Peter -
Thought you might be able to answer this question.
On my website, I have the marqueestats.php file on a dark background with white font. Whenever it refreshes, it “blinks” white. Do you know a way I can keep it the background color? Not a big deal, but distracting.
I guess you could set a background-color for your iframe-tag. That might help.
I already tried that, but I found a solution.
(For anyone who may have the same issue)
add
allowtransparency=”true”
to your iframe tag
I also changed the Body background-color: transparent;
to the marqueestyle.css file.
any help on gettin gnltv to work its installed on my site an i edited the line with my ip but when i start it on my desk top an go in game does not show up on my site any help would be greatfull thank you
Bryan
Hey, the link in ptfconverter readme of DatX is broken. If you have it somewhere or you could find it, could you link it here and/or update to zip that link?
Hm, seems like I lost DatX the last time I reinstalled my computer. Google says you can find the tool here: http://www.racelinecentral.com/NR2003_tools.html
I am the administrator of a new NR2005 league. We are wanting to add the GNLtv technology to our site for our other drivers and fans to see. We have a dedicated server, 321servers.com that we pay for. How do I go about getting the GNLtv program up on that server and started? Obviously I know I how to place the files onto the server, but my question is, how to access it once there? I use an FTP client to upload my files to the server. But once I do that, I just go into a web application and hit restart server to get the server back up. Then I just log into the multiplayer to set everything up. What about the GNLtv?
You need full remote access to your server. When you have only access via an webbased admin interface, you will not be able to use GNLtv.
Hey peter, im currently running an offline nr2003 league
how would i go about broadcasting the offline races live?
does this work doing that?
if so how?
I am not sure how a offline league works. I guess everybody is running an offline race and then you gather the results, right? To broadcast each race, every user would need to run the gnltv.exe on his computer and also open at least 2 ports in their router or firewall. On the web server you would need to start one proxy per racer and also host one results-website for each racer.
But the real problem is with dynamic IP-addresses. The racers would have a different IP every time they log on to the net. The proxy end web server components of GNL.tv need know these addresses, so with the current implementation you would need to reconfigure the address every time someone gets a new address.
So the bottom side is: Theoretically possible, but practically too much hassle.
Hi
I have a little probleme. I’m a french guy from Montreal and i’m not perfect with my english. So,i don’t understand all the explications hehe
first,i don’t know how execute a .exe file on my web site server. i got full acces whit filezilla and whit my control panel of my webserver.
I searched a long time and i don’t know if i can execute a file and if yes,i don’t know how !
And my last question : What is the “zlib support compiled into PHP” ?
THX for your help Peter
Well, FTP and control panel access is not full access
. You need to be able to log in to your webserver via SSH or TELNET. So you will not be able to run the proxy on your webserver.
To check if your PHP installation has zlib-Suppert, create a PHP file with the command these contents:
< ?php phpinfo(); ?>
If you then call that file, you will see a list of all installed modules, which should contain zlib.
Ok,thats the only thing i found on my information webserver
“compress.zlib
–with-zlib’ ‘–with-zlib-dir=/usr’”
Is this good?
Hm, that’s not the output from phpinfo, but I guess it’s ok.
Hi Peter.
Have a question on running multiple servers. I checked into your readme.html, and though there is information in there about it, it’s not working. At least for me it’s not. I have three different servers running.
1st, do you have to have 3 separate marquee’s and therefore have three different folder on the webserver for it?
2nd, Adding the command to each server, -ko”0:Telemetry:id:1″, with different ID”s for each, the gnltv isn’t recognizing the streams. As of right now, the command I have for each server is similar to this, C\….\server.exe” -ko”0:communications:net_server_port:32766″ When attempting to add your command for each server, I have an error on improper command. Adding after 32766″ -ko:”0:Telemetry:id:1″ will work, but not sure if that’s correct.
And 3rd, when attempting to run multiple versions of the gnltv, this is where I’m having the biggest issues. I made three different folders for the softare. For the command line of the gnltv, I edited it like the readme.html instructs, GNLtv.exe -p 8001 -i 1, but the command doesn’t work. I tried doing it like so.. GNLtv.exe” -ko”-p 8001 -i 1″ and a no go there as well. Could you further instruct me on this?
Thank you very much!
1) Either you need to have 3 separate IPs or you need to modify the PHP web files to support something like a new parameter which specifies which instance of GNL.tv you want to display. It would recommend separate installations, as this is easier to setup.
2) I don’t know how you need to write multiple command line arguments to the server.exe. You definitely need to specify the Telemetry:id-Parameter.
3) You don’t need multiple folders for the gnltv.exe. Just start it multiple times like this:
gnltv.exe -p 8001 -s 8002 -i 1
gnltv.exe -p 8003 -s 8004 -i 2
Just make sure to specify different ports for -p and -s.
hi,
i have my own NR2003 league. we race online with my ip address. we are going to attempt to set this up and use it. The thing is…we read the files and stuff…but how do you set it up…its kinda confusing. also i have a php site…
http://pepsicupracing.myfanforum.org/
i was wondering if it would work with that site…and if it does what do i do to set it up? thanks
Colton
It will most likely not work on your webserver. You need a dedicated server with full Shell access to run the gnltvproxy application.
Hi Peter,
Thanks for the great free script! Once we get it going, I’m confident it will be invaluable to our drivers and fans at vidaneracing.com. Thanks for using CSS to stylize the pages; that will make editing much easier for us.
Having a bit of trouble with the installation on the web server, though, and thought you’d might be familiar with what’s going on here. Upon uploading the files and editing the variables in the config file, I’m getting this error upon visiting racestats.php:
Fatal error: Cannot re-assign $this in /home/vidanec/public_html/leaderboard/xmlrpc.php on line 432
Any ideas? If you need to view my phpinfo, I have one up at http://vidane.com/phpinfo.php
Thanks again, Peter! Looking forward to using GNL.tv.
Steve Luvender
Vidane.com
Peter,
You can disregard my last comment. Forgot to do the changes for PHP5 that you mentioned in your blog post.
Thanks again!
Steve
Can somone tell me were or how to put this in do you rename the file or what I cannot figure this out to change the port # Thanks…
gnltv.exe -p 8001 -s 8002
The port numbers are changed with the -p and -s parameters.
http://www.gbmotorsports.net
How can I keep the marquee from refreshing the whole site? Is there a way to keep the refreshing of the stats in the background instead of having the whole page refresh? http://www.fsracing.net has their ticker going and it doesn’t refresh their page.
If you place the marquee into an iframe only that iframe will be refreshed.
Great program Peter! I love it, I have the live leaderboard on my site and it works great when I run my races on my server. One nice peice of work.
Hello (again)
At first thanks for GNLtv, it’s a wonderfull tool to make NR2003 races more real !!!
Well, I am working on translating gnltv into french
Yet I have a problem with the column started that display “ ” but no value
Does anyone already saw this kind of problem
Thanks
There seems to be a missing “;”. It should look like “
“.Soory, it is, forgotten to past it…
So, what problem do you have exactly with the nbsp?
Hello
The problem is that started places are not displayed on the page racestats.php when a race is on…
Hiya Peter.
Wondering if you have a sec to explain how to have the tracks and session shown on the marquee? I’ve seen some sites where the marquee will read the what track is loaded along with how many laps they are into it.
I’ve been looking into the gnltv.inc.php and the marqueestats.php to see what lines are needed to be added. Nothing I’m trying is working.
Is this something you can help me on?
Thanks in advance.
Duck
You need to add the following line to marquestats before the line
for ($i = 0; $i < $size; $i++) {:Take a lookat all the methods in gnltv.inc.php. There is a method for each kind of information you get from the server.
Wow! Now that’s a quick response and thanks! That did it. =) Another question.. LOL in regards to the same thing. Without the track actually being loaded, is there a way to show what track is selected? Thinking for those who see the site, they know what the server is prepared for.
To make it easier to understand, I’m trying to get the results that this site has.. http://69.13.121.1:2008/ARCAHotlaps/Marquee.htm
It can only display the currently loaded track. It is not possible to detect which track is selected ingame when the event has not been started.
Will this work for offline races?
Yes.
Is there anyone who has this installed and does it still work?
Also if you know how to install it can you install it for our league?
If you can please email me at ihpracing@hotmail.com
GNLtv is still used by various leagues. The installation instructions are included in a readme file. There are also a lot of installation hints in the comments on this web page.
hey i would like some help meand other admins at my league could not figure how we can get this GNL TV to work…We race race by IP
email me bcracing02@hotmail.com with some directions or even some tip how to get this to work thank you
Peter,
Thank you for a fantastic program in GNL.tv. We use the leaderboard at our racing league in conjunction with live online broadcasts; it’s very popular!
Have you created or released any other NR2003 programs or tools?
Regards,
Steve Luvender
VidaneRacing.com
Hi Steve,
no, GNL.tv is my only NR2003 related program.
is there a switch or something that I can use to make gnltv work with the nr2005 mod? currently it only works with 2003
No, it only works with NR2003.
Hi Peter!
Congratulations by the GNLtv. It’s really a fantastic tool for NR2003.
I need your help to solve the issue below.
How Mathias sad in this comment page, the option Started in racestats.php isn’t working.
I see on gnltv.inc.php in line 237, this function responsible to get the Qualy position…
function getQualiPosition($standings) {
if ($standings["started"] != -1) {
return “$standings[started]“;
} else {
return “ ”;
}
}
So, For me the code it’s ok, but I try a lot of changes in the code
and I can’t solve this.
In top of this page, I see that the picture of GNLtv doesn’t have this collumm “Started”.
Can you help me?
Best Regards!
Fabricio Silveira
msn:fabricio.fapa@bol.com.br
ohhhhh, I made a mistake…
There is the collum Started in the picture on the top of this page, but for me it is another order, in 3rd collum
But, I wait by your comment about my issue.
Thanks again
Fabricio Silveira
Sorry, I have no idea why the “started” column does not display anything.
Just to I understand…
This informations returns of the standings file maked by the tag ok????
Ths point is, all the marks are recorded in the file standings.txt with the number -1 and the fuction that I sad before, don’t understand this markup..
I’m right?
Thanks!
Fabricio Silveira
Not sure I understand your problem. If the standings.txt file contains -1, then it did not receive that value from the server. In that case nothing will be displayed in the standings.
The folks over at RaceServers.net have been able to get it to work with 2005, I’ve looked at the code and I believe there is some code missing used to compile the gnltv.exe, when I got to recompile it tells me missing papytelemapp.h Is there anything you can add to this?
Where does the application check to see that nr2003 is running? I should be able to tell this to go look at nr2005 instead of 2003 correct?
If they made it work with 2005 you could ask them. The code is released under the GPL license, so if they made modifications to the code they need to publish it to conform to the license.
The papytelemapp.h file is part of the nr2003 installation. I am not allowed to redestribute it with GNL.tv.
GNL.tv uses the papytelemapp library to check for a running nr2003. There is no easy way to change that to nr2005.
Ok thanks, do you know what libraries I should be using to get the linker to resolve the symbols?
You can find the required libs in the Makefile:
What version of visual studio did you compile with? I have resolved most all of the errors, still getting 40 unresolved external symbols, but I think that is because I am using 1998 Visual C++, maybe the 2 libraries included from that version are out of date…
I believe I wrote it with the 2000 or 2002 version. I guess your best option would be to download Visual Studio 2008 Express Edition. That should work.
well I’ve not been able to get it done, if anyone wants to compile it for me, all I need it to do is look for nr2005 instead of nr2003, should just be a simple number change
while (true) {
if (AppBegin(“NR2003″, serverstatus->getTelemetryID())) {
I just can’t figure out what’s missing from me being able to compile this, keep getting unresolved symbols and I’m using visual studio 2008.
If anyone gets this done please let me know pioneer162@gmail.com
Best regards,
Ron
Well I finally got it all working locally, however when I try to have others view the applet from the outside they get ‘invalid’
Not sure what is missing, but obviously there is no data connection happening.
running gnltv.exe standard ports
running gnltvproxy.exe -p 8080 76.189.149.199:8001
The ticker is working (http://76.189.149.199/gnltv)
And if I try to open the track overview(applet) it shows the track, but the session is ‘invalid’ and the counter is a huge number
If I open the track overview from inside my router, it displays fine, any outside address gets the invalid stuff. I have the router set as full dmz to the web server and the config.php looks like this…
// these variables define the GNL.tv server location
$tvserver = “76.189.147.199″;
$tvport = 8000;
// port number of the gnltvproxy progam (optional)
$streamingserver = “76.189.147.199″;
$streamingport = 8080;
Any ideas what’s broken?
Probably an issue with IIS, I hosted with apache and don’t get any data locally, but when I host with iis, I get data locally, you said you host with linux, so you probably can’t help me at all….. I’ll toy around with it some more.
Regards,
Ron
fixed itself…. no idea what I did… cheers
ok i cant figure out how to get this to work plz help maybe a tutorial would help
Please take a look at the documentation included with GNL.tv. I will try to answer any specific questions.
im just confused on setting up the config file and the server
is port forwarding required?
im srry but computers are still hard for me to understand and that read me file is confusing to me it doesnt explain anything step by step instructions on how to get it running would be so much easier
If your race server is running behind a firewall, you need to have port forwarding enabled. This is the communication process:
spectator (browser with Java applet) -> webserver with gnltvproxy -> gnltv on race server -> NR2003
Network communication between these components must be possible.
For full functionality you need to have access to your own webserver. Shared webhosting will NOT work!
ok i port forward and put my ip in the config ini file and now still confused
ok i got it to work but the marqee is where im stuck at and the racestats.php comes up as a weird code and its not on the pretty blue screen
Maybe your webserver is not able to run php applications.
I’ve adapted GNLtv to work together with GTR2/Race07/GTL and rFactor. Not everything is completed (and tested) yet, but it looks pretty good already. Just leave a comment here and you’ll be noticed when it becomes available.
Thanks Peter for sharing your code!
Hello Peter,First off let me say Ty for making this great program.
It seems I have an issue that I cant seem to figure out and need your help please.I have a web server with full access, right at home running win2003 with php5.I have the nascar server on same computer,now the problem is I cant connect to gnltvproxy via outside web,I get the server application is not running error on racestats page.here is the weird thing I could connect via a local addy even tho the firewall is off,port forwarding done correctly on router and computer.When I do get thru to gnltvproxy I have to use port 9000 in web browser ex:192.168.1.5:9000,then I get a web page that doesn’t display correct. If I use the web server port it always comes up server application is not running Here is the text log gnltvproxy created any help would be greatly appreciated
hmm seems some of those web links aren’t displaying correctly.
http://74.100.20.24:5190/screenshots/gnltvpic.bmp
http://74.100.20.24:5190/screenshots/gnltvpic2.bmp
http://74.100.20.24:5190/screenshots/proxy-log.txt
Hi Shon, you don’t need the proxy if the webserver is running on the same computer as your nascar server. So maybe you should try it without the proxy.
Ty very much Peter,that solved my problem.
http://74.100.20.24:5190/gnltv/web/racestats.php
Again thanks for the great program.
Hey guys just curious if you could use GNL TV as a ticker overlay just like major Nascar Stations do on the top of the screen. I know Sim Racing Network used to do it, and RLMTV does as well.
I am trying to produce a youtube video of each race and I would love to have the standings scroll across the top of the video.
Any hints/suggestions?
Thanks,
CC
dude there needs to be an easier way to do this
Hey I am trying to install this and when I click GNLtv to install the program it opens up and when it gets to Waiting for NASCAR Racing 2003 to become active nothing happens.
GNLtv does not have an installation program. You need to configure it via command line parameters as described in the readme-file.
Also what do you put for the tvserver? My IP?
I’m looking for a way to make this run on an offline race for personal use. I have a dual monitor setup and would like to race on one monitor and have this run on the other. Is the entire web application necessary or is there an easier way to just have this yank the standings info without uploading anywhere?
GNLtv does work offline. But there is currently no way around a webserver. If you want to have running on your gaming machine, I would recommend using XAMPP as the webserver: http://www.apachefriends.org