[FFmpeg-devel] [PATCH] lavc/libx264: add a warning when using qscale

Lou Logan lou at lrcd.com
Sat Mar 22 02:01:34 CET 2014


On Fri, Mar 21, 2014, at 04:24 PM, James Darnley wrote:
> This addresses ticket #3238.
> ---
>  libavcodec/libx264.c |    3 +++
>  1 files changed, 3 insertions(+), 0 deletions(-)
> 
> diff --git a/libavcodec/libx264.c b/libavcodec/libx264.c
> index 6007630..644a582 100644
> --- a/libavcodec/libx264.c
> +++ b/libavcodec/libx264.c
> @@ -330,6 +330,9 @@ static av_cold int X264_init(AVCodecContext *avctx)
>      X264Context *x4 = avctx->priv_data;
>      int sw,sh;
>  
> +    if (avctx->global_quality > 0)
> +        av_log(avctx, AV_LOG_WARNING, "-qscale is ignored, -crf is
> preferred.\n");

Thanks for the patch. Just two nits to consider or discard at your
leisure:

Nit 1: Although [libx264 @ address] will precede the warning (right?)
some users may skip over that part (possibly due to a color difference
or the length of the address), and therefore could assume that the
message applies to all encoders.

Nit 2: s/preferred/recommended/

How about: -qscale is ignored by this encoder, -crf is recommended


More information about the ffmpeg-devel mailing list