Category : aac

here’s a question. When my code goes to ret = avcodec_send_frame(enc_ctx, tmpFrame), sometimes it returns AVERROR(EINVAL). Many people say that the reason is the format of tmpFrame is AV_SAMPLE_FMT_S16, but encoder needs AV_SAMPLE_FMT_FLTP. However, my log shows that tmpFrame->format: 8, tmpFrame->channels: 1, tmpFrame->channel_layout: 4, tmpFrame->sample_rate: 32000, tmpFrame->nb_samples: 1024. Here 8 is the value of AV_SAMPLE_FMT_FLTP. ..

Read more

I’m trying to decode an AAC audio stream in an ADTS container, which is streamed from an external hardware H264 encoder. I’ve parsed out the ADTS and it tells me I’ve got a 2 channel, 44100 AAC Main profile frame. I setup the extra data bytes for the ffmpeg decoder and decode the frame successfully? ..

Read more