diff mbox

[FFmpeg-devel,1/3] avcodec/aacenc: Reduce loglevel of aac_encode_end() from INFO to VERBOSE

Message ID 592c28a9.16ce5787.bm000@wupperonline.de
State New
Headers show

Commit Message

Ingo Brückl May 29, 2017, 1:55 p.m. UTC
AV_LOG_INFO is the default and meant for informational output.
The information given by aac_encode_end() is rather technical
and of less interest to a common user.
---
 libavcodec/aacenc.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

Comments

Rostislav Pehlivanov May 29, 2017, 3:19 p.m. UTC | #1
On 29 May 2017 at 14:55, Ingo Brückl <ib@wupperonline.de> wrote:

> AV_LOG_INFO is the default and meant for informational output.
> The information given by aac_encode_end() is rather technical
> and of less interest to a common user.
> ---
>  libavcodec/aacenc.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/libavcodec/aacenc.c b/libavcodec/aacenc.c
> index 11da260742..e680e7e14c 100644
> --- a/libavcodec/aacenc.c
> +++ b/libavcodec/aacenc.c
> @@ -853,7 +853,7 @@ static av_cold int aac_encode_end(AVCodecContext
> *avctx)
>  {
>      AACEncContext *s = avctx->priv_data;
>
> -    av_log(avctx, AV_LOG_INFO, "Qavg: %.3f\n", s->lambda_sum /
> s->lambda_count);
> +    av_log(avctx, AV_LOG_VERBOSE, "Qavg: %.3f\n", s->lambda_sum /
> s->lambda_count);
>
>      ff_mdct_end(&s->mdct1024);
>      ff_mdct_end(&s->mdct128);
> --
> 2.12.2
>
> _______________________________________________
> ffmpeg-devel mailing list
> ffmpeg-devel@ffmpeg.org
> http://ffmpeg.org/mailman/listinfo/ffmpeg-devel
>

I like both the x264, x265 and this printing encoding statistics at the
end. If users want to silence them they can use -loglevel. If users don't
know what it means they should ignore it or learn what it means and make
better encodes in the future.
Ingo Brückl May 30, 2017, 7:43 a.m. UTC | #2
Rostislav Pehlivanov wrote on Mon, 29 May 2017 16:19:51 +0100:

> On 29 May 2017 at 14:55, Ingo Brückl <ib@wupperonline.de> wrote:

>> AV_LOG_INFO is the default and meant for informational output.
>> The information given by aac_encode_end() is rather technical
>> and of less interest to a common user.

> I like both the x264, x265 and this printing encoding statistics at the
> end. If users want to silence them they can use -loglevel.

If users reduce the loglevel to silence such messages, they will lose all
informational messages as well. It seems that there are two kinds of INFO
messages - technical ones for the advanced user and useful ones for the
common user.

Ingo
Rostislav Pehlivanov May 30, 2017, 8:13 a.m. UTC | #3
On 30 May 2017 at 08:43, Ingo Brückl <ib@wupperonline.de> wrote:

> Rostislav Pehlivanov wrote on Mon, 29 May 2017 16:19:51 +0100:
>
> > On 29 May 2017 at 14:55, Ingo Brückl <ib@wupperonline.de> wrote:
>
> >> AV_LOG_INFO is the default and meant for informational output.
> >> The information given by aac_encode_end() is rather technical
> >> and of less interest to a common user.
>
> > I like both the x264, x265 and this printing encoding statistics at the
> > end. If users want to silence them they can use -loglevel.
>
> If users reduce the loglevel to silence such messages, they will lose all
> informational messages as well. It seems that there are two kinds of INFO
> messages - technical ones for the advanced user and useful ones for the
> common user.
>
> Ingo
> _______________________________________________
> ffmpeg-devel mailing list
> ffmpeg-devel@ffmpeg.org
> http://ffmpeg.org/mailman/listinfo/ffmpeg-devel
>

By your logic everything should be silenced. Bitrate? Too technical.
Filesize? Too technical. Might as well put number of floppies you'll need,
since its simpler.
Point is, a user encoding should very well know everything there is to know
about the encoding process. How else would they know the encoding is bad?
When they send it somewhere seeking often is important and find seeking is
very slow or imprecise? Where bitrate matters and they forgot to enable
CBR? When the rate control system screwed up horribly and made the codec
intra-only? Every single one of the statistics is important to knowing how
good an encode is, regardless of how technical they are. If someone doesn't
care they can just ignore it. Its not a warning, its information.

>useful ones for the common user.
Most common users of ffmpeg (the command line tool) are power users seeing
this on a terminal, not someone who points and clicks to copy files
diff mbox

Patch

diff --git a/libavcodec/aacenc.c b/libavcodec/aacenc.c
index 11da260742..e680e7e14c 100644
--- a/libavcodec/aacenc.c
+++ b/libavcodec/aacenc.c
@@ -853,7 +853,7 @@  static av_cold int aac_encode_end(AVCodecContext *avctx)
 {
     AACEncContext *s = avctx->priv_data;
 
-    av_log(avctx, AV_LOG_INFO, "Qavg: %.3f\n", s->lambda_sum / s->lambda_count);
+    av_log(avctx, AV_LOG_VERBOSE, "Qavg: %.3f\n", s->lambda_sum / s->lambda_count);
 
     ff_mdct_end(&s->mdct1024);
     ff_mdct_end(&s->mdct128);