Chapter 11.  Video On Demand

Table of Contents

Overview
On the server side
On the client side

Overview

With Video On Demand (VOD), the user can start the video when he wants, make pauses, go forward and back in the video. It is of course the best in video streaming and the dream for every user.

VOD is a very big consumer of resources for the server and the network. VOD is unicast, not multicast : this means that the network and server resources needed are directly proportional to the number of clients.

The design of VideoLAN's VOD solution is very simple. The idea is to do HTTP streaming, i.e. stream an MPEG video encapsulated in HTTP. The regulation of the bitrate between the client and the server is done automatically by TCP. With HTTP version 1.1, there is the possibility to seek in a file downloaded, that's what we use to seek in the video.

On the server side

On the VOD server, you need a running Web server. For example, you can use a Linux server running Apache. Other operating systems and other Web servers should work too, but we have never tested.

Make your MPEG-1, MPEG-2 or MPEG-4 / DivX files available to the clients on the Web server.

For example, we have a Web server whose DNS name is localserver. On this server, we put an MPEG file video1.mpg which will be available to the clients at the URL http://localserver/video1.mpg.

On the client side

% vlc -vvv http://localserver/video1.mpg

VLC starts to read the stream nearly immediately and you can seek in the stream, make pauses, etc... as if the stream was a local file.