Hey Theorans, Yesterday and today I decided to try out broadcasting a video stream using Theora from my computer's built-in webcam. I was pleasantly surprised to find that, while maintaining a rate of less than 150kbps, the stream was of quite a suitable quality sending 640x480 video at 15 frames per second. For now, this is video only, by the way, I did not include any audio in the stream yet. Yesterday, I used `--video-quality 5`, while today I'm using `--video-rate-target 150 --soft-target`. Using constant quality resulted in more even video despite motion, while using a constant rate yielded better video where there was no motion and worse when there was - both to be expected. In both cases, my family were quite pleased with the results, and although there is obviously a delay (I'm coupling this with an IceCast2 streaming server), for one-way communications, such as broadcasts or webcasts, it's quite suitable and can scale quite well for the purpose it is serving. My purpose in mentioning all of this is to ask others' experience in using Theora for low-bandwidth or video conferencing settings. Are there more advanced settings that are better optimized for a "talking-head" kind of video, where there's more motion in a fixed area of a frame than on the fringes? Also, maybe something that can handle the inevitable white-balance and brightness adjustments that come with today's automatically adjusting cameras... Just some ideas. I was also thinking of coupling --soft-target along with --video-quality to get a minimum video quality, which might be the key to what I am asking. Anyone else have some thoughts on this? For those that are interested, here are my command-line:> 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 > +%Y%m%d`.ogv | oggfwd -d 'Live webcam view of me at work' -g 'Webcam' > -n 'Basil at work' aalimraan.hidayahonline.net 8000 > ***passwordremoved*** /basil-at-work.ogvFeel free to tune in to my webcam, too. The URL for it it: http://aalimraan.hidayahonline.net:8000/basil-at-work.ogv Works great in Firefox 3.5 & VLC. ;)
On Thu, Oct 15, 2009 at 12:11 PM, Basil Mohamed Gohar <abu_hurayrah at hidayahonline.org> wrote:> In both cases, my family were quite pleased with the results, and > although there is obviously a delay (I'm coupling this with an IceCast2 > streaming server), for one-way communications, such as broadcasts or > webcasts, it's quite suitable and can scale quite well for the purpose > it is serving.[snip] With soft-target your delay will be need to be high to provide enough buffering to prevent stalls unless your network connection is very fast.
HI 2009/10/15 Basil Mohamed Gohar <abu_hurayrah at hidayahonline.org>> Hey Theorans, > Feel free to tune in to my webcam, too. The URL for it it: > > http://aalimraan.hidayahonline.net:8000/basil-at-work.ogv > > Works great in Firefox 3.5 & VLC. ;) >Thanks for this test ! I'm really astonished by the quality @150 kbit/s , actually when you don't move it even goes to 50 Kbits/s which would be great for people with very low dsl like 128 kbits/s upstream. you use libtheora 1.1 I guess ? Nice beard BTW ! -- %<------------------------------------------------------->% Michel memeteau Blog 0.2 : http://memeteau.free.fr Fixe : 0974763294 Mobile : 0624808051 VOIP | Visio: sip:freechelmi at ippi.fr <sip%3Afreechelmi at ippi.fr> jabber/GTalk : xmpp:freechelmi at jabber.fr <xmpp%3Afreechelmi at jabber.fr> -------------- next part -------------- An HTML attachment was scrubbed... URL: http://lists.xiph.org/pipermail/theora/attachments/20091015/553ab70f/attachment.htm
On Oct 15, 2009, at 12:11 PM, Basil Mohamed Gohar wrote:> My purpose in mentioning all of this is to ask others' experience in > using Theora for low-bandwidth or video conferencing settings. Are > there more advanced settings that are better optimized for a > "talking-head" kind of video, where there's more motion in a fixed > area > of a frame than on the fringes?A couple of years ago we used Theora to implement a video call / conference solution. Things worked reasonably well in the end, but we had to do a lot of tweaking and duct taping to compensate for Theora's weak points. For a relatively detailed description of the major issues we faced, please take a look at this source file (part of iaxclient project). The interesting stuff is at the top of the file: http://iaxclient.svn.sourceforge.net/viewvc/iaxclient/branches/2.1/lib/codec_theora.c?revision=1349&view=markup Not much to add to that... while Theora is great for storing, playing and streaming static video, I believe it is lacking in features related to live video streaming and conferencing. Granted, we used it back in the pre-1.0 days and things might have changed in the meanwhile. I really hope that is the case. One little trick you might find useful is to increase the ratio of bandwidth assigned to key frames. In a talking-head scenario, there's very little difference from one frame to the other, so the codec uses the available bandwidth to improve the image quality with each p- frame. This has the effect of rendering a rough key frame and slowly improving it only to switch back to another rough key frame making the video look "jumpy". Assigning more bandwidth to the key frame evens it out. Hope this helps... Cheers, Mihai
On Thursday 15 October 2009 11:11 am, Basil Mohamed Gohar wrote:> http://aalimraan.hidayahonline.net:8000/basil-at-work.ogv > Works great in Firefox 3.5 & VLC. ;)This is brilliant. Would you please tell us what hardware you are using to real-time compress webcam video into a 150 kbps theora stream? Are you running Icecast on the same machine? Regards, John Kintree
ogg.k.ogg.k at googlemail.com
2009-Oct-16 15:05 UTC
[theora] wrong lenght of theora videos
> i recently experienced another interesting phenomenon with some > theora files i had, i.e. that the lenght displayed in VLC and totem is > not correct, although the video plays ok.AFAIK, VLC estimates the length from bitrate and file size, and this is a known issue. No idea about Totem.
On Thu, Oct 15, 2009 at 12:11:47PM -0400, Basil Mohamed Gohar wrote:> My purpose in mentioning all of this is to ask others' experience in > using Theora for low-bandwidth or video conferencing settings. Are > there more advanced settings that are better optimized for a > "talking-head" kind of video, where there's more motion in a fixed area > of a frame than on the fringes?No experience with video conf here, but IMO it's better to keep the encoder simple and generic, while still having the possibility to use external pre-processing filters specialised in some kind of video. I'd not be surprised if some filters already existed for "talking-head" video. Maybe experimenting with denoise3d filter (hqdn3d in mplayer/mencoder) spatial and temporal parameters might give something interesting.> Also, maybe something that can handle > the inevitable white-balance and brightness adjustments that come with > today's automatically adjusting cameras...No experience here either, but in your specific case the colour saturation is too high IMO. In general, I've found that less saturation helps bitrate quite a bit, as does less contrast.> http://aalimraan.hidayahonline.net:8000/basil-at-work.ogv > > Works great in Firefox 3.5 & VLC. ;)As does in Xine. Though mplayer, not so surprisingly, hangs. Cheers, Bernard.