User Tools

Site Tools


linux_streaming

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revision Previous revision
Next revision
Previous revision
Next revision Both sides next revision
linux_streaming [2006/12/13 11:29]
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 to get my credits for the class. Its mainly about streaming under linux.  +Hello, this is a note-scrape-no-paper-book for a paper i should submit for class on my universityIt is about streaming under linux. I will slowly develop it also after submitting it, as streaming is of big interest for me.\\ 
-[[http://www.yolinux.com/TUTORIALS/LinuxTutorialAudioStreaming.html|Here]] is one simillar, but older article on audio streaming.+I work for [[http://www.tlis.sk|Tlis]] which is a internet-students radio, where i maintain the streaming server, and also manage programming. I am also a founding member of [[http://itchybit.org|Itchy Bit]], ((website is down because of lame registrant;)) organization and platform for promoting hybrids of arts, social activity and technology.\\ 
 + 
 +[[http://www.yolinux.com/TUTORIALS/LinuxTutorialAudioStreaming.html|Here]] is one simillar, but older article focused on audio streaming under Linux.
  
 ===== What is Streaming ===== ===== What is Streaming =====
Line 114: Line 116:
   * [[http://www.xinehq.de|Xine]]   * [[http://www.xinehq.de|Xine]]
   * [[http://www.videolan.org|VLC]]   * [[http://www.videolan.org|VLC]]
 +
  
  
Line 125: Line 128:
 First of we should have a streaming server allready installed and at our disposal. If true, goto [[linux_streaming#source setup|here]]. If not, we will install our streaming server now. I chose IceCast. First of we should have a streaming server allready installed and at our disposal. If true, goto [[linux_streaming#source setup|here]]. If not, we will install our streaming server now. I chose IceCast.
  
-get the new libogg: +get the libogg: 
 <code> <code>
 wget http://downloads.xiph.org/releases/ogg/libogg-1.1.3.tar.gz wget http://downloads.xiph.org/releases/ogg/libogg-1.1.3.tar.gz
 +</code>
 +
 +get the libvorbis:
 +<code>
 +wget http://downloads.xiph.org/releases/vorbis/libvorbis-1.1.2.tar.gz
 </code> </code>
  
Line 168: Line 176:
 === Server config === === Server config ===
  
-Here you can see the icecast config of [[http://www.tlis.sk|Tlis Students Radio]] that we use:+Here is an an example of an icecast configuration file, used for the streaming server of [[http://www.tlis.sk|Tlis Students Radio]] where i work:
  
 <code> <code>
Line 237: 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 /etc/darkice.conf:+As an stream forwarder we will use [[http://darkice.tyrell.hu/|darkice]]. Its robust, command-line orientated, and fast. It can be used to send data to IceCast, Shotcast and Darwin Streaming Server. We compile darkice from the sources. There are some libraries needed. The we just modify an .conf file, for example /etc/darkice.conf:
  
 <code> <code>
Line 291: Line 299:
 </code> </code>
  
-After modification we just run darkice -c /etc.darkice.cfg, and everything we receive in the input device (/dev/dsp) is being forwarded to our streaming server. So lets put something into the input device :) The best and easiest way is to run an XMMS and just play some music. If you want to mix it, it is better to try some mixing software, for example [[http://mixxx.sourceforge.net/|mixxx]] ((an open-ource alternative to Traktor))+After modification we just run darkice -c /etc/darkice.cfg, and everything we receive in the input device (/dev/dsp) is being forwarded to our streaming server. So lets put something into the input device :) The best and easiest way is to run an XMMS and just play some music. If you want to mix it, it is better to try some mixing software, for example [[http://mixxx.sourceforge.net/|mixxx]] ((an open-ource alternative to Traktor)) 
 + 
  
  
Line 297: Line 307:
 ===== Video Streaming ===== ===== Video Streaming =====
  
-Video sreaming under Linux was, for licencing issues a bit weak, until the fabulous libtheora came and with it the OGG/Theora format. This is now something like the flagship of linux video streaming, so we will cover only this option.+Video streaming under Linux was, for licencing issues a bit weak, until [[http://xiph.org|Xiph Foundation]] came with **libtheora**  and with it the OGG/Theora format. As Theora is built upon a free video-codec, which can be fitted into any container. The most used "container" is the OGG format, which when using with Ogg/Vorbis audio, gives a completely free multimedia streaming format. This is now something like the flagship of open-source streaming, so we will cover only this option. 
  
 ==== Structure ==== ==== Structure ====
Line 303: Line 314:
 === Source === === Source ===
  
-various... +  * IEE1394 (FireWire Input), Video4Linux devices, video files 
 +  * [[http://ffmpeg.mplayerhq.hu/|FFMpeg]] - most robust solution 
 +  * [[http://videolan.org|VLC]] - can encode from anything it plays, also from other streams 
 +  * [[http://freej.org/|FreeJ]] - you can mix video inputs and effect them
  
 === Repeater === === Repeater ===
  
-we will use libtheora and libvorbis enabled IceCast streaming server+  * [[http://icecast.org|IceCast Streaming Server]] 
 +  * [[http://www.flumotion.net/|FluMotion]] 
 +  * [[http://videolan.org|VLS]] 
 +  * [[http://www.freecast.org/|FreeCast]]
  
 === Client === === Client ===
  
-various, see above which can playback video..  +  * [[http://videolan.org|VLC]] 
 +  * [[http://www.mplayerhq.hu/|Mplayer]] 
 +  * [[https://player.helixcommunity.org/|Helix Player]] 
 +  * [[http://xinehq.de/|Xine]] 
 +  * etc..
  
  
Line 325: 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 called [[http://www.v2v.cc/~j/ffmpeg2theora/|ffmpeg2theora]]. Examples how to use it are [[http://www.v2v.cc/~j/ffmpeg2theora/examples.html|here]]+When you have the firewire up & ready, get and install the utility called [[http://www.v2v.cc/~j/ffmpeg2theora/|ffmpeg2theora]]. Examples how to use it are [[http://www.v2v.cc/~j/ffmpeg2theora/examples.html|here]]
  
 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 to standard-out:
 <code> <code>
 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 339: Line 359:
 dvgrab --format raw - | ffmpeg2theora -a 0 -v 5 -f dv -x 320 -y 240 -o /dev/stdout - | oggfwd  icecastserver  8000 pwd /theora.ogg dvgrab --format raw - | ffmpeg2theora -a 0 -v 5 -f dv -x 320 -y 240 -o /dev/stdout - | oggfwd  icecastserver  8000 pwd /theora.ogg
 </code> </code>
-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://www.theora.org/|libtheora]] enabled installation of IceCast Streaming Server. We download the additional libraries (we expect that we have allready installed libogg and libvorbis): 
- +
-Get libvorbis: +
-<code> +
-wget http://downloads.xiph.org/releases/vorbis/libvorbis-1.1.2.tar.gz +
-</code>+
  
 Get libtheora: Get libtheora:
Line 366: Line 378:
 ./configure --with-ogg=/usr/local/lib --with-vorbis=/usr/local/lib --with-theora=/usr/local/lib ./configure --with-ogg=/usr/local/lib --with-vorbis=/usr/local/lib --with-theora=/usr/local/lib
 </code> </code>
 +
 +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://ip_of_streaming_server:8000/mount_point.ogg\\
 +
 +Enjoy! :)
  
linux_streaming.txt · Last modified: 2007/04/17 12:58 (external edit)