[Libav-user] Using LibX264 with ffmpeg libraries

Aleksey Shubin x.morion.x at gmail.com
Thu Jul 12 02:36:25 CEST 2012

Hi Noah,

char *crfString = new char[50];
sprintf_s(crfString, 50, "%f", crf);
av_opt_set(codecContext->priv_data, "crf", crfString, 0);

Don't sure if it is the best way (to convert to string first) but I
didn't find a variant of av_opt_set for floating point values, and at
least it works.

2012/7/12 Noah Arc <noahzarc at hotmail.co.uk>:
> Hi all;
> I've just switched to the newer ffmpeg versions (I always used ffmpeg
> 0.6),
> it is a big jump for me and I'm trying to figure out how to implement some
> of the changes.
> In the past, libx264 variables such as crf was a part of AVCodecContext.
> However, looks like in version 0.11 it has been deprecated and was moved
> to
> libx264.c as a private variable. But for my project, I'm used to just
> assign
> a value to crf (of a ptr of type AVCodecContext). Could someone please
> give
> me a hint on how I could implement the API changes?
> Thank you very much!
> Cheers
> _______________________________________________
> Libav-user mailing list
> Libav-user at ffmpeg.org
> http://ffmpeg.org/mailman/listinfo/libav-user

More information about the Libav-user mailing list