This shows you the differences between two versions of the page.
Both sides previous revision Previous revision Next revision | Previous revision Next revision Both sides next revision | ||
linux_streaming [2006/12/13 11:15] admin |
linux_streaming [2006/12/13 12:09] admin |
||
---|---|---|---|
Line 1: | Line 1: | ||
====== Linux Streaming ====== | ====== Linux Streaming ====== | ||
- | This is a note-scrape-no-paper-book for a paper i should submit | + | Hello, this is a note-scrape-no-paper-book for a paper i should submit for a class on my university. It is about streaming under linux. |
- | [[http:// | + | I work for [[http:// |
+ | |||
+ | [[http:// | ||
===== What is Streaming ===== | ===== What is Streaming ===== | ||
Line 13: | Line 15: | ||
==== Architecture ==== | ==== Architecture ==== | ||
+ | The architecture is an abstract structure of streaming solutions. It usually consists of three independet points: source, repeater and the receiving client. In this way, the source can be on a slow link, just pushing data to a repeater which is conneced to a broad-enough link. The communication between all the members uses the ip protocol, and mostly UDP, but that depends on the solution. | ||
=== Source === | === Source === | ||
- | * Any sound input (through Alsa, Jack, OSS) | + | * Any sound or video input (through Alsa, Jack, Oss, IEE1394, V4l) |
- | * Any internal player (xmms, mp123) | + | * Any internal player (xmms, mp123, VLC) |
* Source " | * Source " | ||
Line 28: | Line 30: | ||
* Can be in relation to other repeaters | * Can be in relation to other repeaters | ||
* Can be the same machine then source | * Can be the same machine then source | ||
- | |||
=== Client === | === Client === | ||
* Client receives stream, decompresses, | * Client receives stream, decompresses, | ||
- | |||
- | |||
- | |||
- | |||
- | |||
- | |||
===== Audio Streaming ===== | ===== Audio Streaming ===== | ||
- | In this section we cover two main forms of audio streaming under linux: mp3 and ogg. We will not pay attention to other formats, like realmedia or windows media. Quicktime is a possibility ((have to check how is it with its freeness and openness)). | + | In this section we cover two main forms of audio streaming under linux: mp3 and ogg. We will use the Icecast Streaming Server as an repeater. We will not pay attention to other formats, like realmedia or windows media. Quicktime is a possibility, since Darwin Streaming Server is free to download from Apple. |
Line 55: | Line 50: | ||
=== External stream-forwarder === | === External stream-forwarder === | ||
- | In case of sound you use various softwares, icecast people have released a number of ices bindings to different programming languages, so the possibilities are broad. The most used are: | + | In case of sound you can use various softwares, icecast people have released a number of ices bindings to different programming languages, so the possibilities are broad. The most used are: |
- | * ices http:// | + | * [[http:// |
- | * Oddcast http:// | + | * [[http:// |
- | * Darkice http:// | + | * [[http:// |
- | * ezstream | + | * [[http:// |
- | * Nicecast | + | * [[http:// |
- | * IceGenerator | + | * [[http:// |
=== Built-in stream-forwarder === | === Built-in stream-forwarder === | ||
- | In case of various music products, the capability to send out the data to a streaming-server is allready built-in or in the possibillity of plugins. | + | In case of various music-playing or music-producing |
- | * Muse http:// | + | * [[http:// |
- | * SAM2 http:// | + | * [[http:// |
- | * Orban http:// | + | * [[http:// |
- | * freej http:// | + | * [[http:// |
- | * Traktor | + | * [[http:// |
- | * PureData | + | * [[http:// |
Line 109: | Line 104: | ||
=== IceCast === | === IceCast === | ||
- | [[http:// | + | [[http:// |
Line 122: | Line 116: | ||
* [[http:// | * [[http:// | ||
* [[http:// | * [[http:// | ||
+ | |||
Line 133: | Line 128: | ||
First of we should have a streaming server allready installed and at our disposal. If true, goto [[linux_streaming# | First of we should have a streaming server allready installed and at our disposal. If true, goto [[linux_streaming# | ||
- | get the new libogg: | + | get the libogg: |
< | < | ||
wget http:// | wget http:// | ||
+ | </ | ||
+ | |||
+ | get the libvorbis: | ||
+ | < | ||
+ | wget http:// | ||
</ | </ | ||
Line 176: | Line 176: | ||
=== Server config === | === Server config === | ||
- | Here you can see the icecast | + | Here is an an example of an icecast |
< | < | ||
Line 245: | Line 245: | ||
=== Source Setup === | === Source Setup === | ||
- | As an stream forwarder we will use darkice.. Its robust, command-line orientated, and fast. We compile darkice from the sources. The we just modify an .conf file, for example / | + | As an stream forwarder we will use [[http://darkice.tyrell.hu/ |
< | < | ||
Line 299: | Line 299: | ||
</ | </ | ||
- | After modification we just run darkice -c /etc.darkice.cfg, | + | After modification we just run darkice -c /etc/darkice.cfg, |
+ | |||
Line 305: | Line 307: | ||
===== Video Streaming ===== | ===== Video Streaming ===== | ||
- | Video sreaming | + | Video streaming |
==== Structure ==== | ==== Structure ==== | ||
Line 311: | Line 314: | ||
=== Source === | === Source === | ||
- | various... | + | * IEE1394 (FireWire Input), Video4Linux devices, video files |
+ | * [[http:// | ||
+ | * [[http:// | ||
+ | * [[http:// | ||
=== Repeater === | === Repeater === | ||
- | we will use libtheora and libvorbis enabled | + | * [[http:// |
+ | * [[http:// | ||
+ | * [[http:// | ||
+ | * [[http:// | ||
=== Client === | === Client === | ||
- | various, see above which can playback video.. | + | * [[http:// |
+ | * [[http:// | ||
+ | * [[https:// | ||
+ | * [[http:// | ||
+ | * etc.. | ||
Line 333: | Line 345: | ||
You need to have either the video on your harddisk, or for live streaming, a FireWire compatible Camera, and firewire enabled in linux. I will not go into this, but it is the main source of problems, when the ieee1394 is not working. | You need to have either the video on your harddisk, or for live streaming, a FireWire compatible Camera, and firewire enabled in linux. I will not go into this, but it is the main source of problems, when the ieee1394 is not working. | ||
- | When you have the firewire up & ready, get and install the utikity | + | When you have the firewire up & ready, get and install the utility |
We pretend we have ieee1394 running. We should have also installed dvgrab: | We pretend we have ieee1394 running. We should have also installed dvgrab: | ||
- | This grabs the input from firewire, converts it to .ogg and sends output standard out: | + | This grabs the input from firewire, converts it to .ogg and sends output |
< | < | ||
dvgrab --format raw - | ffmpeg2theora -a 0 -v 5 -f dv -x 320 -y 240 -o /dev/stdout | dvgrab --format raw - | ffmpeg2theora -a 0 -v 5 -f dv -x 320 -y 240 -o /dev/stdout | ||
Line 347: | Line 359: | ||
dvgrab --format raw - | ffmpeg2theora -a 0 -v 5 -f dv -x 320 -y 240 -o /dev/stdout - | oggfwd | dvgrab --format raw - | ffmpeg2theora -a 0 -v 5 -f dv -x 320 -y 240 -o /dev/stdout - | oggfwd | ||
</ | </ | ||
- | where icecastserver - is the url of our streaming server | + | **icecastserver** - is the url of our streaming server\\ |
- | + | **8000** - can be any number for port number of icecast listener\\ | |
- | 8000 - can be any number for port number of icecast listener | + | **pwd** - password\\ |
- | + | **/theora.ogg** - mountpoint where we wish to have the video stream accesible | |
- | pwd - password | + | |
- | + | ||
- | /theora.ogg - mountpoint where we wish to have the video stream accesible | + | |
=== Server === | === Server === | ||
- | To use the Ogg/Theora options, we will need an libvorbis and libtheora enabled installation of IceCast Streaming Server. We download the additional libraries (we expect that we have allready installed libogg): | + | To use the Ogg/Theora options, we will need an [[http:// |
- | + | ||
- | Get libvorbis: | + | |
- | < | + | |
- | wget http:// | + | |
- | </ | + | |
Get libtheora: | Get libtheora: | ||
Line 374: | Line 378: | ||
./configure --with-ogg=/ | ./configure --with-ogg=/ | ||
</ | </ | ||
+ | |||
+ | All other options and setup is the same as with Audio. If you allready have IceCast installed, then just recompile, and thats all. | ||
=== Client === | === Client === | ||
+ | |||
+ | Setup of the desired player depends on the user ;) If you finally found the player dear to your heart, just open the url: http:// | ||
+ | |||
+ | Enjoy! :) | ||