Opened 6 years ago

Last modified 6 years ago

#6890 new defect

Misleading log message for -b:a option

Reported by: Tristan Matthews Owned by:
Priority: minor Component: ffmpeg
Version: git-master Keywords:
Cc: Blocked By:
Blocking: Reproduced by developer: no
Analyzed by developer: no

Description

Summary of the bug:

When using the -b:a option, ffmpeg logs report "Applying option b:a (video bitrate (please use -b:v)) with argument 160k."
It seems like this option is not actually interpreted as the video bitrate, but the message is misleading.
Using the deprecated -ab option yields an expected message, "Applying option ab (audio bitrate (please use -b:a)) with argument 160k."

How to reproduce:

% ffmpeg -y -loglevel trace -f lavfi -t 1 -i anullsrc -c:a libopus -b:a 160k -c copy -f nut /dev/null

ffmpeg version N-89369-g5a93a85fd0 Copyright (c) 2000-2017 the FFmpeg developers
  built with gcc 7 (Debian 7.2.0-16)
  configuration: --enable-gpl --enable-libopus -=enable-debug=gdb
  libavutil      56.  4.100 / 56.  4.100
  libavcodec     58.  6.102 / 58.  6.102
  libavformat    58.  2.103 / 58.  2.103
  libavdevice    58.  0.100 / 58.  0.100
  libavfilter     7.  6.100 /  7.  6.100
  libswscale      5.  0.101 /  5.  0.101
  libswresample   3.  0.101 /  3.  0.101
  libpostproc    55.  0.100 / 55.  0.100
Splitting the commandline.
Reading option '-y' ... matched as option 'y' (overwrite output files) with argument '1'.
Reading option '-loglevel' ... matched as option 'loglevel' (set logging level) with argument 'trace'.
Reading option '-f' ... matched as option 'f' (force format) with argument 'lavfi'.
Reading option '-t' ... matched as option 't' (record or transcode "duration" seconds of audio/video) with argument '1'.
Reading option '-i' ... matched as input url with argument 'anullsrc'.
Reading option '-c:a' ... matched as option 'c' (codec name) with argument 'libopus'.
Reading option '-b:a' ... matched as option 'b' (video bitrate (please use -b:v)) with argument '160k'.
Reading option '-c' ... matched as option 'c' (codec name) with argument 'copy'.
Reading option '-f' ... matched as option 'f' (force format) with argument 'nut'.
Reading option '/dev/null' ... matched as output url.
Finished splitting the commandline.
Parsing a group of options: global .
Applying option y (overwrite output files) with argument 1.
Applying option loglevel (set logging level) with argument trace.
Successfully parsed a group of options.
Parsing a group of options: input url anullsrc.
Applying option f (force format) with argument lavfi.
Applying option t (record or transcode "duration" seconds of audio/video) with argument 1.
Successfully parsed a group of options.
Opening an input file: anullsrc.
detected 8 logical cores
[AVFilterGraph @ 0x55b9e6bc7ee0] query_formats: 2 queried, 3 merged, 0 already done, 0 delayed
[Parsed_anullsrc_0 @ 0x55b9e6bc9260] sample_rate:44100 channel_layout:'stereo' nb_samples:1024
[lavfi @ 0x55b9e6bc71c0] All info found
[lavfi @ 0x55b9e6bc71c0] stream 0: start_time: 0.000 duration: -209146758205323.719
[lavfi @ 0x55b9e6bc71c0] format: start_time: 0.000 duration: -9223372036854.775 bitrate=705 kb/s
Input #0, lavfi, from 'anullsrc':
  Duration: N/A, start: 0.000000, bitrate: 705 kb/s
    Stream #0:0, 1, 1/44100: Audio: pcm_u8, 44100 Hz, stereo, u8, 705 kb/s
Successfully opened the file.
Parsing a group of options: output url /dev/null.
Applying option c:a (codec name) with argument libopus.
Applying option b:a (video bitrate (please use -b:v)) with argument 160k.
Applying option c (codec name) with argument copy.
Applying option f (force format) with argument nut.
Successfully parsed a group of options.
Opening an output file: /dev/null.
[file @ 0x55cd85c1a680] Setting default whitelist 'file,crypto'
Successfully opened the file.
Output #0, nut, to '/dev/null':
  Metadata:
    encoder         : Lavf58.2.103
    Stream #0:0, 0, 1/44100: Audio: pcm_u8 (PUD[8] / 0x8445550), 44100 Hz, stereo, u8, 705 kb/s
Stream mapping:
  Stream #0:0 -> #0:0 (copy)
Press [q] to stop, [?] for help
cur_dts is invalid (this is harmless if it occurs once at the start per stream)
No more output streams to write to, finishing.
size=      88kB time=00:00:00.99 bitrate= 725.9kbits/s speed=1.46e+03x    
video:0kB audio:88kB subtitle:0kB other streams:0kB global headers:0kB muxing overhead: 0.543768%
Input file #0 (anullsrc):
  Input stream #0:0 (audio): 45 packets read (92160 bytes); 
  Total: 45 packets (92160 bytes) demuxed
Output file #0 (/dev/null):
  Output stream #0:0 (audio): 44 packets muxed (90112 bytes); 
  Total: 44 packets (90112 bytes) muxed
0 frames successfully decoded, 0 decoding errors
[AVIOContext @ 0x55cd85c1a800] Statistics: 0 seeks, 2 writeouts

Change History (1)

comment:1 by Carl Eugen Hoyos, 6 years ago

Priority: normalminor
Note: See TracTickets for help on using tickets.