#4546 closed defect (fixed)
-acodec copy doesn't work with AAC VBR
Reported by: | ericzutter | Owned by: | |
---|---|---|---|
Priority: | minor | Component: | avformat |
Version: | git-master | Keywords: | AAC mov |
Cc: | Blocked By: | ||
Blocking: | Reproduced by developer: | no | |
Analyzed by developer: | no |
Description
Summary of the bug:
When using "-acodec copy" to extract AAC VBR codec from video, the extracted codec becomes AAC CBR. I use MediaInfo CLI to check if AAC codec is CBR or VBR.
How to reproduce:
- test.mp4 contains an AAC VBR audio codec
- MediaInfo.exe test.mp4 => says "Audio Bitrate mode=variable"
- ffmpeg.exe -i test.mp4 -vn -acodec copy test.m4a
- MediaInfo.exe test.m4a => says "Audio Bitrate mode=constant"
Expected result:
Normally when using '-acodec copy', the "Bitrate mode" on the output should be the same as the input.
My configuration :
I am using ffmpeg.exe 64 bits with Windows 7-64 bits
ffmpeg version N-71899-g6ef3426 Copyright (c) 2000-2015 the FFmpeg developers
built with gcc 4.9.2 (GCC)
configuration: --enable-gpl --enable-version3 --disable-w32threads --enable-avisynth --enable-bzlib --enable-fontconfig --enable-frei0r --enable-gnutls --enable-iconv --enable-libass --enable-libbluray --enable-libbs2b --enable-libcaca --enable-libdcadec --enable-libfreetype --enable-libgme --enable-libgsm --enable-libilbc --enable-libmodplug --enable-libmp3lame --enable-libopencore-amrnb --enable-libopencore-amrwb --enable-libopenjpeg --enable-libopus --enable-librtmp --enable-libschroedinger --enable-libsoxr --enable-libspeex --enable-libtheora --enable-libtwolame --enable-libvidstab --enable-libvo-aacenc --enable-libvo-amrwbenc --enable-libvorbis --enable-libvpx --enable-libwavpack --enable-libwebp --enable-libx264 --enable-libx265 --enable-libxavs --enable-libxvid --enable-lzma --enable-decklink --enable-zlib
libavutil 54. 23.101 / 54. 23.101
libavcodec 56. 37.100 / 56. 37.100
libavformat 56. 31.102 / 56. 31.102
libavdevice 56. 4.100 / 56. 4.100
libavfilter 5. 16.101 / 5. 16.101
libswscale 3. 1.101 / 3. 1.101
libswresample 1. 1.100 / 1. 1.100
libpostproc 53. 3.100 / 53. 3.100
Attachments (2)
Change History (9)
comment:1 by , 10 years ago
Component: | ffmpeg → undetermined |
---|---|
Keywords: | VBR copy removed |
Priority: | important → normal |
Resolution: | → needs_more_info |
Status: | new → closed |
comment:2 by , 10 years ago
Resolution: | needs_more_info |
---|---|
Status: | closed → reopened |
Inputfile test.mp4 has metadata AAC audio bitrate mode=variable.
Ouputfile test.m4a (created using "-acodec copy") has metadata AAC audio bitrate mode=constant.
So test.m4a contains the following:
Metadata : audio bitrate mode=constant
Audio bitstream : audio bitrate mode=variable
When you play test.m4a with an audio player, will the audio player play the audio bitstream as a Constant Bitrate Mode or as a Variable Bitrate Mode ?
Does an audio player use the audio bitrate mode info from the metadata to play an audio file ?
How can I view the correct audio bitrate mode from an audio bitstream when the audio bitrate mode info in the metadata is not correct ?
See here the uncut console output :
ffmpeg.exe -i test.mp4 -vn -acodec copy test.m4a
ffmpeg version N-71899-g6ef3426 Copyright (c) 2000-2015 the FFmpeg developers
built with gcc 4.9.2 (GCC)
configuration: --enable-gpl --enable-version3 --disable-w32threads --enable-avisynth --enable-bzlib --enable-fontconfig --enable-frei0r --enable-gnutls --enable-iconv --enable-libass --enable-libbluray --enable-libbs2b --enable-libcaca --enable-libdcadec --enable-libfreetype --enable-libgme --enable-libgsm --enable-libilbc --enable-libmodplug --enable-libmp3lame --enable-libopencore-amrnb --enable-libopencore-amrwb --enable-libopenjpeg --enable-libopus --enable-librtmp --enable-libschroedinger --enable-libsoxr --enable-libspeex --enable-libtheora --enable-libtwolame --enable-libvidstab --enable-libvo-aacenc --enable-libvo-amrwbenc --enable-libvorbis --enable-libvpx --enable-libwavpack --enable-libwebp --enable-libx264 --enable-libx265 --enable-libxavs --enable-libxvid --enable-lzma --enable-decklink --enable-zlib
libavutil 54. 23.101 / 54. 23.101
libavcodec 56. 37.100 / 56. 37.100
libavformat 56. 31.102 / 56. 31.102
libavdevice 56. 4.100 / 56. 4.100
libavfilter 5. 16.101 / 5. 16.101
libswscale 3. 1.101 / 3. 1.101
libswresample 1. 1.100 / 1. 1.100
libpostproc 53. 3.100 / 53. 3.100
Input #0, mov,mp4,m4a,3gp,3g2,mj2, from 'test.mp4':
Metadata:
major_brand : mp42
minor_version : 0
compatible_brands: isomavc1mp42
creation_time : 2009-05-28 15:09:33
Duration: 00:02:51.47, start: 0.000000, bitrate: 2127 kb/s
Stream #0:0(und): Audio: aac (LC) (mp4a / 0x6134706D), 44100 Hz, stereo, fltp, 125 kb/s (default)
Metadata:
creation_time : 2009-05-28 15:09:33
handler_name : (C) 2007 Google Inc. v08.13.2007.
Stream #0:1(und): Video: h264 (High) (avc1 / 0x31637661), yuv420p, 1280x720 [SAR 1:1 DAR 16:9], 1999 kb/s, 29.97 fps, 29.97 tbr, 30k tbn, 59.94 tbc (default)
Metadata:
creation_time : 2009-05-28 15:09:33
handler_name : (C) 2007 Google Inc. v08.13.2007.
[ipod @ 0000000002dbcbe0] Codec for stream 0 does not use global headers but container format requires global headers
Output #0, ipod, to 'test.m4a':
Metadata:
major_brand : mp42
minor_version : 0
compatible_brands: isomavc1mp42
encoder : Lavf56.31.102
Stream #0:0(und): Audio: aac (mp4a / 0x6134706D), 44100 Hz, stereo, 125 kb/s (default)
Metadata:
creation_time : 2009-05-28 15:09:33
handler_name : (C) 2007 Google Inc. v08.13.2007.
Stream mapping:
Press [q] to stop, ? for help
size= 2651kB time=00:02:51.45 bitrate= 126.7kbits/s
video:0kB audio:2621kB subtitle:0kB other streams:0kB global headers:0kB muxing overhead: 1.128996%
comment:4 by , 10 years ago
Priority: | normal → minor |
---|---|
Version: | unspecified → git-master |
by , 10 years ago
by , 10 years ago
comment:5 by , 10 years ago
I added as attachement the inputfile "test.mp4" and the outputfile "test.m4a".
comment:6 by , 9 years ago
Resolution: | → fixed |
---|---|
Status: | reopened → closed |
Fixed in 4547cf68a0d28c01549f84567e4d39a8b40230e7.
comment:7 by , 9 years ago
Component: | undetermined → avformat |
---|---|
Keywords: | mov added |
Please reopen if you can provide your FFmpeg command line including the complete, uncut console output but please understand that
-acodec copy
does not (and can not) change the AAC bitstream.