[Libav-user] how to set crf for vp8 encoder in ffmpeg programmatically?
YIRAN LI
mrfun.china at gmail.com
Mon May 20 10:23:06 CEST 2013
Hi guys,
I've downloaded latest libvpx code and built it into ffmpeg, so that my
application can use ffmpeg dlls.
Vp8 encoding works correctly and my application can generate webm videos.
But what I want to know is, how can I set crf when encoding?
What I do in my application is just calling ffmpeg interface
1. AVStream* pVideoStream = av_new_stream(pFormatCtx, 0);
2. AVCodec* pVideoCodec = avcodec_find_encoder(AVCODE_ID_VP8)
3. AVCodecContext* pVideoCodecCtx = pVideoStream->codec;
pVideoCodexCtx->bit_rate =
->rc_min_rate=
->rc_max_rate= (set all these bit rate control
param)
I checked libvpxenc.c under libavcodec and seems when initing the
encoder, it doesn't directly refer to any member
of AVCodecContext to set crf.
So could anyone tell me, how to set crf when open vp8 encoder
programmatically?
Great thanks!
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://ffmpeg.org/pipermail/libav-user/attachments/20130520/24f7b4d0/attachment.html>
More information about the Libav-user
mailing list