Opened 6 years ago

Last modified 6 years ago

#1768 open defect

audio AAC fails at CCE

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

Description

get_che function of aacdec.c file doesn't handle CCE type, as a result, AAC decoder fails to continue decoding. I got "channel element 2.8 is not allocated" error message for my AAC audio.

Attachments (1)

temp.aac (35.0 KB) - added by kaijun61 6 years ago.

Download all attachments as: .zip

Change History (21)

comment:1 Changed 6 years ago by cehoyos

  • Keywords aac added
  • Priority changed from important to normal

Do you think this is a regression? (That would make the ticket important.)

Please provide a sample and please provide a failing command line together with complete, uncut console output.

comment:2 Changed 6 years ago by kaijun61

The bug is apparent, get_che function doesn't handle CCE, return NULL, but I see there is a decode_cce function.

comment:3 Changed 6 years ago by cehoyos

If you want this problem fixed, please provide a sample.

To make this a valid ticket, please provide the ffmpeg command line you used together with complete, uncut console output.

(If the problem is apparent, an even better alternative is of course to post a patch on ffmpeg-devel that fixes this ticket.)

comment:4 follow-up: Changed 6 years ago by kaijun61

I don't have AAC spec. otherwise I can do it.

comment:5 in reply to: ↑ 4 Changed 6 years ago by cehoyos

Replying to kaijun61:

I don't have AAC spec. otherwise I can do it.

ftp://ftp.tnt.uni-hannover.de/pub/MPEG/audio/mpeg4/documents/

comment:6 Changed 6 years ago by kaijun61

ignore swscaler since I don't use it.

root@beagleboard:~# ffmpeg -i temp.aac
[swscaler @ 0x40020] Value 4625196817309499392.000000 for parameter 'srcw' out of range
[swscaler @ 0x40020] Value 4625196817309499392.000000 for parameter 'srch' out of range
[swscaler @ 0x40020] Value 4625196817309499392.000000 for parameter 'dstw' out of range
[swscaler @ 0x40020] Value 4625196817309499392.000000 for parameter 'dsth' out of range
[SWR @ 0x45aa0] Value 4611686018427387904.000000 for parameter 'ich' out of range
[SWR @ 0x45aa0] Value 4611686018427387904.000000 for parameter 'in_channel_count' out of range
[SWR @ 0x45aa0] Value 4611686018427387904.000000 for parameter 'och' out of range
[SWR @ 0x45aa0] Value 4611686018427387904.000000 for parameter 'out_channel_count' out of range
[SWR @ 0x45aa0] Value -4616189618054758400.000000 for parameter 'isf' out of range
[SWR @ 0x45aa0] Value -4616189618054758400.000000 for parameter 'in_sample_fmt' out of range
[SWR @ 0x45aa0] Value -4616189618054758400.000000 for parameter 'osf' out of range
[SWR @ 0x45aa0] Value -4616189618054758400.000000 for parameter 'out_sample_fmt' out of range
[SWR @ 0x45aa0] Value -4616189618054758400.000000 for parameter 'tsf' out of range
[SWR @ 0x45aa0] Value -4616189618054758400.000000 for parameter 'internal_sample_fmt' out of range
[SWR @ 0x45aa0] Value 4625196817309499392.000000 for parameter 'filter_size' out of range
[SWR @ 0x45aa0] Value 4621819117588971520.000000 for parameter 'phase_shift' out of range
ffmpeg version git-2012-09-26-09a4173 Copyright (c) 2000-2012 the FFmpeg developers

built on Sep 27 2012 16:53:20 with gcc 4.5.3 (GCC) 20110311 (prerelease)
configuration: --enable-shared --enable-pthreads --disable-gpl --enable-postproc --enable-avfilter --enable-swscale --enable-swresample --enable-neon --enable-pic --enable-debug=3 --enable-ffmpeg --disable-ffplay --disable-ffprobe --disable-ffserver --cross-prefix=arm-angstrom-linux-gnueabi- --prefix=/usr --disable-x11grab --enable-libspeex --enable-libtheora --enable-libvorbis --disable-libvpx --disable-optimizations --disable-stripping --arch=arm --target-os=linux --enable-cross-compile --extra-cflags=' -fno-omit-frame-pointer -ggdb3 -march=armv7-a -mtune=cortex-a8 -mfpu=neon -mfloat-abi=softfp -mthumb-interwork -mno-thumb --sysroot=/home/tang/Projects/OE/build/tmp/sysroots/armv7a-angstrom-linux-gnueabi' --extra-ldflags='-Wl,-O1 -Wl,--hash-style=gnu' --sysroot=/home/tang/Projects/OE/build/tmp/sysroots/armv7a-angstrom-linux-gnueabi --enable-hardcoded-tables --cpu=cortex-a8
WARNING: library configuration mismatch
avdevice configuration: --enable-shared --enable-pthreads --disable-gpl --enable-postproc --enable-avfilter --enable-swscale --enable-swresample --enable-neon --enable-pic --enable-debug=3 --enable-ffmpeg --disable-ffplay --disable-ffprobe --disable-ffserver --cross-prefix=arm-angstrom-linux-gnueabi- --prefix=/usr --disable-x11grab --disable-libgsm --enable-libmp3lame --enable-libspeex --enable-libtheora --enable-libvorbis --disable-libvpx --disable-optimizations --disable-stripping --arch=arm --target-os=linux --enable-cross-compile --extra-cflags=' -O0 -fno-omit-frame-pointer -ggdb3 -march=armv7-a -mtune=cortex-a8 -mfpu=neon -mfloat-abi=softfp -mthumb-interwork -mno-thumb --sysroot=/home/tang/Projects/OE/build/tmp/sysroots/armv7a-angstrom-linux-gnueabi' --extra-ldflags='-Wl,-O1 -Wl,--hash-style=gnu' --sysroot=/home/tang/Projects/OE/build/tmp/sysroots/armv7a-angstrom-linux-gnueabi --enable-hardcoded-tables --cpu=cortex-a8
avfilter configuration: --enable-shared --enable-pthreads --disable-gpl --enable-postproc --enable-avfilter --enable-swscale --enable-swresample --enable-neon --enable-pic --enable-debug=3 --enable-ffmpeg --disable-ffplay --disable-ffprobe --disable-ffserver --cross-prefix=arm-angstrom-linux-gnueabi- --prefix=/usr --disable-x11grab --disable-libgsm --enable-libmp3lame --enable-libspeex --enable-libtheora --enable-libvorbis --disable-libvpx --disable-optimizations --disable-stripping --arch=arm --target-os=linux --enable-cross-compile --extra-cflags=' -O0 -fno-omit-frame-pointer -ggdb3 -march=armv7-a -mtune=cortex-a8 -mfpu=neon -mfloat-abi=softfp -mthumb-interwork -mno-thumb --sysroot=/home/tang/Projects/OE/build/tmp/sysroots/armv7a-angstrom-linux-gnueabi' --extra-ldflags='-Wl,-O1 -Wl,--hash-style=gnu' --sysroot=/home/tang/Projects/OE/build/tmp/sysroots/armv7a-angstrom-linux-gnueabi --enable-hardcoded-tables --cpu=cortex-a8
swscale configuration: --enable-shared --enable-pthreads --disable-gpl --enable-postproc --enable-avfilter --enable-swscale --enable-swresample --enable-neon --enable-pic --enable-debug=3 --enable-ffmpeg --disable-ffplay --disable-ffprobe --disable-ffserver --cross-prefix=arm-angstrom-linux-gnueabi- --prefix=/usr --disable-x11grab --disable-libgsm --enable-libmp3lame --enable-libspeex --enable-libtheora --enable-libvorbis --disable-libvpx --disable-optimizations --disable-stripping --arch=arm --target-os=linux --enable-cross-compile --extra-cflags=' -O0 -fno-omit-frame-pointer -ggdb3 -march=armv7-a -mtune=cortex-a8 -mfpu=neon -mfloat-abi=softfp -mthumb-interwork -mno-thumb --sysroot=/home/tang/Projects/OE/build/tmp/sysroots/armv7a-angstrom-linux-gnueabi' --extra-ldflags='-Wl,-O1 -Wl,--hash-style=gnu' --sysroot=/home/tang/Projects/OE/build/tmp/sysroots/armv7a-angstrom-linux-gnueabi --enable-hardcoded-tables --cpu=cortex-a8
swresample configuration: --enable-shared --enable-pthreads --disable-gpl --enable-postproc --enable-avfilter --enable-swscale --enable-swresample --enable-neon --enable-pic --enable-debug=3 --enable-ffmpeg --disable-ffplay --disable-ffprobe --disable-ffserver --cross-prefix=arm-angstrom-linux-gnueabi- --prefix=/usr --disable-x11grab --disable-libgsm --enable-libmp3lame --enable-libspeex --enable-libtheora --enable-libvorbis --disable-libvpx --disable-optimizations --disable-stripping --arch=arm --target-os=linux --enable-cross-compile --extra-cflags=' -O0 -fno-omit-frame-pointer -ggdb3 -march=armv7-a -mtune=cortex-a8 -mfpu=neon -mfloat-abi=softfp -mthumb-interwork -mno-thumb --sysroot=/home/tang/Projects/OE/build/tmp/sysroots/armv7a-angstrom-linux-gnueabi' --extra-ldflags='-Wl,-O1 -Wl,--hash-style=gnu' --sysroot=/home/tang/Projects/OE/build/tmp/sysroots/armv7a-angstrom-linux-gnueabi --enable-hardcoded-tables --cpu=cortex-a8
libavutil 51. 73.101 / 51. 73.101
libavcodec 54. 59.100 / 54. 59.100
libavformat 54. 28.101 / 54. 28.101
libavdevice 54. 2.101 / 54. 1.100
libavfilter 3. 17.100 / 3. 2.100
libswscale 2. 1.101 / 2. 1.100
libswresample 0. 15.100 / 0. 15.100

[aac @ 0x4e650] channel element 2.6 is not allocated

Last message repeated 102 times

[aac @ 0x483d0] decoding for stream 0 failed
[aac @ 0x483d0] Could not find codec parameters for stream 0 (Audio: aac, stereo, s16, 130 kb/s): unspecified sample rate
Consider increasing the value for the 'analyzeduration' and 'probesize' options
[aac @ 0x483d0] Estimating duration from bitrate, this may be inaccurate
temp.aac: could not find codec parameters

Changed 6 years ago by kaijun61

comment:7 Changed 6 years ago by cehoyos

  • Component changed from undetermined to avcodec

Which program allows to decode the sample?
QT and faad fail here.

comment:8 Changed 6 years ago by kaijun61

just gstreamer

comment:9 Changed 6 years ago by cehoyos

  • Status changed from new to open

comment:10 Changed 6 years ago by cehoyos

I was unable to play your sample with totem (using GStreamer). Could you post your GStreamer command line that allowed you to play the attached sample?

comment:11 Changed 6 years ago by kaijun61

use ffplay, you can see error.

ffplay test.aac
ffplay version 0.8.12, Copyright (c) 2003-2011 the FFmpeg developers

built on Jun 13 2012 09:57:38 with gcc 4.6.3 20120306 (Red Hat 4.6.3-2)
configuration: --prefix=/usr --bindir=/usr/bin --datadir=/usr/share/ffmpeg --incdir=/usr/include/ffmpeg --libdir=/usr/lib64 --mandir=/usr/share/man --arch=x86_64 --extra-cflags='-O2 -g -pipe -Wall -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector --param=ssp-buffer-size=4 -m64 -mtune=generic' --enable-bzlib --enable-libcelt --enable-libdc1394 --enable-libdirac --enable-libfreetype --enable-libgsm --enable-libmp3lame --enable-libopenjpeg --enable-librtmp --enable-libschroedinger --enable-libspeex --enable-libtheora --enable-libvorbis --enable-libvpx --enable-libx264 --enable-libxvid --enable-x11grab --enable-avfilter --enable-postproc --enable-pthreads --disable-static --enable-shared --enable-gpl --disable-debug --disable-stripping --shlibdir=/usr/lib64 --enable-runtime-cpudetect
libavutil 51. 9. 1 / 51. 9. 1
libavcodec 53. 8. 0 / 53. 8. 0
libavformat 53. 5. 0 / 53. 5. 0
libavdevice 53. 1. 1 / 53. 1. 1
libavfilter 2. 23. 0 / 2. 23. 0
libswscale 2. 0. 0 / 2. 0. 0
libpostproc 51. 2. 0 / 51. 2. 0

[aac @ 0x7f893c0023e0] max_analyze_duration 5000000 reached at 5013333
[aac @ 0x7f893c0023e0] Estimating duration from bitrate, this may be inaccurate
Input #0, aac, from 'test.aac':

Duration: 00:01:12.19, bitrate: 92 kb/s

Stream #0.0: Audio: aac, 48000 Hz, mono, s16, 92 kb/s

[aac @ 0x7f893c0008c0] channel element 2.8 is not allocated=0/0

7.33 A-V: 0.000 s:0.0 aq= 320KB vq= 0KB sq= 0B f=0/0

comment:12 Changed 6 years ago by cehoyos

We all agree that the sample you attached to this ticket cannot be decoded with ffmpeg / does not play with ffplay.

The question is: Is there a software that plays the sample?
I tested QuickTime? and faad, and both failed. You answered that it works with GStreamer, so I tested totem which also fails. If I remember correctly, GStreamer can use different aac decoders (maybe I tested the wrong one), so my question is: How does your GStreamer command line look like that allows you to play back the sample?

comment:13 Changed 6 years ago by kaijun61

No, I didn't say gstreamer works with this sample. Because of this bug, my gstreamer player quited at this point. My gstreamer uses avcodec.

root@beagleboard:~# Gplayer -d test.aac

test.aac

[aac @ 0x47000] max_analyze_duration 5000000 reached at 5013333
[aac @ 0x47000] Estimating duration from bitrate, this may be inaccurate
Input #1, aac, from 'test.aac':

Duration: 00:00:52.23, bitrate: 127 kb/s

Stream #1:0: Audio: aac, 48000 Hz, mono, s16, 127 kb/s

Setting pipeline 0 to PLAYING...

ERROR from element ffdec_aac: Could not decode stream.
Debugging info: gstffmpegdec.c(697): gst_ffmpegauddec_audio_frame (): /GstPipeline:gplayer/ffdec_aac:ffdec_aac:
Decoding of AAC stream by FFMPEG failed.

Setting pipeline to NULL...

ERROR from element ffdemux_mpeg: Internal data stream error.
Debugging info: gstffmpegdemux.c(1364): gst_ffmpegdemux_loop (): /GstPipeline:gplayer/ffdemux_mpeg:ffdemux_mpeg:
streaming stopped, reason error

Setting pipeline 1 to PLAYING...

comment:14 Changed 6 years ago by cehoyos

So could this be an invalid sample that cannot be decoded?

comment:15 Changed 6 years ago by kaijun61

I think the decoder misses CCE handling as I pointed out before, the sample works with TI DSP decoder.

comment:16 Changed 6 years ago by cehoyos

Does the TI DSP decoder allow to save the decoded sample?

comment:17 Changed 6 years ago by kaijun61

No, please go to that piece of code straightforward, don't waste time.

comment:18 Changed 6 years ago by reimar

Let me reformulate the question: Given that FFmpeg behaviour seems to agree with all other AAC decoders, and you cannot even provide a reference sample for how it should be decoded so we can't even properly test anything we implement, nor did you provide a patch nor point to the relevant section in the specification that would show the correct behaviour, why should we waste our time with it?
In particular since it could just as well be a bug in the TI decoder (considering it is the only one behaving that way this seems by far most likely currently)?

comment:19 follow-up: Changed 6 years ago by kaijun61

I don't know AAC standard. But I do know the decoder doesn't handle CCE. If you don't know what CCE does, you don't know how to fix it. More than one people report this issue.

comment:20 in reply to: ↑ 19 Changed 6 years ago by cehoyos

Replying to kaijun61:

More than one people report this issue.

Could you point us to the other reports?

Note: See TracTickets for help on using tickets.