[Theora] Attempts at live streaming (long)

Simon Blandford home at simonb.org.uk
Sat Jun 11 04:18:42 PDT 2005


I would like to hear from anyone who has had some success in this area. I
have got it to work but the picture freezes and stays frozen when there is
a lot of motion. I will share how I got to that stage since I have tried
some different approaches to those I have seen documented so far.

I currently stream live video events for a non-profit using Helix Producer
but would like to move to something that can be played on more than just
Real Player, preferably with an open codec.

Fluendo seems to be the easiest way to stream but from what I can see it
only works if your capture card is on the same machine as the server.
Someone correct me if I'm wrong but it can't stream via a remote Icecast
server. So it won't work as I only have 256kbps uplink from the encoding
machine.

I have recently had some success streaming Theora/Vorbis using oggfwd. I
upgraded Icecast to 2.2.0 on the remote server and compiled
libtheora1.0alpha4 to make it work with Theora streaming.

The first approach I tried was to use ffmpeg2theroa from
http://www.v2v.cc/~j/ffmpeg2theora/. The first problem I encountered was
that I didn't have a DV video source. I had a v4l source of either a
Quickcam on my laptop or a Hauppage on the actual encoding machine. I
eventually got some life out of the system by using the following
combination of commands...

ffmpeg -target pal-vcd - |\
 ffmpeg2theora -a 0 -v 0 -x 320 -y 240 -o /dev/stdout - |\
 oggfwd  www.myicecastserver.org  8000 PASSWORD /theora.ogg

This is probably really, really inefficient as it makes an mpeg1 steam and
then converts it to Theroa. Anyway, it go me there. I could view the
resulting stream back from the Icecast server in either Real Player 10 or
VLC. I only tried short clips with this approach but will look into it
further.

Another approach I looked at is to use VLC for the encoding. VLC is very
badly packaged for most Linux distributions since they leave most of the
options out like Speex, PVR support and even Theora. They are often not
even available as addtional RPMs plugings. Windows users are much better
served, they get all the options compiled in.

I eventually managed to compile a version of VLC that could use libtheora.
I have libtheora1.0Alpha3.

I use VLC to create an ogg file on disk. I wait about half a minute then
use oggfwd to send it to the server. This is command line I used for VLC.
Be warned there will be many line breaks in this email, it's a very long
command line. It may take some piecing together by the time you read
this...

vlc
v4l:/dev/video0:norm=pal:size=320x240:channel=1:adev=/dev/dsp11:audio=0
--sout\
'#transcode{vcodec=theo,vb=64,scale=1}:duplicate{dst=display,dst=std{access=file,mux=ogg,url="/tmp/buffer.ogg"}}'
&

Then use the following command to send the stream half a minute later...
oggfwd www.myicecastserver.org 8000 PASSWORD /theora.ogg\
  < /tmp/buffer.ogg

I used Real Player 10 to view the stream comming back. It even worked but
the picture kept freezing on Real Player until I reconnected it.

I wondered if I also needed libtheroa1.0alpha4 on the encoding machine so
I upgraded it. Now the local VLC window keeps freezing as well as the
receiving machine. So I am wondering if something has been introduced to
cause this problem between 1.0alpha3 and 1.0alpha4.

I had a look though the dev mailing lists to see if there was any other
reports of freezing but nothing found. Has anyone else had this problem
with libtheora1.0alpha4?



More information about the Theora mailing list