[FFmpeg-trac] #4894(avformat:new): Problem with -acodec copy and AAC VBR
FFmpeg
trac at avcodec.org
Tue Sep 29 20:50:22 CEST 2015
#4894: Problem with -acodec copy and AAC VBR
-------------------------------------+-------------------------------------
Reporter: hgg | Type: defect
Status: new | Priority: minor
Component: avformat | Version: git-
Keywords: AAC | master
variable | Blocked By:
Blocking: | Reproduced by developer: 0
Analyzed by developer: 0 |
-------------------------------------+-------------------------------------
Summary of the bug:
It's an extension of https://trac.ffmpeg.org/ticket/4546
If you extract the AAC VBR track from a file test.m4a to test.aac, then
reinsert it into another file test2.m4a, it becomes an AAC CBR track if we
check the metadata with MediaInfo.
How to reproduce:
{{{
ffmpeg -i test.m4a -vn -acodec copy test.aac
ffmpeg version N-75563-g235381e Copyright (c) 2000-2015 the FFmpeg
developers
built with gcc 4.9.3 (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 55. 2.100 / 55. 2.100
libavcodec 57. 3.100 / 57. 3.100
libavformat 57. 2.100 / 57. 2.100
libavdevice 57. 0.100 / 57. 0.100
libavfilter 6. 8.100 / 6. 8.100
libswscale 4. 0.100 / 4. 0.100
libswresample 2. 0.100 / 2. 0.100
libpostproc 54. 0.100 / 54. 0.100
Input #0, mov,mp4,m4a,3gp,3g2,mj2, from 'test.m4a':
Metadata:
major_brand : M4A
minor_version : 512
compatible_brands: isomiso2
encoder : Lavf57.2.100
gapless_playback: 0
Duration: 00:00:05.02, start: 0.000000, bitrate: 270 kb/s
Stream #0:0(eng): Audio: aac (LC) (mp4a / 0x6134706D), 44100 Hz,
stereo, fltp, 268 kb/s (default)
Metadata:
handler_name : SoundHandler
Output #0, adts, to 'test.aac':
Metadata:
major_brand : M4A
minor_version : 512
compatible_brands: isomiso2
gapless_playback: 0
encoder : Lavf57.2.100
Stream #0:0(eng): Audio: aac (mp4a / 0x6134706D), 44100 Hz, stereo,
268 kb/s (default)
Metadata:
handler_name : SoundHandler
Stream mapping:
Stream #0:0 -> #0:0 (copy)
Press [q] to stop, [?] for help
size= 166kB time=00:00:05.01 bitrate= 270.6kbits/s
video:0kB audio:164kB subtitle:0kB other streams:0kB global headers:0kB
muxing overhead: 0.899406%
}}}
MediaInfo -> AAC Variable
{{{
ffmpeg -i test.aac -vn -acodec copy -bsf:a aac_adtstoasc test2.m4a
ffmpeg version N-75563-g235381e Copyright (c) 2000-2015 the FFmpeg
developers
built with gcc 4.9.3 (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 55. 2.100 / 55. 2.100
libavcodec 57. 3.100 / 57. 3.100
libavformat 57. 2.100 / 57. 2.100
libavdevice 57. 0.100 / 57. 0.100
libavfilter 6. 8.100 / 6. 8.100
libswscale 4. 0.100 / 4. 0.100
libswresample 2. 0.100 / 2. 0.100
libpostproc 54. 0.100 / 54. 0.100
[aac @ 0000000004fd86c0] Estimating duration from bitrate, this may be
inaccurate
Input #0, aac, from 'test.aac':
Duration: 00:00:05.14, bitrate: 264 kb/s
Stream #0:0: Audio: aac (LC), 44100 Hz, stereo, fltp, 264 kb/s
File 'test2.m4a' already exists. Overwrite ? [y/N] y
[ipod @ 000000000507cce0] Codec for stream 0 does not use global headers
but container format requires global headers
Output #0, ipod, to 'test2.m4a':
Metadata:
encoder : Lavf57.2.100
Stream #0:0: Audio: aac (mp4a / 0x6134706D), 44100 Hz, stereo, 264
kb/s
Stream mapping:
Stream #0:0 -> #0:0 (copy)
Press [q] to stop, [?] for help
size= 166kB time=00:00:05.01 bitrate= 270.7kbits/s
video:0kB audio:164kB subtitle:0kB other streams:0kB global headers:0kB
muxing overhead: 0.952347%
}}}
MediaInfo -> AAC Constant
I think the problem is in the way the metadata are created from the raw
AAC track to the m4a file.
--
Ticket URL: <https://trac.ffmpeg.org/ticket/4894>
FFmpeg <https://ffmpeg.org>
FFmpeg issue tracker
More information about the FFmpeg-trac
mailing list