VideoLan Client or VLC can play a number of audio and video formats, such as MP3, Ogg-Vorbis, DVDs, VCDs and
DivX.
But, that doesn't mean that it ends up being a simple desktop media player. It can also be used to stream video across a network. Hence, it can be used as a streaming server as well as a client, making its name, VidoLan Client, a misnomer.
|
We'll first install VLC on Windows and PCQLinux 8.0 and then set it up to stream.
Install software
You'll find the software on this month's PCQ Essential CD as a zip named vlc-0.5.1-win32.zip. To install it on Windows, extract it to a directory on your hard disk (say vlc), and run vlc.exe from there. This will show up the graphical media player.
To install it on PCQLinux 8.0, mount the CD and change to the directory system/cdrom/unltdoss/ linux/videolan. Install all the RPMs found in this directory by issuing the following command:
rpm —ivh * -nodeps
Launch X Window and open a terminal window within X. Issue the following:
vlc
This will show up the graphical media player.
Stream video
Select a machine on your network that is running Windows or PCQLinux 8.0, as the server. Install VLC on it. Both Windows and Linux versions of VLC can stream video contents over a network.
|
To stream from the Windows machine, launch VLC. Click on File>Stream Output. Select UDP and fill in the IP address 224.0.0.1 (see box on multicasting) for 'Address'. Leave the Port to its default. Click on OK. Next, select the video content you want to stream. If you want to stream a video file like DixX or MPEG, click on File>Open File, browse and select the file to stream. If you want to stream a DVD or VCD, click on File>Open Disc. According to the media type, for the Disc Type select DVD or VCD. For the device name enter the drive letter (say D:) of your DVD ROM or CD-ROM drive. Click on OK. (To set-up VLC on clients for displaying the streamed content, read Watch the stream.)
To stream from the PCQLinux machine, launch VLC and click on File>Network Stream. Click on the checkbox, 'Stream Output' and then on the Settings button. Select UDP and fill in the IP address 224.0.0.1 (see box on multicasting) for 'Address'. Leave the Port to its default. Click on OK. In the Open Stream window, click on OK again.
Next, to stream content in a file like DixX or MPEG, click on File>Open File. Click on the File tab and then on the browse button. Select the video file to stream. If you want to stream a DVD or VCD, click on the Disc tab. According to the media type, select DVD or VCD for the Disc Type. For the device name, enter the device filename corresponding to your CD/DVD drive-usually /dev/cdrom. Note that when you select DVD, the device name changes to /dev/dvd. You must change it to /dev/cdrom because the device file name for DVD drives is also /dev/cdrom in PCQLinux 8.0. Click on OK.
Watch streaming video
Install and launch VLC on the client machine(s). On Windows machines, click on the button labeled Net on the panel of the player. Select UDP/RTP Multicast and fill in the same IP address as in the case of the server-224.0.0.1. Click on OK. You should now be able to see the streamed video.
On machines running
PCQLinux 8.0, click on the Net button on the panel of the player. Click on the Network tab. Select UDP/RTP Multicast and fill in the same IP address as in the case of the server-224.0.0.1. Click on OK.
HTTP streaming
VLC can also display video content streamed over HTTP. That is, it can display a video file hosted on a Web server while retrieving/downloading it. In this case, you don't need to run VLC, but a Web server, on the server machine. If the server machine is running Win 2000/XP, you can use IIS Web server. If the server machine is running
PCQLinux 8.0, you can use Apache Web server. You simply need to put the video files in the 'document root' directory (or in one of its subdirectories) of the Web server. The document root in case of IIS is c:\Inetpub\wwwroot (assuming that Windows is installed in C:) and /var/www/html in the case of Apache. If you want to stream a VCD, you can copy the .DAT files found in a directory named MPEGAV on the VCD to the document root. In the case of a DVD, convert the DVD into DivX and host the DivX file in the document root.
To view the video file on the Web server, launch VLC on the client machine. Click on the Net button. Select the option HTTP/FTP/MMS. Fill in the URL in the following form:
For example, if the Web server is running on a machine with IP 192.168.1.1 and the name of the video file is movie.avi, then the URL will be:http://192.168.1.1/movie.avi
VLC was not very stable while streaming DVD contents and it was not able to play some DivX files. This may be because VLC is still in its infancy-version 0.5.2. Nevertheless, video streaming works out of box in VLC and it is also an elegant media player. For more on VideoLan project and VideoLan Client, check out www.video lan.org.
Related Articles