[theora] Live Streams

Basil Mohamed Gohar abu_hurayrah at hidayahonline.org
Wed Jan 6 07:55:21 PST 2010


On 01/06/2010 10:20 AM, iMDT - Tiago Jacobs wrote:
> Okay for the OGG packaging, it make sense, i will compile it that way
> to reduce the frames "aggregation".
>
> In your opinion, for low latency, wich should be the right server option?
>
> Other thing that i've noticed is that for static images (i.e) a static
> bitmap on every frame (with these options), the bitrate does not
> decreased (if image does not change, bitrate should be near 0... It
> occours also with a high key frame interval)...
>
> Thanks a lot,
> Tiago
>
I'd just like to jump in here and say that I frequently use Ogg Theora
through an IceCast2 server for live streaming, but for the various
factors mentioned already, that setup is not ideal for realtime because
TCP is not a realtime protocol.  However, it works just fine for me,
because I'm just broadcasting myself on a webcam from work for my family
& friends.  I can get fairly good video stream quality at a constant
bitrate of 150kbps using the --soft-target parameter option (which just
increases the buffering time).  My video parameters are 640x480x15fps in
4:2:0 color space.  I use a combination of ffmpeg + encoder_example from
the Theora SVN.  Here is my complete command line:

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

I've broken the commands down line-by-line to make it easier.  I use
`tee` in order to save a local copy of the encoded video.

Yes, there is some delay, but without --soft-target, even that delay is
minimal, perhaps on the order of one second.  Also, there's no audio. 
I'd need to use ffmpeg2theora for that, I believe.

The stream is fully-embeddable inside of Firefox 3.5+ and other Ogg
Theora-supporting web browsers, so you can actually do live video in web
browsers without a plugin!


More information about the theora mailing list