by February 28, 2004 0 comments



Your PCQLinux distribution includes a powerful streaming solution in the form of VideoLAN Client or VLC. 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 both as a streaming server as well as a client, making its name, VideoLan Client, a misnomer.

VLC is a media player that can play multiple audio/video formats and can stream video and is available for Windows, Mac OSX as well as Linux. In PCQLinux 2004, it is installed by default if you chose the multimedia workstation option. Else, you can add it from the PCQLinux Specials screen during the installation of other options.

The video streaming wizard helps you start streaming in three easy steps

Stream your video
To stream from the PCQLinux 2004 machine, launch VLC and click on File>Streaming Wizard. This is an easy three-step wizard that will help you stream video over the network using the protocol that you decide. We implemented it using
UDP.

Select what to stream
Clicking on the open button in the stream dialog opens the Open target dialog box. Using this you can open a file, disk or network resource for streaming over the network. 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.

LICENSING
Remember that streaming any media has license implications. So, if you are doing a broadcast of copyright or commercial content, ensure that you have the license to copy the files and to stream them, either for public or private use.

Define streaming method
Clicking on the Choose button will take you to the stream output dialog. This dialog gives you options for choosing the protocol for streaming, the encapsulation method and transcoding options. We used the UDP protocol. So, click on the UDP checkbox and enter the address 224.0.0.1 in the text box. Leave the port as the same. Click on OK.

Start streaming
Click on the Start button to start streaming your media.

You can connect to a multicast stream, or open a file using the open 
target dialog

Watch streaming video
On machines running PCQLinux 2004, click 

on File>Open Network Stream in the VLC software. 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. 

Similarly, you can install and run VLC on a Windows machine and watch the streaming video.

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. You can use Apache Web server for this. 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 is /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 from the Web server, launch VLC on the client machine. Click on file Open Network Stream. Select the option HTTP/FTP/MMS. Fill in the URL in the following form: http://<IP address>/video filename. 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.

Geetaj Channana and  Shekhar Govindarajan

MULTICASTING

Using unicast, you can send video to a single machine on a network–a peer-to-peer communication. For such communication, you need to specify the exact IP address of the target machine.

With broadcast, you can communicate content to all the machines on a network. All machines receive the content even if they don’t intend to. Such content is delivered using broadcast address for a network. For example, the broadcast address for a 192.168.1.0 network is 192.168.1.255. 

For video streaming, neither unicast nor broadcast may be suitable. You may not want to stream video to only one machine. You may like more than one machine to receive the video stream so that more users can watch the video. If you opt for broadcast, you may end up wasting network bandwidth by streaming heavy video to all machines.

This is where multicast comes to the rescue. In multicast, the server streams the content to a particular IP in the range of 224.0.0.0 to 239.255.255.255. This IP does not fall in the range of the prescribed IP addresses for computer networks. Hence, content delivered to this IP is not received by any machine on the network. Only when a machine connects to this IP, will it be able to retrieve the content, and more than one machine can connect to a multicast IP simultaneously.

As you will notice, in this article we specify a multicast IP address (224.0.0.1) while setting up VLC (VideoLAN Client) on the server to stream and setting it up on the clients to display the streamed content.

No Comments so far

Jump into a conversation

No Comments Yet!

You can be the one to start a conversation.

<