From: Rob <rob...@gm...> - 2010-08-28 06:56:18
|
On 27 August 2010 21:23, Thomaz Barros <tho...@gm...> wrote: > Hi all, I'm having some problems with Gstreamer in a Ubuntu 10.04 desktop. > I'm trying to make an H.264 streaming application but there is a delay about > 2-3 seconds. > VENC=" timeoverlay ! x264enc byte-stream=true bitrate=2000 cabac=false ! I'm not certain but I suspect it could be x264enc introducing the delay. Ideally you need an x264 newer than the one in 10.04 (newer than API version 85) and then the next GStreamer release compiled against it. Then you could use the tune=0x4 option which enables a zero latency tuning. However, the zero latency tuning corresponds to: else if( !strncasecmp( s, "zerolatency", 11 ) ) { param->rc.i_lookahead = 0; param->i_sync_lookahead = 0; param->i_bframe = 0; param->b_sliced_threads = 1; param->b_vfr_input = 0; param->rc.b_mb_tree = 0; } (from x264/common/common.c) Which, in GStreamer properties with newer -ugly from the GStreamer developers' PPA could also be given as: rc-lookahead=0 sync-lookahead=0 bframes=0 sliced-threads=1 mb-tree=0 (variable frame rate input is not exposed through the properties). Perhaps some of those options are only available in newer x264 APIs and so are not relevant to older x264 as they were not yet implemented. Give it a go. Hopefully it will help. :) I think lookahead introduces the largest delay when encoding. Regards, Rob |