[Libav-user] Problem with using libavcodec with AV_CODEC_ID_H264

Ashwin Chandra - SISA ashwin.c at sisa.samsung.com
Sun Feb 10 08:32:57 CET 2013


No I got the link. I guess that preset will most likely remove B frames as they have latency.

For the P-frames, I do want them to get better compression, just not the B frames. Does the zerolatency preset remove all P frames? 
-----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 11:24 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 Sun, Feb 10, 2013 at 12:38 AM, Ashwin Chandra - SISA <ashwin.c at sisa.samsung.com> wrote:
> 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?]

You probably missed the link yesterday:
http://libav-users.943685.n4.nabble.com/Libav-user-FFmpeg-x264-settings-for-zero-delay-encoding-tp4655209p4655212.html.

There is "preset" and "tune" options in ffmpeg, you can set them that way:

#include "opt.h"

av_opt_set(codecContex->priv_data, "preset", "ultrafast", 0); av_opt_set(codecContex->priv_data, "tune", "zerolatency", 0);

where codecContex is AVCodecContext.

For other x264 options that isn't presented in ffmpeg you could use "x264opts" option:

av_opt_set(codecContex->priv_data, "x264opts", "no-mbtree:sliced-threads:sync-lookahead=0", 0);

Regarding P-frames, I thought you wanted to remove them, too.

Sincerely,
Alex
_______________________________________________
Libav-user mailing list
Libav-user at ffmpeg.org
http://ffmpeg.org/mailman/listinfo/libav-user


More information about the Libav-user mailing list