[Libav-user] [libav-api] h264 decoding delay higher than it could be in a real-time app

Camera Man i.like.privacy.too at gmail.com
Mon Mar 12 10:21:51 CET 2012

On 03/12/2012 03:57 AM, Anton Khirnov wrote:
> Hi,
> you can set CODEC_FLAG_LOW_DELAY in AVCodecContext.flags before opening
> to force low_delay. If your stream really contains no B-frames, then
> there should be no reordering problems, so it should work.
Thanks. It does not have B frames, but the header says 
"num_reorder_frames=4", which causes the decoder to switch low_delay 
off. Alex Cohn suggested I set modify the bitstream to with 
num_reorder_frames=0 to enable LOW_DELAY, and if I understand his post 
correctly, if reordering is actually required, than pauses will be 
inserted into the decoding process as needed. (has_b_frames which 
controls the lag will be increased).

I will test that this week and update.
> BTW could I ask you to send plain text mail? This HTML stuff is hard to
> read in text clients.

Apologies. Even though my thunderbird default is set to "send both plain 
text and html", it insists to start replies in "HTML only mode". Not 
sure why yet, but I'm manually forcing it to plaintext now in each message.

Thanks in advance,

Camera Man

More information about the Libav-user mailing list