[theora] Live webcam stream with Theora

Basil Mohamed Gohar abu_hurayrah at hidayahonline.org
Wed Jan 13 07:57:58 PST 2010

Hey all,

I've setup a simple page that just displays a live webcam stream of me
at work, and it supposedly falls back onto Cortado if your browser
doesn't support the <video> tag.  The URL is here:


There's been a lot of talk about live streaming and low bitrate
streams.  Here is my command line (I've posted this before):

time ffmpeg -f video4linux2 -s 640x480 -r 15 -i /dev/video0 -pix_fmt
yuv420p -f yuv4mpegpipe - 2>/dev/null |
~/packages/theora/examples/encoder_example --video-rate-target 150
--soft-target - | tee /home/basil.gohar/Videos/webcam-capture-`date
+%F-%T`.ogv | oggfwd -d 'Live webcam view of me at work' -g 'Webcam' -n
'Basil at work' aalimraan.hidayahonline.net 8000 ***secret***

As you can see from that, the stream is 640x480 at 15 fps.  I capture it
with ffmpeg, convert it to a 4:2:0 YUV4MPEG2 stream, which I then pipe
to the example_encoder bundled with libtheora.  I am encoding the stream
to 150 kbps (150/8 = 18.75 kB/s).  I am NOT doing any audio encoding,
since I'm at work, so that does save me some bits.  Take a look at the
video and see what you think.  I'll try to keep it on for the duration
of my stay at work today.

If you cannot get it to play in the browser, then you can use the direct
link from my IceCast2 server, which is here:


That should play in most media players that support Ogg Theora video

More information about the theora mailing list