[Libav-user] how to set mjpeg encoding quality programmatically?
mrfun.china at gmail.com
Thu Jun 9 01:55:34 CEST 2016
2016-06-09 9:44 GMT+10:00 YIRAN LI <mrfun.china at gmail.com>:
> I'm using command line
> ffmpeg.exe -i a.mp4 -vcodec mjpeg -q:v 3 to encode my video.
> Could anyone tell me how to set the q:v 3 via ffmpeg API programmatically?
Hi, searching the mail list and seems I found the answer.
Just need to set
AVCodecContext.flags |= CODEC_FLAG_QSCALE
and AVCodecContext.global_quality = qscale * FF_QP2LAMBDA, in my case
qscale = 3
Please correct me if anything wrong, thanks
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the Libav-user