[FFmpeg-devel] [PATCH] libavformat/aac: Parse ID3 tags between ADTS frames.

James Almer jamrial at gmail.com
Fri Feb 2 15:52:42 EET 2018

On 2/1/2018 11:37 PM, rshaffer at tunein.com wrote:
> From: Richard Shaffer <rshaffer at tunein.com>
> While rare, ID3 tags may be inserted between ADTS frames. This change enables
> parsing them and setting the appropriate metadata updated event flag.
> ---
> I have encountered a streaming provider that I must support which does this.
> There are indications that it isn't totally off the wall, and that it does
> happen in the wild:
> * https://www.w3.org/TR/mse-byte-stream-format-mpeg-audio/
>   (See specifically sections 3 and 4.)
> * https://github.com/video-dev/hls.js/issues/508
> That being said, the providers that do this are in the minority. It seems most
> streaming providers will do one of the following:
>  1. If using .aac segments inside of HLS, use the #EXTINF for text metadata and
>     use an ID3 tag at the head of the segment for things like timing metadata.
>  2. If streaming raw AAC over HTTP, use Icy metadata.
> Aside from comments on the code, I'd be interested in any opinion about whether
> this is something that should or should not be supported in libavformat.
> Thanks,
> -Richard

Can you provide a sample and add a fate test for this? To avoid
regressions in the future. This demuxer still needs some work.

Use the new probetags() function you added in your other id3v2 test if
the tags between samples in the file are the only ones, or if they
differ in some way from the ones at the beginning of the file, so
ffprobe will report them instead.
Alternatively, see fate-adts-demux in tests/fate/demux.mak

More information about the ffmpeg-devel mailing list