Opened 5 years ago

Closed 5 years ago

Last modified 5 years ago

#478 closed defect (invalid)

Audio bitrate parameter is ignored or inconsistent

Reported by: Alex__ Owned by:
Priority: normal Component: undetermined
Version: unspecified Keywords:
Cc: Blocked By:
Blocking: Reproduced by developer: no
Analyzed by developer: no

Description

Steps that will reproduce the problem?
ffmpeg -t 1 -i multitrack.mov -ar 48000 -ab 128k multitrack.m4v

What is the expected result?
Audio track(s) with 128k bit rate or the ffmpeg output should state that the bitrate will not be 128k.

What happens instead?
Bitrate is 71k - even though the sampling rate was updated and the ffmpeg console output states that the file will have 128k bitrate audio.

Possible workaround:
-

Any additional information:
Sample file from http://samples.mplayerhq.hu:

$ ffmpeg -t 1 -i multitrack.mov -ar 48000 -ab 128k multitrack.m4v
ffmpeg version git-2011-09-16-41215fd, Copyright (c) 2000-2011 the FFmpeg developers
  built on Sep 16 2011 08:10:56 with clang 2.1 (tags/Apple/clang-163.7.1)
  configuration: --enable-libfaac --enable-libx264 --enable-gpl --enable-nonfree --enable-libmp3lame --enable-libtheora --enable-libvorbis --enable-libvpx --enable-libxvid --cc=clang
  libavutil    51. 16. 0 / 51. 16. 0
  libavcodec   53. 15. 0 / 53. 15. 0
  libavformat  53. 12. 0 / 53. 12. 0
  libavdevice  53.  3. 0 / 53.  3. 0
  libavfilter   2. 42. 0 /  2. 42. 0
  libswscale    2.  1. 0 /  2.  1. 0
  libpostproc  51.  2. 0 / 51.  2. 0

Seems stream 0 codec frame rate differs from container frame rate: 600.00 (600/1) -> 4.00 (4/1)
Input #0, mov,mp4,m4a,3gp,3g2,mj2, from 'multitrack.mov':
  Metadata:
    creation_time   : 2003-11-24 18:16:14
    artist          : MAXON Computer, Inc.
    artist-eng      : MAXON Computer, Inc.
    copyright       : 2003 MAXON Computer, Inc.
    copyright-eng   : 2003 MAXON Computer, Inc.
    album           : Sketch and Toon R1 Tutorial
    album-eng       : Sketch and Toon R1 Tutorial
    encoder         : Encoded with Cleaner 5
    encoder-eng     : Encoded with Cleaner 5
  Duration: 00:06:39.25, start: 0.000000, bitrate: 394 kb/s
    Stream #0.0(eng): Video: qtrle (rle  / 0x20656C72), rgb24, 720x486, 223 kb/s, 4 fps, 4 tbr, 600 tbn, 600 tbc
    Metadata:
      creation_time   : 2003-11-24 18:16:14
    Stream #0.1(eng): Audio: mp3 (.mp3 / 0x33706D2E), 22050 Hz, 1 channels, s16, 24 kb/s
    Metadata:
      creation_time   : 2003-11-24 18:16:14
    Stream #0.2(eng): Audio: mp3 (ms[0]U / 0x5500736D), 44100 Hz, 1 channels, s16, 128 kb/s
    Metadata:
      creation_time   : 2003-11-24 18:16:14
Incompatible pixel format 'rgb24' for codec 'libx264', auto-selecting format 'yuv420p'
[buffer @ 0x7fb443c22c00] w:720 h:486 pixfmt:rgb24 tb:1/1000000 sar:0/1 sws_param:
[buffersink @ 0x7fb443c22e60] auto-inserting filter 'auto-inserted scaler 0' between the filter 'src' and the filter 'out'
[scale @ 0x7fb443c23280] w:720 h:486 fmt:rgb24 -> w:720 h:486 fmt:yuv420p flags:0x4
[libx264 @ 0x7fb44405f000] using cpu capabilities: MMX2 SSE2Fast SSSE3 FastShuffle SSE4.1 Cache64
[libx264 @ 0x7fb44405f000] profile High, level 2.2
[libx264 @ 0x7fb44405f000] 264 - core 116 - H.264/MPEG-4 AVC codec - Copyleft 2003-2011 - http://www.videolan.org/x264.html - options: cabac=1 ref=3 deblock=1:0:0 analyse=0x3:0x113 me=hex subme=7 psy=1 psy_rd=1.00:0.00 mixed_ref=1 me_range=16 chroma_me=1 trellis=1 8x8dct=1 cqm=0 deadzone=21,11 fast_pskip=1 chroma_qp_offset=-2 threads=3 sliced_threads=0 nr=0 decimate=1 interlaced=0 bluray_compat=0 constrained_intra=0 bframes=3 b_pyramid=2 b_adapt=1 b_bias=0 direct=1 weightb=1 open_gop=0 weightp=2 keyint=250 keyint_min=4 scenecut=40 intra_refresh=0 rc_lookahead=40 rc=crf mbtree=1 crf=23.0 qcomp=0.60 qpmin=0 qpmax=69 qpstep=4 ip_ratio=1.40 aq=1:1.00
Output #0, ipod, to 'multitrack.m4v':
  Metadata:
    creation_time   : 2003-11-24 18:16:14
    artist          : MAXON Computer, Inc.
    artist-eng      : MAXON Computer, Inc.
    copyright       : 2003 MAXON Computer, Inc.
    copyright-eng   : 2003 MAXON Computer, Inc.
    album           : Sketch and Toon R1 Tutorial
    album-eng       : Sketch and Toon R1 Tutorial
    encoder-eng     : Encoded with Cleaner 5
    encoder         : Lavf53.12.0
    Stream #0.0(eng): Video: h264 (avc1 / 0x31637661), yuv420p, 720x486, q=-1--1, 4 tbn, 4 tbc
    Metadata:
      creation_time   : 2003-11-24 18:16:14
    Stream #0.1(eng): Audio: aac (mp4a / 0x6134706D), 48000 Hz, 1 channels, s16, 128 kb/s
    Metadata:
      creation_time   : 2003-11-24 18:16:14
Stream mapping:
  Stream #0.0 -> #0.0 (qtrle -> libx264)
  Stream #0.1 -> #0.1 (mp3 -> libfaac)
Press [q] to stop, [?] for help
frame=    4 fps=  0 q=-1.0 Lsize=      37kB time=00:00:00.50 bitrate= 609.6kbits/s    

video:26kB audio:9kB global headers:0kB muxing overhead 5.123324%
frame I:1     Avg QP:13.37  size: 26050
[libx264 @ 0x7fb44405f000] frame P:1     Avg QP:27.39  size:    66
[libx264 @ 0x7fb44405f000] frame B:2     Avg QP:18.93  size:    56
[libx264 @ 0x7fb44405f000] consecutive B-frames: 25.0%  0.0% 75.0%  0.0%
[libx264 @ 0x7fb44405f000] mb I  I16..4: 22.1% 53.3% 24.6%
[libx264 @ 0x7fb44405f000] mb P  I16..4:  0.0%  0.0%  0.0%  P16..4:  1.0%  0.1%  0.0%  0.0%  0.0%    skip:98.9%
[libx264 @ 0x7fb44405f000] mb B  I16..4:  0.0%  0.0%  0.0%  B16..8:  1.8%  0.0%  0.0%  direct: 0.0%  skip:98.2%  L0: 8.0% L1:92.0% BI: 0.0%
[libx264 @ 0x7fb44405f000] 8x8 transform intra:53.3% inter:40.0%
[libx264 @ 0x7fb44405f000] coded y,uvDC,uvAC intra: 65.2% 28.1% 22.1% inter: 0.0% 0.0% 0.0%
[libx264 @ 0x7fb44405f000] i16 v,h,dc,p: 62% 31%  4%  2%
[libx264 @ 0x7fb44405f000] i8 v,h,dc,ddl,ddr,vr,hd,vl,hu: 18% 17% 32%  7%  5%  4%  5%  6%  6%
[libx264 @ 0x7fb44405f000] i4 v,h,dc,ddl,ddr,vr,hd,vl,hu: 23% 15% 17%  9%  7%  7%  8%  8%  4%
[libx264 @ 0x7fb44405f000] i8c dc,h,v,p: 71% 21%  7%  2%
[libx264 @ 0x7fb44405f000] Weighted P-Frames: Y:0.0% UV:0.0%
[libx264 @ 0x7fb44405f000] ref B L1: 95.7%  4.3%
[libx264 @ 0x7fb44405f000] kb/s:209.82
$ ffmpeg -i multitrack.m4v 
ffmpeg version git-2011-09-16-41215fd, Copyright (c) 2000-2011 the FFmpeg developers
  built on Sep 16 2011 08:10:56 with clang 2.1 (tags/Apple/clang-163.7.1)
  configuration: --enable-libfaac --enable-libx264 --enable-gpl --enable-nonfree --enable-libmp3lame --enable-libtheora --enable-libvorbis --enable-libvpx --enable-libxvid --cc=clang
  libavutil    51. 16. 0 / 51. 16. 0
  libavcodec   53. 15. 0 / 53. 15. 0
  libavformat  53. 12. 0 / 53. 12. 0
  libavdevice  53.  3. 0 / 53.  3. 0
  libavfilter   2. 42. 0 /  2. 42. 0
  libswscale    2.  1. 0 /  2.  1. 0
  libpostproc  51.  2. 0 / 51.  2. 0
Input #0, mov,mp4,m4a,3gp,3g2,mj2, from 'multitrack.m4v':
  Metadata:
    major_brand     : M4V 
    minor_version   : 512
    compatible_brands: isomiso2avc1
    creation_time   : 2003-11-23 23:00:00
    artist          : MAXON Computer, Inc.
    album           : Sketch and Toon R1 Tutorial
    encoder         : Lavf53.12.0
    copyright       : 2003 MAXON Computer, Inc.
  Duration: 00:00:01.04, start: 0.000000, bitrate: 291 kb/s
    Stream #0.0(eng): Video: h264 (High) (avc1 / 0x31637661), yuv420p, 720x486, 215 kb/s, 4 fps, 4 tbr, 4 tbn, 8 tbc
    Metadata:
      creation_time   : 2003-11-23 23:00:00
    Stream #0.1(eng): Audio: aac (mp4a / 0x6134706D), 48000 Hz, mono, s16, 71 kb/s
    Metadata:
      creation_time   : 2003-11-23 23:00:00
At least one output file must be specified
$

Change History (4)

comment:1 Changed 5 years ago by cehoyos

  • Resolution set to invalid
  • Status changed from new to closed

Please test

$ ffmpeg -i multitrack.mov out.wav
$ faac -q 500 out.wav -o outfaac.aac

comment:2 Changed 5 years ago by Alex__

Ok, you mean it's an expected behavior that the output is not scaled up?

comment:3 Changed 5 years ago by cehoyos

I mean that libfaac (an external library) using the highest possible quality cannot exceed a certain bitrate for a given sample, in your case that is approximately 70kb.

comment:4 Changed 5 years ago by Alex__

Ok, thank you.

Note: See TracTickets for help on using tickets.