Streaming Live Video with NSVenc
Last Updated: 04-03-2003
NSV is a new video format. It is designed to be easily streamed, support any audio and video codec, and be usable on nearly any platform. Currently NSV utilizes MP3 for audio and VP3 for video. Support for more codecs will be added soon. This tutorial shows how to stream a NSV based SHOUTcast stream from a live source.
1. Downloads
Download and install the latest version of NSV Tools.
Download and install the SHOUTcast server 1.9.2 or above.
Winamp3 or Winamp 2.90 are required for playback.
2. Headers Set-up
Create a new text file called headers.txt and save it in the NSVenc folder (C:\Program Files\NSVenc\ by default). In the file include:
The first line (changeme) is the password to connect to the server. If it was changed in the server configuration make sure headers.txt reflects that change. Leave lines two and three alone. The forth line down is all information about the stream. The same that would be entered in the SHOUTcast DSP. The "icy-pub" header signifies if it is a public stream, listed on SHOUTcast.com (1 for public, 0 for not public). The next header "icy-br" signifies the stream's bit-rate, guess. The rest should be self explanatory.
Save the file to the NSVenc folder (C:\Program Files\NSVenc\headers.txt by default) if it hasn't been saved already.
3. Device and Server Start
3.1 Getting there
Plug-in the video capture device you wish to use. (Web cam, video cam, video capture card, etc...). Audio, if used, can be set up using Windows Recording Control.
Start up the server, make sure it is waiting for a connection.
3.2 Command Prompt
Start your command line interpreter (the MS-DOS like thingy). In Widows XP/2K/NT go to Start > Run > type "cmd" > OK. In Windows 9X/ME go to Start > Run > type "command" > OK. Switch to the NSVenc folder (assuming default location here).
{Figure 3.2.1 place holder}
Figure 3.2.1: Command Prompt
4 Configuring
4.1 Encoder Setup
Next the encoder must be configured. At the command prompt type "nsvenc /config" (no quotes). This brings up the "NSVenc configuration," shown in Figure 4.1.1. For now leave this box alone.
Figure 4.1.1: NSVenc Configuration
Hit the "NSV Encoder Options" button to bring up the "NSV Encoder Options" box, shown in Figure 4.1.2. Select the audio and video you want. If audio is included use "MP3 (Lame) encoder" and pick the desired encoding options (not discussed). For video choose "VP3 3.1 (proper)." Select a bit-rate to aim for (it won't be constant and may not even be near it). Hit "OK" then "OK" again to exit.
Figure 4.1.2: NSV Encoder Options
4.2 Encoder Startup
Once everything is configured and plugged in it is time to start the encoder. Use the following line (or a variation based on your needs.)
- cap:0,N says to capture from the first video capture source and capture no audio. Use cap:0,0 for first device video and audio. Use cap: to list all available capture devices, and use the number of the device in subsequent runs to automate. Use audio device 'I' for MiniDV source audio (interleaved)
- sc: says to send the data to a SHOUTcast server
- 127.0.0.1 is the IP address of the server. The IP of 127.0.0.1 is for the server being on the same system as NSVenc.
- 8001 is the port to send the data to. Note this is PortBase+1. The PortBase set in the SHOUTcast server configuration (8000 by default, so 8001 to send to. Using the SHOUTcast DSP it would add the one for you).
- headers.txt specifies what text file headers are in. This should be the earlier created document in the same folder.
Up next should be the "Capture Configuration" box (also know as "Poopie Properties"), shown in Figure 4.2.1.
Figure 4.2.1: Capture Configuration
Select a capture frame rate and resolution. Start kind of low. The encoding takes a lot of CPU power.
4.3 Connection
The encoder should start encoding the video and sending it to the server. If it connects the encoding output will look something like what follows:
Also the SHOUTcast server should show a connection. The normal connection information should appear in the log. An example is an output like:
If there are any errors, re-read the above steps and try again. If there are no errors the stream can now be viewed.
Playback
Streaming NSV files can be played in Winamp3 Winamp 2.90+, nsvplay (included with NSV Tools, not discussed), NSVPlayX (ActiveX for Internet Explorer, not discussed) and NSVPlayMoz (Mozilla/Netscape plug-in, not discussed).
The URL for the stream is different then the standard MP3 stream URL. Without any modification Winamp will not be able to determine that it is a NSV file it is receiving and not a MP3 stream. The stream URL for a NSV stream is as follows:
http://your_ip:8000/;file.nsv
Where "your_ip" is the IP of the system running the SHOUTcast server. The port is 8000 by default (not 8001) or something else if you changed it in the SHOUTcast configuration (PortBase). There is no typo, use ";file.nsv" and not "listen.pls" after the address and port.
Open that URL in Winamp (Ctrl-L). If everything is working it will connect, buffer, and then the video window will pop up and play.
That's it for now.
Last Updated: 04-03-2003
NSV is a new video format. It is designed to be easily streamed, support any audio and video codec, and be usable on nearly any platform. Currently NSV utilizes MP3 for audio and VP3 for video. Support for more codecs will be added soon. This tutorial shows how to stream a NSV based SHOUTcast stream from a live source.
1. Downloads
Download and install the latest version of NSV Tools.
Download and install the SHOUTcast server 1.9.2 or above.
Winamp3 or Winamp 2.90 are required for playback.
2. Headers Set-up
Create a new text file called headers.txt and save it in the NSVenc folder (C:\Program Files\NSVenc\ by default). In the file include:
code:
changeme
content-type:video/nsv
icy-metadata:0
icy-name:My NSV Stream
icy-genre:Video
icy-pub:0
icy-br:128
icy-url:http://www.com
icy-irc:#chan
icy-icq:1234567
icy-aim:SomeUser
icy-reset:1
The first line (changeme) is the password to connect to the server. If it was changed in the server configuration make sure headers.txt reflects that change. Leave lines two and three alone. The forth line down is all information about the stream. The same that would be entered in the SHOUTcast DSP. The "icy-pub" header signifies if it is a public stream, listed on SHOUTcast.com (1 for public, 0 for not public). The next header "icy-br" signifies the stream's bit-rate, guess. The rest should be self explanatory.
Save the file to the NSVenc folder (C:\Program Files\NSVenc\headers.txt by default) if it hasn't been saved already.
3. Device and Server Start
3.1 Getting there
Plug-in the video capture device you wish to use. (Web cam, video cam, video capture card, etc...). Audio, if used, can be set up using Windows Recording Control.
Start up the server, make sure it is waiting for a connection.
3.2 Command Prompt
Start your command line interpreter (the MS-DOS like thingy). In Widows XP/2K/NT go to Start > Run > type "cmd" > OK. In Windows 9X/ME go to Start > Run > type "command" > OK. Switch to the NSVenc folder (assuming default location here).
After that the command prompt should be in the NSVenc folder (C:\Program Files\NSvenc), shown in Figure 3.2.1.code:
cd \
cd "Program Files"
cd NSVenc
{Figure 3.2.1 place holder}
Figure 3.2.1: Command Prompt
4 Configuring
4.1 Encoder Setup
Next the encoder must be configured. At the command prompt type "nsvenc /config" (no quotes). This brings up the "NSVenc configuration," shown in Figure 4.1.1. For now leave this box alone.

Figure 4.1.1: NSVenc Configuration
Hit the "NSV Encoder Options" button to bring up the "NSV Encoder Options" box, shown in Figure 4.1.2. Select the audio and video you want. If audio is included use "MP3 (Lame) encoder" and pick the desired encoding options (not discussed). For video choose "VP3 3.1 (proper)." Select a bit-rate to aim for (it won't be constant and may not even be near it). Hit "OK" then "OK" again to exit.

Figure 4.1.2: NSV Encoder Options
4.2 Encoder Startup
Once everything is configured and plugged in it is time to start the encoder. Use the following line (or a variation based on your needs.)
- /cfgcap brings up the capture configurationcode:
nsvenc /cfgcap cap:0,N sc:127.0.0.1:8001:headers.txt
- cap:0,N says to capture from the first video capture source and capture no audio. Use cap:0,0 for first device video and audio. Use cap: to list all available capture devices, and use the number of the device in subsequent runs to automate. Use audio device 'I' for MiniDV source audio (interleaved)
- sc: says to send the data to a SHOUTcast server
- 127.0.0.1 is the IP address of the server. The IP of 127.0.0.1 is for the server being on the same system as NSVenc.
- 8001 is the port to send the data to. Note this is PortBase+1. The PortBase set in the SHOUTcast server configuration (8000 by default, so 8001 to send to. Using the SHOUTcast DSP it would add the one for you).
- headers.txt specifies what text file headers are in. This should be the earlier created document in the same folder.
Up next should be the "Capture Configuration" box (also know as "Poopie Properties"), shown in Figure 4.2.1.

Figure 4.2.1: Capture Configuration
Select a capture frame rate and resolution. Start kind of low. The encoding takes a lot of CPU power.
4.3 Connection
The encoder should start encoding the video and sending it to the server. If it connects the encoding output will look something like what follows:
code:
[size=2]
from: cap:0,N
[email protected]
to : sc:127.0.0.1:8001:headers.txt
video=VP31 (deinterlaced(LQ)+rescaled(LQ) to [email protected])
(hit ESC to abort)
0:59:10 @ 19.8fps 95kbps (d=0,vinq=0,ainq=0)
[size]
Also the SHOUTcast server should show a connection. The normal connection information should appear in the log. An example is an output like:
code:
<12/13/[email protected]:40:29> [source] connected from 127.0.0.1
<12/13/[email protected]:40:30> [source] icy-name:My NSV Stream ; icy-genre:Video
<12/13/[email protected]:40:30> [source] icy-pub:0 ; icy-br:128 ; icy-url: http://www.com
<12/13/[email protected]:40:30> [source] icy-irc:#chan ; icy-icq:123456 ; icy-aim:SomeUser
If there are any errors, re-read the above steps and try again. If there are no errors the stream can now be viewed.
Playback
Streaming NSV files can be played in Winamp3 Winamp 2.90+, nsvplay (included with NSV Tools, not discussed), NSVPlayX (ActiveX for Internet Explorer, not discussed) and NSVPlayMoz (Mozilla/Netscape plug-in, not discussed).
The URL for the stream is different then the standard MP3 stream URL. Without any modification Winamp will not be able to determine that it is a NSV file it is receiving and not a MP3 stream. The stream URL for a NSV stream is as follows:
http://your_ip:8000/;file.nsv
Where "your_ip" is the IP of the system running the SHOUTcast server. The port is 8000 by default (not 8001) or something else if you changed it in the SHOUTcast configuration (PortBase). There is no typo, use ";file.nsv" and not "listen.pls" after the address and port.
Open that URL in Winamp (Ctrl-L). If everything is working it will connect, buffer, and then the video window will pop up and play.
That's it for now.
Comment