You are in Home page » Documentation
Short guide to realize a audio/video streaming. This guide has been used to realize the audio/video streaming during the LinuxDay 2004 event.
This document is work in progress and it could have mistaken. Let me know if you found problems.
To produce the streaming it has been used the ffmpeg/ffserver platform
P.S. The streaming made with VideoLan works alone if also client is VideoLan and has a very very very low number of supported acquisition cards .
I made test on RedHat9, Fedora Core 1, Mandrake 10,0, Slackware 10 platforms and at the end I decided to use Slackware 10 because, as an example, on the test box (Pentium II 800), in a situation in which the server is an encoder server and a client listen to, on Mandrake the load of the box was of 1.00 while on Slackware, in the same conditions, load was 0.60.
How to implement the system.
The first idea was to distribute the load on two box, a (Pentium II 800), with acquisition card and ffmpeg that it sends the videoflow , and a Pentium IV 2600, with ffserver, that it recive the flow video in order to redistribute it to clients that they had made request. Unfortunately, in all tests made, except in one case, with two Mandrake boxs, the ffserver went in segfault in the first client request, and so, at the end, it has been decided to put all on a Pentium IV and to make to run ffmpeg and ffserver on the same box, than however, from tests carried out, it always remains under a load of 0.4.
As first step, it is necessary to make to work the acquisition card video that, in our case, was an Hauppauge WinTV with chipset BT878.
The module bttv.o is always correctly be loaded in any kernel > 2.4.24 and 2.6.9. The interface has recognized correctly and the card ihas been activated as /dev/video0. Only in the Mandrake distribution it has been necessary to configure by hands the modprobe bttv command in the modules.conf. Instead in Slackware the hotplug demon found correctly the card but, in this case, it has been necessary to configure in the hotplug blacklist the audio module of the bttv that, otherwise, it was in conflict with the true audio card of server.
In order to configure the WinTV card properties (to select the corrected input, to see what it was looked at, etc.) it has been downloaded and installed XawTV so to select the video source from which to read the flow video, once the source was selected, you can also close this program. It's possible at the same time to hold open XawTV and the ffmpeg acquisition, because it does not be in conflict and neither the first nor the second program lock the video device, ah, the power of Linux: -)
Compile and installe XawTV with these lines:
Before download ffmpeg, a tip. Some distribution, as Mandrake, already have a package for the ffmpeg. Not trusted, but download and compilate from source. As an example, the standard package with Mandrake has not activated the support for the mp3 audio and therefore only mp2 can be sent with consequent incompatibility with many clients.
Before downloading ffmpeg, to have mp3 audio support, we must download and install the mp3lame linrary.
# wget ttp://puzzle.dl.sourceforge.net/sourceforge/lame/lame-3.96.1.tar.gz
Now we are ready to download and install ffmpeg with the support mp3. I tried, owing to a sigfault, many ffmpeg versions, also the CVS, but the stablest it is the 0.4.8, for which I decided to used this one
Ok, now we must create the configuration file in /etc/ffserver.conf.
This is what we used [ comment more options][this is not the definitive one][add comments in more pretty way ]
Ok. We completed.
We can make to leave the serveur
# ffserver &
and to start streaming
|Copyrightę 1997-2006 Emiliano Bruni||Online from 16/08/1998 with visitors||Write me to:|