[Libav-user] How to convert "-q:v 1" to API form
muller at vki.com
Thu Jan 28 23:29:32 CET 2016
Thanks for the quick reply.
I made the change you suggested, but the quality is still not what I need. My images are all technical, containing labels, numbers, etc., and I can't really read them. Do I also need to set
flags |= CODEC_FLAG_QSCALE
I ask because the size of the file changed significantly when this flag is turned on - although the quality didn't change much.
From: Libav-user [mailto:libav-user-bounces at ffmpeg.org] On Behalf Of Carl Eugen Hoyos
Sent: Thursday, January 28, 2016 2:21 PM
To: libav-user at ffmpeg.org
Subject: Re: [Libav-user] How to convert "-q:v 1" to API form
Arthur Muller <muller at ...> writes:
> Using the API version of ffmpeg I’ve managed to generate the mp4 file
> by first converting the png files to yuv format. That was not a
> problem. But I haven’t figured out what I have to do in my code to
> mimic the behavior of “-q:v 1” to get the better quality?
(Old MEncoder documentation suggested not to use a value smaller than "2".)
You have to set AVCodecContext->global_quality but you have to multiply the qscale:
global_quality = qscale * FF_QP2LAMBDA
Libav-user mailing list
Libav-user at ffmpeg.org
More information about the Libav-user