#3361(undetermined:new): aac_he mono not recogized (reported as stereo)
#3361: aac_he mono not recogized (reported as stereo) -------------------------------------+------------------------------------- Reporter: blacktrash | Type: defect Status: new | Priority: normal Component: | Version: git- undetermined | master Keywords: | Blocked By: Blocking: | Reproduced by developer: 0 Analyzed by developer: 0 | -------------------------------------+------------------------------------- Summary of the bug: Channel count and channel layout for aac_he mono is always reported (decoded?) as stereo. How to reproduce: {{{ ffmpeg -i in.aiff -c:a libfdk_aac -profile:a aac_he -b:a 32k -ac 1 fdk-he- mono.m4a ffmpeg version N-60230-gcfe282e Copyright (c) 2000-2014 the FFmpeg developers built on Jan 29 2014 14:17:03 with Apple LLVM version 5.0 (clang-500.2.79) (based on LLVM 3.3svn) configuration: --enable-gpl --enable-version3 --enable-nonfree --disable-network --disable-ffserver --enable-shared --enable-libfdk-aac --enable-libx264 --enable-libxvid --enable-libfaac --enable-libmp3lame --enable-libtheora --enable-libvorbis --enable-libvpx --enable-librtmp --extra-cflags=-I/sw/include --extra-libs=-L/sw/lib libavutil 52. 63.100 / 52. 63.100 libavcodec 55. 49.101 / 55. 49.101 libavformat 55. 28.101 / 55. 28.101 libavdevice 55. 7.100 / 55. 7.100 libavfilter 4. 1.101 / 4. 1.101 libswscale 2. 5.101 / 2. 5.101 libswresample 0. 17.104 / 0. 17.104 libpostproc 52. 3.100 / 52. 3.100 Guessed Channel Layout for Input Stream #0.0 : stereo Input #0, aiff, from 'in.aiff': Duration: 00:00:30.43, start: 0.000000, bitrate: 1411 kb/s Stream #0:0: Audio: pcm_s16le (sowt / 0x74776F73), 44100 Hz, stereo, s16, 1411 kb/s Output #0, ipod, to 'fdk-he-mono.m4a': Metadata: encoder : Lavf55.28.101 Stream #0:0: Audio: aac (libfdk_aac) (HE-AAC) (mp4a / 0x6134706D), 44100 Hz, mono, s16, 32 kb/s Stream mapping: Stream #0:0 -> #0:0 (pcm_s16le -> libfdk_aac) Press [q] to stop, [?] for help size= 123kB time=00:00:30.44 bitrate= 33.0kbits/s video:0kB audio:119kB subtitle:0 global headers:0kB muxing overhead 2.760628% ~/Music/Blacktrash$ ffprobe -show_streams fdk-he-mono.m4a 2>/dev/null | fgrep chan channels=2 channel_layout=stereo }}} Mono in normal profile is recognized correctly: {{{ ffmpeg -i in.aiff -c:a libfdk_aac -b:a 32k -ac 1 fdk-mono.m4a ffmpeg version N-60230-gcfe282e Copyright (c) 2000-2014 the FFmpeg developers built on Jan 29 2014 14:17:03 with Apple LLVM version 5.0 (clang-500.2.79) (based on LLVM 3.3svn) configuration: --enable-gpl --enable-version3 --enable-nonfree --disable-network --disable-ffserver --enable-shared --enable-libfdk-aac --enable-libx264 --enable-libxvid --enable-libfaac --enable-libmp3lame --enable-libtheora --enable-libvorbis --enable-libvpx --enable-librtmp --extra-cflags=-I/sw/include --extra-libs=-L/sw/lib libavutil 52. 63.100 / 52. 63.100 libavcodec 55. 49.101 / 55. 49.101 libavformat 55. 28.101 / 55. 28.101 libavdevice 55. 7.100 / 55. 7.100 libavfilter 4. 1.101 / 4. 1.101 libswscale 2. 5.101 / 2. 5.101 libswresample 0. 17.104 / 0. 17.104 libpostproc 52. 3.100 / 52. 3.100 Guessed Channel Layout for Input Stream #0.0 : stereo Input #0, aiff, from 'in.aiff': Duration: 00:00:30.43, start: 0.000000, bitrate: 1411 kb/s Stream #0:0: Audio: pcm_s16le (sowt / 0x74776F73), 44100 Hz, stereo, s16, 1411 kb/s Output #0, ipod, to 'fdk-mono.m4a': Metadata: encoder : Lavf55.28.101 Stream #0:0: Audio: aac (libfdk_aac) (mp4a / 0x6134706D), 44100 Hz, mono, s16, 32 kb/s Stream mapping: Stream #0:0 -> #0:0 (pcm_s16le -> libfdk_aac) Press [q] to stop, [?] for help size= 125kB time=00:00:30.44 bitrate= 33.7kbits/s video:0kB audio:119kB subtitle:0 global headers:0kB muxing overhead 4.902738% ffprobe -show_streams fdk-mono.m4a 2>/dev/null | fgrep chan channels=1 channel_layout=mono }}} I first believed this was a problem with fdk-aac, but a HE-AAC by iTunes yields the same: {{{ $ ffprobe -show_streams itunes-he-mono.m4a 2>/dev/null | fgrep chan channels=2 channel_layout=stereo }}} See also: http://sourceforge.net/p/opencore-amr/mailman/message/31874638/ ff. and: https://lists.ffmpeg.org/pipermail/ffmpeg-user/2014-January/019559.html Note that profile is always diagnosed as {{{unknown}}}: {{{ ffprobe -show_streams fdk-he-mono.m4a 2>/dev/null | fgrep profile profile=unknown ffprobe -show_streams fdk-mono.m4a 2>/dev/null | fgrep profile profile=unknown ffprobe -show_streams itunes-he-mono.m4a 2>/dev/null | fgrep profile profile=unknown }}} -- Ticket URL: <https://trac.ffmpeg.org/ticket/3361> FFmpeg <http://ffmpeg.org> FFmpeg issue tracker
#3361: aac_he mono not recogized (reported as stereo) -------------------------------------+------------------------------------- Reporter: blacktrash | Owner: Type: defect | Status: new Priority: normal | Component: Version: git-master | undetermined Keywords: aac | Resolution: Blocking: | Blocked By: Analyzed by developer: 0 | Reproduced by developer: 0 -------------------------------------+------------------------------------- Changes (by cehoyos): * keywords: => aac Comment: Please provide a short sample. -- Ticket URL: <https://trac.ffmpeg.org/ticket/3361#comment:1> FFmpeg <http://ffmpeg.org> FFmpeg issue tracker
#3361: aac_he mono not recogized (reported as stereo) -------------------------------------+------------------------------------- Reporter: blacktrash | Owner: Type: defect | Status: new Priority: normal | Component: Version: git-master | undetermined Keywords: aac | Resolution: Blocking: | Blocked By: Analyzed by developer: 0 | Reproduced by developer: 0 -------------------------------------+------------------------------------- Comment (by blacktrash): Of the source or of the result? If the result, only the one created by ffmpeg/fdk-aac or also iTunes? -- Ticket URL: <https://trac.ffmpeg.org/ticket/3361#comment:2> FFmpeg <http://ffmpeg.org> FFmpeg issue tracker
#3361: aac_he mono not recogized (reported as stereo) -------------------------------------+------------------------------------- Reporter: blacktrash | Owner: Type: defect | Status: new Priority: normal | Component: Version: git-master | undetermined Keywords: aac | Resolution: Blocking: | Blocked By: Analyzed by developer: 0 | Reproduced by developer: 0 -------------------------------------+------------------------------------- Comment (by cehoyos): A sample that is shown as "mono" in iTunes / QuickTime but "stereo" by FFmpeg seems needed to me. Of course it is *very* useful that you explained how the file was created that FFmpeg has a problem with (and it could be argued that we should do the work) but imo, a sample is generally needed for bug reports. -- Ticket URL: <https://trac.ffmpeg.org/ticket/3361#comment:3> FFmpeg <http://ffmpeg.org> FFmpeg issue tracker
#3361: aac_he mono not recogized (reported as stereo) -------------------------------------+------------------------------------- Reporter: blacktrash | Owner: Type: defect | Status: new Priority: normal | Component: Version: git-master | undetermined Keywords: aac | Resolution: Blocking: | Blocked By: Analyzed by developer: 0 | Reproduced by developer: 0 -------------------------------------+------------------------------------- Comment (by blacktrash): Attached file is reported as mono by QuickTime. You cannot import it into iTunes because for simplicity's sake it was not created with {{{-signaling implicit}}} which would open another can of worms, see: http://sourceforge.net/p/opencore-amr/mailman/message/31876971/ et al -- Ticket URL: <https://trac.ffmpeg.org/ticket/3361#comment:4> FFmpeg <http://ffmpeg.org> FFmpeg issue tracker
#3361: aac_he mono not recogized (reported as stereo) -------------------------------------+------------------------------------- Reporter: blacktrash | Owner: Type: defect | Status: new Priority: important | Component: avcodec Version: git-master | Resolution: Keywords: aac | Blocked By: regression | Reproduced by developer: 0 Blocking: | Analyzed by developer: 0 | -------------------------------------+------------------------------------- Changes (by cehoyos): * keywords: aac => aac regression * priority: normal => important * component: undetermined => avcodec Comment: Martin claims this is a libavcodec regression. -- Ticket URL: <https://trac.ffmpeg.org/ticket/3361#comment:5> FFmpeg <http://ffmpeg.org> FFmpeg issue tracker
#3361: aac_he mono not recogized (reported as stereo) -------------------------------------+------------------------------------- Reporter: blacktrash | Owner: Type: defect | Status: new Priority: important | Component: avcodec Version: git-master | Resolution: Keywords: aac | Blocked By: regression | Reproduced by developer: 0 Blocking: | Analyzed by developer: 0 | -------------------------------------+------------------------------------- Comment (by michael): This fixes it but breaks some reference aac bitstreams we have in fate {{{ diff --git a/libavcodec/mpeg4audio.c b/libavcodec/mpeg4audio.c index 68448e6..e9b908d 100644 --- a/libavcodec/mpeg4audio.c +++ b/libavcodec/mpeg4audio.c @@ -142,6 +142,9 @@ int avpriv_mpeg4audio_get_config(MPEG4AudioConfig *c, const uint8_t *buf, //PS requires SBR if (!c->sbr) c->ps = 0; + if (c->sbr == 1 && c->ps == -1) + c->ps = 0; + //Limit implicit PS to the HE-AACv2 Profile if ((c->ps == -1 && c->object_type != AOT_AAC_LC) || c->channels & ~0x01) c->ps = 0; }}} -- Ticket URL: <https://trac.ffmpeg.org/ticket/3361#comment:6> FFmpeg <http://ffmpeg.org> FFmpeg issue tracker
#3361: aac_he mono not recogized (reported as stereo) -------------------------------------+------------------------------------- Reporter: blacktrash | Owner: Type: defect | Status: new Priority: important | Component: avcodec Version: git-master | Resolution: Keywords: aac | Blocked By: regression | Reproduced by developer: 0 Blocking: | Analyzed by developer: 0 | -------------------------------------+------------------------------------- Comment (by blacktrash): Replying to [comment:6 michael]:
This fixes it but breaks some reference aac bitstreams we have in fate
Are the streams in question aac_he_v2? If yes, the fix should probably contain an excluding conditional, as v2 cannot be mono, see: http://sourceforge.net/p/opencore-amr/mailman/message/31877351/ -- Ticket URL: <https://trac.ffmpeg.org/ticket/3361#comment:7> FFmpeg <http://ffmpeg.org> FFmpeg issue tracker
participants (1)
-
FFmpeg