I am trying to produce an MPEG4 video stream with a constant quality
(variable bit rate). Essentially I am trying to do the same thing as the
-qscale command-line flag to ffmpeg. Looking at ffmpeg.c, it would appear
that I would do this by setting...

AVStream *stream;
float quality; // 1.0 - 31.0

.....

stream->codec->flags |= CODEC_FLAG_QSCALE;
stream->quality = FF_QP2LAMBDA * quality;
stream->codec->global_quality = static_cast<int>(stream->quality);

I do this shortly after av_new_stream() and just prior to avcodec_open().

However, adjusting the quality value does not have any effect on the output.
Is there something else I need to set to have the quality value have an
effect or are there any (short) examples that show this working the same way
as the -qscale command-line flag?

Thanks!
adam
_______________________________________________
libav-user mailing list
[email protected]
https://lists.mplayerhq.hu/mailman/listinfo/libav-user

Reply via email to