[FFmpeg-devel] How to support audio data placed within video data

Anton Khirnov anton at khirnov.net
Thu Nov 28 16:19:16 EET 2024


Quoting Manuel Lauss (2024-11-26 15:25:30)
> Hello,
> 
> I'd like to add some audio support for the old libavformat/smush
> formats (mainly the "ANIM" variants; the "SANM" variant already has
> audio decoding support).
> 
> The audio data (16bit stereo PCM) however is placed at (more or less)
> random places within all the video data, also with no relation to the
> actual video frame it is embedded into (i.e. most files place a few
> hundred ms of audio in the first video frame, while the rest are
> roughly the length of a video frame).
> 
> What is the best way to support this scenario?

Meaning you have to parse the coded bytestream to get the audio? Is
there at least some signalling that audio is present at al?

The options I can think of are:
* parse the bytestream in the demuxer
* write a bitstream filter

-- 
Anton Khirnov


More information about the ffmpeg-devel mailing list