[Libav-user] Problem with using libavcodec with AV_CODEC_ID_H264

Ashwin Chandra - SISA ashwin.c at sisa.samsung.com
Sat Feb 9 23:38:36 CET 2013

1. Just as a sanity check, to disable b-frames, I just set the max_bframes parameter to 0?
2. If GOP size is 1, wouldn't that always be I frames? No predictional ones?]

-----Original Message-----
From: libav-user-bounces at ffmpeg.org [mailto:libav-user-bounces at ffmpeg.org] On Behalf Of Alex Cohn
Sent: Saturday, February 09, 2013 12:46 PM
To: This list is about using libavcodec, libavformat, libavutil, libavdevice and libavfilter.
Subject: Re: [Libav-user] Problem with using libavcodec with AV_CODEC_ID_H264

On Sat, Feb 9, 2013 at 10:24 PM, Ashwin Chandra - SISA <ashwin.c at sisa.samsung.com> wrote:
> Can you tell me the exact options for the preset you mentioned. I want I and P frames and not B frames to reduce latency but gain better h264 compression rather than mpeg 2.
> On Feb 9, 2013, at 11:38 AM, "Alex Cohn" <alexcohn at netvision.net.il> wrote:
>> On Fri, Feb 8, 2013 at 8:21 PM, Ashwin Chandra - SISA 
>> <ashwin.c at sisa.samsung.com> wrote:
>>> All those presets I tried but didn't help.
>> You should try the zerolatency preset, and not allow any b-frames if 
>> you want to flush so often. You can try to set max gop size to 1. 
>> Even in this case, h264 is not optimized for this kind of flushing. 
>> What were the motivations of choosing this codec? JPEG should suit 
>> you best.
>> BR,
>> Alex

You could find the answer on this list:

I don't think you can get a significant improvement without using B-frames and requiring immediate flush, but it's up to you to test it with your input and choose the optimal parameters.

Libav-user mailing list
Libav-user at ffmpeg.org

More information about the Libav-user mailing list