Opened 13 years ago

Closed 12 years ago

#513 closed defect (fixed)

FFMpeg is unable to find the aac codec parameters for mp4 file

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

Description

./ffmpeg -loglevel debug -i Nero32kbps_CBR.mp4

ffmpeg version N-32991-g7c1aba4, Copyright (c) 2000-2011 the FFmpeg developers

built on Sep 27 2011 11:34:31 with gcc 4.5.2
configuration: --enable-debug=3 --disable-stripping --disable-optimizations --disable-asm --enable-gpl --disable-encoders --disable-decoders --disable-bsfs --disable-filters --disable-muxers --disable-hwaccels --disable-indevs --disable-outdevs --disable-devices --disable-protocols --disable-demuxers --disable-parsers --disable-altivec --disable-decoder=vorbis --enable-decoder=mp3 --enable-decoder=aac --enable-parser=aac --enable-parser=mpegaudio --enable-demuxer=aac --enable-demuxer=aiff --enable-demuxer=asf --enable-demuxer=mov --enable-demuxer=mp3 --enable-demuxer=pcm_alaw --enable-demuxer=pcm_f32be --enable-demuxer=pcm_f32le --enable-demuxer=pcm_f64be --enable-demuxer=pcm_f64le --enable-demuxer=pcm_mulaw --enable-demuxer=pcm_s16be --enable-demuxer=pcm_s16le --enable-demuxer=pcm_s24be --enable-demuxer=pcm_s24le --enable-demuxer=pcm_s32be --enable-demuxer=pcm_s32le --enable-demuxer=pcm_s8 --enable-demuxer=pcm_u16be --enable-demuxer=pcm_u16le --enable-demuxer=pcm_u24be --enable-demuxer=pcm_u24le --enable-
libavutil 51. 18. 0 / 51. 18. 0
libavcodec 53. 18. 0 / 53. 18. 0
libavformat 53. 13. 0 / 53. 13. 0
libavdevice 53. 4. 0 / 53. 4. 0
libavfilter 2. 43. 5 / 2. 43. 5
libswscale 2. 1. 0 / 2. 1. 0
libpostproc 51. 2. 0 / 51. 2. 0

[mov,mp4,m4a,3gp,3g2,mj2 @ 0x9fdfaa0] Format mov,mp4,m4a,3gp,3g2,mj2 probed with size=2048 and score=100
[mov,mp4,m4a,3gp,3g2,mj2 @ 0x9fdfaa0] ISO: File Type Major Brand: mp42
[aac @ 0x9fe6350] Unsupported bit depth: 0
[aac @ 0x9fe6350] channel element 0.0 is not allocated

Last message repeated 524 times

[mov,mp4,m4a,3gp,3g2,mj2 @ 0x9fdfaa0] Could not find codec parameters (Audio: aac (mp4a / 0x6134706D), stereo, s16, 32 kb/s)
Input #0, mov,mp4,m4a,3gp,3g2,mj2, from 'Nero32kbps_CBR.mp4':

Metadata:

major_brand : mp42
minor_version : 0
compatible_brands: mp42isom
creation_time : 2006-03-23 15:10:30
artist : WAV
encoder : Nero AAC Codec 4.2.4.8

Duration: 00:00:24.44, start: 0.000000, bitrate: 33 kb/s

Stream #0:0(eng), 525, 1/44100: Audio: aac (mp4a / 0x6134706D), stereo, s16, 32 kb/s
Metadata:

creation_time : 2006-03-23 15:10:30

Stream #0:1(eng), 1, 1/1000: Data: none (mp4s / 0x7334706D)
Metadata:

creation_time : 2006-03-23 15:10:31

Stream #0:2(eng), 1, 1/1000: Data: none (mp4s / 0x7334706D)
Metadata:

creation_time : 2006-03-23 15:10:31

At least one output file must be specified

Attachments (1)

Nero 032 kbps CBR-HE.mp4 (100.3 KB ) - added by Rahul 13 years ago.

Download all attachments as: .zip

Change History (8)

by Rahul, 13 years ago

Attachment: Nero 032 kbps CBR-HE.mp4 added

comment:1 by Carl Eugen Hoyos, 13 years ago

Please upload or point to a sample.

comment:2 by Carl Eugen Hoyos, 13 years ago

Keywords: channel element 0.0 is not allocated Could not find codec parameters removed
Reproduced by developer: set
Status: newopen
Version: gitgit-master

Works (to a certain degree) with mplayer -ac faad.

comment:3 by Carl Eugen Hoyos, 13 years ago

Keywords: aac added

comment:4 by Rahul, 13 years ago

I am using the av_find_streaminfo to find the stream properties and then create frames. But since the call fails we are unable to proceed further. We do not have an option to directly decode the frames using libfaad. Is there something else we can do by just using the ffmpeg api and not using the libfaad?

comment:5 by Carl Eugen Hoyos, 13 years ago

Keywords: mov added
Summary: FFMpeg is unable to find the codec parameters for mp4 fileFFMpeg is unable to find the aac codec parameters for mp4 file

comment:6 by reimar, 13 years ago

How was that file created? It is clearly invalid, it claims the audio is coded as two channels, but there is only one (+ parametric stereo, so it looks like two, but still only one is encoded).
The below patch proves that by fixing playback (but of course will break any non-mono AAC file)

--- a/libavcodec/mpeg4audio.c
+++ b/libavcodec/mpeg4audio.c
@@ -89,6 +89,7 @@ int avpriv_mpeg4audio_get_config(MPEG4AudioConfig *c, const uint8_t *buf,
     c->object_type = get_object_type(&gb);
     c->sample_rate = get_sample_rate(&gb, &c->sampling_index);
     c->chan_config = get_bits(&gb, 4);
+c->chan_config = 1;
     if (c->chan_config < FF_ARRAY_ELEMS(ff_mpeg4audio_channels))
         c->channels = ff_mpeg4audio_channels[c->chan_config];
     c->sbr = -1;

comment:7 by Carl Eugen Hoyos, 12 years ago

Resolution: fixed
Status: openclosed

Fixed by Michael.

Note: See TracTickets for help on using tickets.