2016-06-10 13:32 GMT+10:00 YIRAN LI <[email protected]>: > > > 2016-06-09 23:29 GMT+10:00 Carl Eugen Hoyos <[email protected]>: > >> YIRAN LI <mrfun.china@...> writes: >> >> > AVCodecContext.flags |= CODEC_FLAG_QSCALE >> > and AVCodecContext.global_quality = qscale * FF_QP2LAMBDA, >> > in my case qscale = 3 >> >> This is correct, qscale 3 ensures (with mpeg-4 asp) a >> near-lossless visual quality. >> >> > Thansk Carl, I think I can use the same way to set quality for mpeg4 > video, right? > > What't the differenct between it and seting qmin qmax in codeccctx? > > Thanks > > >
Hi Carl, I asked this because I found whatever qsacale value I set, the size and quality of output mpeg4 videos are same. I did a bit debug, and found the cause (I'm using an old version of ffmpeg) In the encode2 function, it uses MpegEncContext *s = avctx->priv_data; s->qscale as the qsacle value. So setting it into pVideoCodecCtx->global_quality doesn't pass the value into priv_data I tried av_opt_set_int(pVideoCodecCtx->priv_data, "qscale", 3, 0); but failed. Here is the mpeg4 encoder, there's a qscale member in MpegEncContext. Could you give me a hint how to set it? Thanks Carl Eugen > _______________________________________________ >> Libav-user mailing list >> [email protected] >> http://ffmpeg.org/mailman/listinfo/libav-user >> > >
_______________________________________________ Libav-user mailing list [email protected] http://ffmpeg.org/mailman/listinfo/libav-user
