Opened 12 years ago
Closed 2 years ago
#1614 closed defect (fixed)
AAC stream with SBR fails with "channel element 0.1 is not allocated"
Reported by: | iceman12c | Owned by: | |
---|---|---|---|
Priority: | normal | Component: | avcodec |
Version: | git-master | Keywords: | AAC SBR |
Cc: | batguano999@zoho.com | Blocked By: | |
Blocking: | Reproduced by developer: | yes | |
Analyzed by developer: | no |
Description
Summary of the bug:
Getting the following message repeatedly when trying to play the AAC stream with ffplay from master:
[aac @ 0x7ff1c2023800] channel element 0.1 is not allocated
Stream is http://3043.live.streamtheworld.com/SAM04AAC41_SC
This stream works fine in VideoLan VLC player.
How to reproduce:
./ffplay http://3043.live.streamtheworld.com/SAM04AAC41_SC
Attachments (2)
Change History (11)
by , 12 years ago
Attachment: | SAM04AAC41_SC added |
---|
comment:1 by , 12 years ago
Reproduced by developer: | set |
---|---|
Status: | new → open |
Version: | unspecified → git-master |
comment:2 by , 11 years ago
Hi
The "3043.live.streamtheworld.com/SAM04AAC41_SC" stream is no longer active.
Is there an alternative stream to test instead?
Maybe the attached file "SAM04AAC41_SC" corrupt.
Latest FFplay seems to play similar files OK.
Format : AAC
Format/Info : Advanced Audio Codec
Format version : Version 4
Format profile : HE-AACv2 / HE-AAC / LC
Bit rate mode : Variable
Channel(s) : 2 channels / 1 channel / 1 channel
Channel positions : Front: L R / Front: C / Front: C
Sampling rate : 44.1 KHz / 44.1 KHz / 22.05 KHz
@Xubuntu:~/ffmpeg-HEAD-6286bb5$ ./ffplay similar_file.aac
ffplay version 2.2.git-6286bb5 Copyright (c) 2003-2014 the FFmpeg developers
built on Jun 12 2014 21:03:29 with gcc 4.8 (Ubuntu 4.8.2-19ubuntu1)
configuration:
libavutil 52. 89.100 / 52. 89.100
libavcodec 55. 66.100 / 55. 66.100
libavformat 55. 43.100 / 55. 43.100
libavdevice 55. 13.101 / 55. 13.101
libavfilter 4. 8.100 / 4. 8.100
libswscale 2. 6.100 / 2. 6.100
libswresample 0. 19.100 / 0. 19.100
[aac @ 0xb0e026a0] Estimating duration from bitrate, this may be inaccurate
Input #0, aac, from 'similar_file.aac':
Duration: 00:00:32.36, bitrate: 45 kb/s
Stream #0:0: Audio: aac, 44100 Hz, stereo, fltp, 45 kb/s
41.02 M-A: -0.000 fd= 0 aq= 0KB vq= 0KB sq= 0B f=0/0
comment:3 by , 11 years ago
Cc: | added |
---|
comment:5 by , 10 years ago
by , 10 years ago
Attachment: | aac_broken.mp4 added |
---|
comment:7 by , 3 years ago
Recently encountered the same issue, on latest ffmpeg 5.0. I took a look at the attached file to this ticket and it exhibits the same problem as the streams I'm seeing errors on. This "stereo" audio is actually coded as single channel elements instead of 1 channel pair element. From the header we see that it's a typical AAC-LC stereo
5E291 AudioSpecificConfig (2 bytes) 5E291 audioObjectType - 2 (0x2) - AAC - LC (0 bytes) 5E291 audioObjectType: 2 (0x02) - (5 bits) 5E291 samplingFrequencyIndex: 3 (0x3) - (4 bits) - 48000 (0xBB80) 5E292 channelConfiguration: 2 (0x2) - (4 bits) - Front: L R
but the AAC data contains two individual SCEs
0002C 1 (379 bytes) 0002C raw_data_block (379 bytes) 0002C SCE - single_channel_element (184 bytes) 0002C id_syn_ele: 0 (0x0) - (3 bits) - SCE - single_channel_element 0002E SCE - single_channel_element (376 bytes) 000E4 id_syn_ele: 0 (0x0) - (3 bits) - SCE - single_channel_element 00032 END - End (372 bytes) 001A6 id_syn_ele: 7 (0x7) - (3 bits) - END - End 001A6 byte_alignment: 0 (0x0) - (3 bits)
whereas a typica AAC stereo channel pair element would look like this
00913 1 (441 bytes) 00913 raw_data_block (441 bytes) 00913 CPE - channel_pair_element (439 bytes) 00913 id_syn_ele: 1 (0x1) - (3 bits) - CPE - channel_pair_element 00915 FIL - fill_element (438 bytes) 00ACA id_syn_ele: 6 (0x6) - (3 bits) - FIL - fill_element 00916 END - End (438 bytes) 00ACB id_syn_ele: 7 (0x7) - (3 bits) - END - End
comment:8 by , 3 years ago
The parsing code in aacdec_template.c seems to intend to be able to parse stereo from individual single channel elements (SCE), but it seems to trip on a bug when getting to the second SCE.
As a workaround using the fdk_aac decoder will work, but it would be great to fix the AAC decoder in ffmpeg itself to handle such cases.
comment:9 by , 2 years ago
Resolution: | → fixed |
---|---|
Status: | open → closed |
Should be fixed in f9785a78da117be0c66f6d5d58ce7277c7029ae7
For future bug-reports: Please always add complete, uncut console output.