[FFmpeg-devel] [PATCH v2] avformat/mov: add interleaved_read option
Derek Buitenhuis
derek.buitenhuis at gmail.com
Sun Sep 10 13:48:18 EEST 2023
Hi,
On 9/10/2023 6:51 AM, Zhao Zhili wrote:
> From: Zhao Zhili <zhilizhao at tencent.com>
>
> For bad interleaved files, manually interleave multiple tracks at the
> demuxer level can trigger seeking back and forth, which can be
> dramatically slow depending on the protocol. Demuxer level interleave
> can be useless sometimes, e.g., reading mp4 via http and then
> transcoding/remux to DASH. Disable this option when you don't need the
> demuxer level interleave, and want to avoid the IO penalizes.
>
> This issue is well known. Two samples can be found at here
> http://ffmpeg.org/pipermail/ffmpeg-devel/2022-December/304951.html
Sorry for the slow reply.
> + at item interleaved_read
> +Interleaved read between multiple tracks, enabled by default. For bad interleaved files, manually interleave multiple
> +tracks at the demuxer level can trigger seeking back and forth, which can be dramatically slow depending on the
> +protocol. Disable this option when you don't need the demuxer level interleave, and want to avoid the IO penalizes.
I would write it with a description of what it does, rather than what disabling it would do,
maybe something like:
Interleave packets from multiple tracks at demuxer level. For badly interleaved files, this prevents playback issues
caused by large gaps between packets in different tracks, as MOV/MP4 do not have packet placement requirements.
However, this can cause excessive seeking on very badly interleaved files, due to seeking between tracks, so disabling
it may prevent I/O issues, at the expense of playback.
Again, apologies for forgetting to reply.
- Derek
More information about the ffmpeg-devel
mailing list