[Libav-user] Hard time encoding AAC (works for MP3) - what settings are needed?
Jesper Taxbøl
jesper at taxboel.dk
Wed Aug 26 22:55:00 EEST 2020
I am struggling to make AAC encoding work with libav.
I have an example working for MP3. But I can't seem to figure out what is
needed to make AAC encoding work. I get a whole bunch of errors when
playing my encoder output.
I suspect I need some extra configuration for encoder context, but I have
not been able to find hints that can help me.
I have made a repo here with my code:
https://github.com/taxfromdk/audio_encode_test.git
The juicy code is here:
https://github.com/taxfromdk/audio_encode_test/blob/master/encode_audio.cpp
It can be run by checking the project out out and run "make test"
I suspect it could be related to my workflow, so I will just note that I
test the output data by creating a file with either the extension .aac or
.mp3 where I dump the raw encoded packages and play through ffplay.
I am on ffmpeg version n4.3.1 under Arch linux.
The output from ffplay in case of the AAC file is listed below.
I would appreciate pointers to what is needed for the codec context to spit
out working AAC, as I need it to accompany some video. :)
Kind regards
Jesper
------
ffplay raw.aac -autoexit
ffplay version n4.3.1 Copyright (c) 2003-2020 the FFmpeg developers
[aac @ 0x7fe6f8000bc0] Format aac detected only with low score of 1,
misdetection possible!
[aac @ 0x7fe6f8002600] Error decoding AAC frame header.
[aac @ 0x7fe6f8002600] More than one AAC RDB per ADTS frame is not
implemented. Update your FFmpeg version to the newest one from Git. If the
problem still o
ccurs, it means that your file has a feature which has not been
implemented.
[aac @ 0x7fe6f8002600] Sample rate index in program config element does not
match the sample rate index configured by the container.
[aac @ 0x7fe6f8002600] Inconsistent channel configuration.
[aac @ 0x7fe6f8002600] get_buffer() failed
[aac @ 0x7fe6f8002600] invalid band type
[aac @ 0x7fe6f8002600] channel element 2.14 is not allocated
[aac @ 0x7fe6f8002600] Sample rate index in program config element does not
match the sample rate index configured by the container.
[aac @ 0x7fe6f8002600] Too large remapped id is not implemented. Update
your FFmpeg version to the newest one from Git. If the problem still
occurs, it means
that your file has a feature which has not been implemented.
[aac @ 0x7fe6f8002600] If you want to help, upload a sample of this file to
https://streams.videolan.org/upload/ and contact the ffmpeg-devel mailing
list. (
ffmpeg-devel at ffmpeg.org)
[aac @ 0x7fe6f8002600] Multiple frames in a packet.
[aac @ 0x7fe6f8002600] Reserved bit set.
[aac @ 0x7fe6f8002600] Number of scalefactor bands in group (58) exceeds
limit (47).
[aac @ 0x7fe6f8002600] Reserved bit set.
[aac @ 0x7fe6f8002600] Number of bands (24) exceeds limit (22).
[aac @ 0x7fe6f8002600] channel element 1.0 is not allocated
[aac @ 0x7fe6f8002600] Reserved bit set.
[aac @ 0x7fe6f8002600] Number of scalefactor bands in group (15) exceeds
limit (12).
[aac @ 0x7fe6f8002600] channel element 1.10 is not allocated
[aac @ 0x7fe6f8002600] SBR was found before the first channel element.
[aac @ 0x7fe6f8002600] channel element 3.6 is not allocated
[aac @ 0x7fe6f8000bc0] Packet corrupt (stream = 0, dts = NOPTS).
[aac @ 0x7fe6f8002600] Sample rate index in program config element does not
match the sample rate index configured by the container.
[aac @ 0x7fe6f8002600] Inconsistent channel configuration.
[aac @ 0x7fe6f8002600] get_buffer() failed
[aac @ 0x7fe6f8002600] channel element 3.14 is not allocated
[aac @ 0x7fe6f8002600] Sample rate index in program config element does not
match the sample rate index configured by the container.
[aac @ 0x7fe6f8002600] Inconsistent channel configuration.
[aac @ 0x7fe6f8002600] get_buffer() failed
[aac @ 0x7fe6f8000bc0] decoding for stream 0 failed
[aac @ 0x7fe6f8000bc0] Estimating duration from bitrate, this may be
inaccurate
[aac @ 0x7fe6f8000bc0] Could not find codec parameters for stream 0 (Audio:
aac (Main), mono, fltp, 58 kb/s): unspecified sample rate
Consider increasing the value for the 'analyzeduration' and 'probesize'
options
Input #0, aac, from 'raw.aac':
Duration: 00:00:04.26, bitrate: 58 kb/s
Stream #0:0: Audio: aac (Main), mono, fltp, 58 kb/s
Failed to open file 'raw.aac' or configure filtergraph
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://ffmpeg.org/pipermail/libav-user/attachments/20200826/c26b387f/attachment.html>
More information about the Libav-user
mailing list