[Libav-user] qscale for vorbis encoder

Paul B Mahol onemda at gmail.com
Thu May 23 23:56:18 CEST 2013

On 5/20/13, YIRAN LI <mrfun.china at gmail.com> wrote:
> Hi Guys,
> I'm trying encoding ogg video with native experimental vorbis encoder.
> While documentation here says the max qscale is 10 for vorbis audio, and
> default is 6, http://ffmpeg.org/trac/ffmpeg/wiki/TheoraVorbisEncodingGuide
> But I found that even if I pass 150 to -qscale:a I still can get files with
> larger size than -qscale:10 (I keep same qscale for video, so I assume the
> size increment is caused by audio part).
> and the code fragment for vorbis quality is here
>     avccontext->bit_rate = 0;
>     if (avccontext->flags & CODEC_FLAG_QSCALE)
>         venc->quality = avccontext->global_quality / (float)FF_QP2LAMBDA;
>     else
>         venc->quality = 8;
>     venc->quality *= venc->quality;
> So could anyone tell me what's the maximum value I can set
> AVCodecCtx->global_quality for Vorbis encoder?

Why not just use libvorbis encoder wrapper?

The native vorbis encoder is experimental because its development stalled
once bitstream generated by it becomes valid.
So native vorbis experimental encoder is worse than most other
exerimental encoders in lavc.

More information about the Libav-user mailing list