by January 30, 2004 0 comments



Commercial software such as Real Media and Windows Media are popularly used to stream video. But, now you can stream video for free using Shoutcast, which has acquired video-streaming capabilities (earlier, it could stream only MP3s). And, play the video using winamp 5, winamp’s latest version that can now stream video. So, you can experiment streaming with it before going for a commercial solution. Moreover, Shoutcase compresses the file to be streamed into .nsv format, which is generally smaller than the
commonly used .avi, .mov and .mpg files. 

So, you could consider using the Shoutcast-winamp 5 combo to stream video (such as training or other corporate videos) over your network. 

We’ll see how you can use Shoutcast to stream video and, winamp 5 (winamp’s latest version) to play .nsv files. You need to first encode video to .nsv format and then stream it.


The NSV encoding configuration box, which is used to set the audio and video properties of the encoded video

ENCODE TO .NSV
Using either the GUI or the command-line interface of NSVTools, you can encode AVI, MPG and MOV to .nsv format. (You can download from www.nullsoft. com/nsv). We found the GUI buggy, though the command line works fine. In this article we’ll talk about both.

NSVTools.exe includes various command-line based utilities for encoding and streaming audio. Install the file on your system and it will create NSVtools directory in the c:\Program Files directory. Use the NSVenc application from this directory to encode the video. Here’s how.

   STEP
ONE          
Go to the command prompt of your Windows system and go to the c:\Program Files\NSVTools directory. Now open the Configure dialog using the following command.

C:\ NSVenc /config

This dialog provides options for cropping, resizing and changing the frame rate of the video. We suggest you don’t play around with these options too much, as they could give some undesirable results. 

   STEP
TWO          
Click on the ‘NSV Encoder Configuration’ button, which will open another dialog box that lets you set the encoding formats of audio and video for NSV. From the audio format dropdown choose the MP3 Lame encoder. This will encode the audio part of your video to MP3 format. It will also show you various properties for MP3 encoding. Use the most appropriate setting for your video.

   STEP
THREE         
From the video format dropdown, choose VP3 3.1 (proper). This will give you the video encoding options. Choose the most appropriate ones for your video. Though there is a setting available for bit rate, it doesn’t help much since the video is encoded at variable bit rate.

Use the following command line to encode the video to nsv.

nsvenc intro.avi intro.nsv

   STEP
FOUR         
Here intro.avi is your video file, which is encoded to intro.nsv format.

The same thing can be done using the encoder’s GUI. This can be run from Start>Programs>NSVtools>NSV Batch Encoder. Here, add the files you want to encode using the file>Add Source Files menu item. This will open a choose profile dialog. Click on the edit button to open the encoder configuration dialog for the default profile. This will be similar to the configuration dialog we discussed earlier. That done, choose the menu item Selection> Encode selected. This will encode the file in NSV for you.

We’re now ready to stream the encoded NSV file. Double click on it to see if it opens in Winamp 5.

STREAM VIDEO 
Download Shoutcast server from www.shoutcast.com/download and install it on a machine on your network. The first time you start the server, you will have to
click on the edit config menu item. This will show the configuration file. Following are the changes you need to make
to this file before you start streaming over your network. 

  • The number of users according to your needs and available bandwidth
  • The MaxUser variable value for this
  • The password value, which is the password for administration
  • The portbase to any port that you want to stream on. Make sure that the port number after this one is also
    free

Finally, kill the server from the Kill Server button and restart it with the changes.

You can connect to the Shoutcast server using either the command-line interface available with NSVtools or a GUI that is unstable and developed by a user group moderator. These can be downloaded from the Shoutcast website. 

First, you would need to make a ‘headers.txt’ file in the following format and save it in the NSVenc folder on your machine. 

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.shoutcast.com
icy-irc:#channel
icy-icq:8888888
icy-aim:NoUser
icy-reset:1

In this file, changeme is the same password that you provided in the Shoutcast server. Further, don’t change line numbers 2 and 3. Line 4 onwards is the information about the file, which is the same as in the Shoutcast Server.

You can take the file nsvscsrc.exe from this month’s CD and put it in the NSVtools folder, as this one is the latest version. Go to the Windows command prompt and go to the NSVtools folder. Run the following command to start streaming.

nsvscsrc /SC localhost:8001:mypass:headers.txt d:\mymusic

Here localhost is the server that is running Shoutcast server, which in this case is the same machine. 8001 is the port that is being used for streaming. mypass is the password that was given in the headers file and the Shoutcast server. Headers.txt is the file that was made earlier. D:\mymusic is the directory where you want to stream from.

Other users can connect to this server by choosing File>Add URL from Winamp 5. The URL should be in the following format. 

http://IPaddress of the shoutcast machine:8001/;intro.nsv

Geetaj Channana

No Comments so far

Jump into a conversation

No Comments Yet!

You can be the one to start a conversation.

<