Opened 12 years ago

Last modified 2 years ago

#1737 open defect

ffmpeg detect aac stereo as mono

Reported by: dmitry9 Owned by:
Priority: normal Component: avcodec
Version: git-master Keywords: aac
Cc: Blocked By:
Blocking: Reproduced by developer: yes
Analyzed by developer: no

Description

How to reproduce:

ffprobe -v 9 -loglevel 99 ./audio_aac_stereo_as_mono.mp4
ffprobe version N-44445-ge332947 Copyright (c) 2007-2012 the FFmpeg developers
  built on Sep 14 2012 14:05:18 with gcc 4.6 (Ubuntu/Linaro 4.6.3-1ubuntu5)
  configuration: --cc='gcc -O2 -m64 -mtune=core2 -pipe' --enable-version3 --enable-libfaac --enable-libx264 --enable-pthreads --enable-gpl --enable-nonfree --enable-librtmp --enable-shared --enable-filter=movie --enable-avfilter --enable-libspeex --enable-libopencore-amrnb --enable-libopencore-amrwb --enable-libtheora --enable-libvorbis --enable-libvpx --enable-libaacplus --enable-libvo-aacenc
  libavutil      51. 73.100 / 51. 73.100
  libavcodec     54. 55.100 / 54. 55.100
  libavformat    54. 27.100 / 54. 27.100
  libavdevice    54.  2.100 / 54.  2.100
  libavfilter     3. 16.103 /  3. 16.103
  libswscale      2.  1.101 /  2.  1.101
  libswresample   0. 15.100 /  0. 15.100
  libpostproc    52.  0.100 / 52.  0.100
[mov,mp4,m4a,3gp,3g2,mj2 @ 0x17953c0] Format mov,mp4,m4a,3gp,3g2,mj2 probed with size=2048 and score=100
[mov,mp4,m4a,3gp,3g2,mj2 @ 0x17953c0] ISO: File Type Major Brand: isom
[mov,mp4,m4a,3gp,3g2,mj2 @ 0x17953c0] File position before avformat_find_stream_info() is 1175362
[aac @ 0x179cc60] channel element 0.0 is not allocated
[mov,mp4,m4a,3gp,3g2,mj2 @ 0x17953c0] All info found
[mov,mp4,m4a,3gp,3g2,mj2 @ 0x17953c0] File position after avformat_find_stream_info() is 143323
Input #0, mov,mp4,m4a,3gp,3g2,mj2, from './audio_aac_stereo_as_mono.mp4':
  Metadata:
    major_brand     : isom
    minor_version   : 512
    compatible_brands: isomiso2avc1mp41
    title           : Teradek stream
    encoder         : Lavf54.27.100
    copyright       : Teradek
  Duration: 00:00:21.05, start: 0.000000, bitrate: 446 kb/s
    Stream #0:0(und), 41, 1/1000: Video: h264 (High) (avc1 / 0x31637661), yuv420p, 360x240 [SAR 32:27 DAR 16:9], 1/50, 407 kb/s, 23.86 fps, 25 tbr, 1k tbn, 50 tbc
    Metadata:
      handler_name    : VideoHandler
    Stream #0:1(und), 120, 1/48000: Audio: aac (mp4a / 0x6134706D), 48000 Hz, mono, s16, 32 kb/s
    Metadata:
      handler_name    : SoundHandler
[h264 @ 0x179bc00] detected 8 logical cores
[AVIOContext @ 0x179da40] Statistics: 214912 bytes read, 2 seeks

Attach log for:

ffmpeg -v 9 -loglevel 99 -i ./audio_aac_stereo_as_mono.mp4 -vcodec copy -acodec libfaac -ar 22050 -report -f mp4 /tmp/aaa3.mp4

Attachments (2)

audio_aac_stereo_as_mono.mp4 (1.1 MB ) - added by dmitry9 12 years ago.
ffmpeg-20120914-161147.log (171.0 KB ) - added by dmitry9 12 years ago.

Download all attachments as: .zip

Change History (6)

by dmitry9, 12 years ago

by dmitry9, 12 years ago

Attachment: ffmpeg-20120914-161147.log added

comment:1 by Carl Eugen Hoyos, 12 years ago

Priority: importantnormal

Do you think this is a regression?

QuickTime also detects the audio stream as mono.

comment:2 by dmitry9, 12 years ago

  • QuickTime detect audio stream as Mono, 48000 and when play sound crackles.
  • MEncoder detect stream as stereo(2ch) and successfully transcode to mp3. Play sound normal.
     mencoder /tmp/audio_aac_stereo_as_mono.mp4 -oac mp3lame -ovc x264 -o /tmp/out.avi
    MEncoder SVN-r1.0~rc3+svn20090426-4.4.3 (C) 2000-2009 MPlayer Team
    
    WARNING: OUTPUT FILE FORMAT IS _AVI_. See -of help.
    success: format: 0  data: 0x0 - 0x11ef42
    libavformat file format detected.
    [lavf] Video stream found, -vid 0
    [lavf] Audio stream found, -aid 1
    VIDEO:  [avc1]  360x240  24bpp  25.000 fps    0.0 kbps ( 0.0 kbyte/s)
    [V] filefmt:44  fourcc:0x31637661  size:360x240  fps:25.000  ftime:=0.0400
    ==========================================================================
    Opening audio decoder: [faad] AAC (MPEG2/4 Advanced Audio Coding)
    FAAD: compressed input bitrate missing, assuming 128kbit/s!
    AUDIO: 48000 Hz, 2 ch, s16le, 128.0 kbit/8.33% (ratio: 16000->192000)
    Selected audio codec: [faad] afm: faad (FAAD AAC (MPEG-2/MPEG-4 Audio))
    ==========================================================================
    Opening video filter: [expand osd=1]
    Expand: -1 x -1, -1 ; -1, osd: 1, aspect: 0.000000, round: 1
    ==========================================================================
    Opening video decoder: [ffmpeg] FFmpeg's libavcodec codec family
    Selected video codec: [ffh264] vfm: ffmpeg (FFmpeg H.264)
    ==========================================================================
    MP3 audio selected.
    
  • cvlc

VLC media player 1.0.6 Goldeneye when play detect:
[0x7f2acc00e1e8] pulse audio output: No. of Audio Channels: 2

  • ffmpeg when try change rate 48000 -> 22050: sound output broken. Please see log file in attachment ffmpeg-20120914-161147.log

comment:3 by Carl Eugen Hoyos, 12 years ago

Reproduced by developer: set
Status: newopen

It also works as "good" with a non-ancient version of MPlayer with -ac faad. "good" is relative since the original sample is white-noise only iiuc.

comment:4 by Balling, 2 years ago

Mediainfo says Channel layout: C but of course that does not mean it cannot change 100 samples in like in al_sbr_ps_06_new.mp4.

Last edited 2 years ago by Balling (previous) (diff)
Note: See TracTickets for help on using tickets.