Menu

14 January 2010

Live webcam stream with Theora #ogg

---------- Forwarded message ----------
From: Basil Mohamed Gohar
Date: Wed, Jan 13, 2010 at 9:27 PM
Subject: [theora] Live webcam stream with Theora
To: theora@xiph.org


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 tag.  The URL is here:

http://media.basilgohar.com/stream/

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***
/basil-at-work.ogv

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:

http://media.basilgohar.com:8000/basil-at-work.ogv

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

Posted via email from LUG@IITD Community Blog

Post a Comment