[FFmpeg-devel] Chrome not able to playback aac_he_v2 when remuxed from mpegts to mp4 using the aac_adtstoasc bitstream filter

Sergey Volk servolk at chromium.org
Thu Apr 28 19:24:12 CEST 2016


Looks like it's failing here:
https://code.google.com/p/chromium/codesearch#chromium/src/media/filters/ffmpeg_audio_decoder.cc&l=419

Here is the error message I got from Chrome:
[1:9:0428/101459:VERBOSE2:decoder_selector.cc(195)] InitializeDecoder
[1:9:0428/101459:ERROR:ffmpeg_audio_decoder.cc(421)] Audio configuration
specified 2 channels, but FFmpeg thinks the file contains 1 channels

So codec_context_->channels is 1, but Chrome expects it to be 2. And
ffprobe confirms that the generated test.mp4 actually has 2 channels:
  Duration: 00:00:10.16, start: 0.000000, bitrate: 52 kb/s
    Stream #0:0(und): Audio: aac (HE-AACv2) (mp4a / 0x6134706D), 48000 Hz,
stereo, fltp, 51 kb/s (default)

So we need to figure out why avcodec_open2 set channels=1.

On Thu, Apr 28, 2016 at 4:16 AM, Anders Rein <ARein at vizrt.com> wrote:

> Google Chrome is not able to playback aac_he_v2 streams remuxed from
> mpegts to mp4. To reproduce the problem:
>
>
> ffmpeg -f lavfi -i 'aevalsrc=sin(2*PI*t*440)[out0]' -t 10 -movflags
> faststart -c:a libfdk_aac -ac 2 -ar 48000 -profile:a aac_he_v2 -f mpegts
> tmp.ts
>
> ffmpeg -i tmp.ts -c copy -bsf:a aac_adtstoasc test.mp4
>
>
> However if the audio is encoded directly to mp4 it works fine:
>
>
> ffmpeg -f lavfi -i 'aevalsrc=sin(2*PI*t*440)[out0]' -t 10 -movflags
> faststart -c:a libfdk_aac -ac 2 -ar 48000 -profile:a aac_he_v2 -f mp4
> test.mp4
>
>
> It is only when using aac_he_v2 profile that Chrome refuses to playback
> the file. Using the aac_he profile works fine:
>
>
> ffmpeg -f lavfi -i 'aevalsrc=sin(2*PI*t*440)[out0]' -t 10 -movflags
> faststart -c:a libfdk_aac -ac 2 -ar 48000 -profile:a aac_he -f mpegts tmp.ts
>
> ffmpeg -i tmp.ts -c copy -bsf:a aac_adtstoasc test.mp4
>
>
> There seems to be something wrong with the aac_adtstoasc bitstream filter
> that does not account for aac_he_v2. It might be a bug in Chrome as well
> since ffplay is able to playback all the variations without any problem,
> but please note that Chrome IS able to playback the file when it is encoded
> directly.
> _______________________________________________
> ffmpeg-devel mailing list
> ffmpeg-devel at ffmpeg.org
> http://ffmpeg.org/mailman/listinfo/ffmpeg-devel
>


More information about the ffmpeg-devel mailing list