[FFmpeg-user] HE-AAC: mono not recognized

Christian Ebert blacktrash at gmx.net
Fri Jan 24 11:02:26 CET 2014


Hi,

HE-AAC is seen as stereo by ffprobe and also ffmpeg:

$ ffmpeg -i in.aiff -c:a libfdk_aac -profile:a aac_he -b:a 32k -ac 1 fdk-he-mono.m4a
ffmpeg version N-60118-g4d888a0 Copyright (c) 2000-2014 the FFmpeg developers
  built on Jan 23 2014 21:13:13 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.100 / 55. 49.100
  libavformat    55. 25.101 / 55. 25.101
  libavdevice    55.  5.102 / 55.  5.102
  libavfilter     4.  1.100 /  4.  1.100
  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.25.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%
$ ffprobe -show_streams fdk-he-mono.m4a 2>/dev/null | fgrep chan
channels=2
channel_layout=stereo

Omitting HE leads to correct diagnosis:

$ ffmpeg -i in.aiff -c:a libfdk_aac -b:a 32k -ac 1 fdk-mono.m4a
ffmpeg version N-60118-g4d888a0 Copyright (c) 2000-2014 the FFmpeg developers
  built on Jan 23 2014 21:13:13 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.100 / 55. 49.100
  libavformat    55. 25.101 / 55. 25.101
  libavdevice    55.  5.102 / 55.  5.102
  libavfilter     4.  1.100 /  4.  1.100
  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.25.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.

-- 
theatre - books - texts - movies
Black Trash Productions at home: http://www.blacktrash.org
Black Trash Productions on Facebook:
http://www.facebook.com/blacktrashproductions


More information about the ffmpeg-user mailing list