[FFmpeg-devel] one question about aac bitstream in mov container

qw applemax82 at 163.com
Tue Mar 22 11:29:46 CET 2016


Hi,
 
I am reading ffmpeg source code, and confused about the following logic in movenc.c,
 
    if (enc->codec_id == AV_CODEC_ID_AAC && pkt->size > 2 &&
        (AV_RB16(pkt->data) & 0xfff0) == 0xfff0) {
        if (!s->streams[pkt->stream_index]->nb_frames) {
            av_log(s, AV_LOG_ERROR, "Malformed AAC bitstream detected: "
                   "use the audio bitstream filter 'aac_adtstoasc' to fix it "
                   "('-bsf:a aac_adtstoasc' option with ffmpeg)\n");
            return -1;
        }
        av_log(s, AV_LOG_WARNING, "aac bitstream error\n");
    }

If I used default setting to encode audio samples into packets and moved those packets into mp4 container, my transcoding program will report:
 
[mov @ 0xe30a00] Malformed AAC bitstream detected: use the audio bitstream filter 'aac_adtstoasc' to fix it ('-bsf:a aac_adtstoasc' option with ffmpeg)

how to set fdk_aac encoder to code audio samples without the error message?
 
Thanks!
 
B.R.
 
Andrew
 
 
 
 
 
 


More information about the ffmpeg-devel mailing list