[Libav-user] Working h264 codec configuration for current ffmpeg build

Arash Cordi arash.cordi at gmail.com
Wed May 30 12:26:52 CEST 2012


I use these following extra setting for h264 encoding, where o_v_st is the
ouput video stream
I can send you a complete sample code if you need more information

    // for H264
    o_v_st->codec->me_range = 16;
    o_v_st->codec->max_qdiff = 4;

    // lower value for higher quality range: 0-52
    o_v_st->codec->qmin = 10;
    o_v_st->codec->qmax = 26;

    o_v_st->codec->qcompress = 0.6;



On Sat, May 26, 2012 at 1:37 PM, Christian Brümmer <
christian.bruemmer at gmx.de> wrote:

>  Hi,
>
> i'm new to libav and video compression at all. What i tried so far is
> reusing output-example.c or decoding-encoding.c slightly modyfied for
> compiling on VS++2010 (win7) and to use it for x264 encoding. One of my
> main problems are that i didnt find up-to-date x264 configurations (c:
> hardcoded) working with current ffmpeg build. Most examples i found (around
> 2010) using deprecated flags and functions for configuration and cause i
> dont know what most of that flag does - so i can't replace them with
> up-to-date right ones.
>
> Would be nice to get a example configuration which is working (c-code and
> may without using ffmpeg-presets) so i can make sure that my problems
> (crashes on avcodec_encode_video or av_interleaved_write_frame()) not
> caused by bad codec configurations!
>
> By the way: my avcodec_encode_video returns 32 times "0" before really
> writing a frame and returning a valid byte size - can this be a right
> behaviour?
>
> Thanks for reading!
> Regards,
> Christian
> <http://www.libav.org/doxygen/master/group__lavc__encoding.html#ga22847c21918ee93a4d05f7ffb419f9a9><http://ffmpeg.org/doxygen/0.6/output-example_8c.html>
>
> _______________________________________________
> Libav-user mailing list
> Libav-user at ffmpeg.org
> http://ffmpeg.org/mailman/listinfo/libav-user
>
>


-- 
ArasH
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://ffmpeg.org/pipermail/libav-user/attachments/20120530/d77f45f2/attachment.html>


More information about the Libav-user mailing list