[FFmpeg-devel] [PATCH v3] movenc: Add an option for resilient, hybrid fragmented/non-fragmented muxing

Martin Storsjö martin at martin.st
Thu Jun 20 16:46:17 EEST 2024


On Wed, 19 Jun 2024, Martin Storsjö wrote:

> This allows ending up with a normal, non-fragmented file when
> the file is finished, while keeping the file readable if writing
> is aborted abruptly at any point. (Normally when writing a
> mov/mp4 file, the unfinished file is completely useless unless it
> is finished properly.)
>
> This results in a file where the mdat atom contains (and hides)
> all the moof atoms that were part of the fragmented file structure
> initially.
> ---
> v3: Renamed the option to hybrid_fragmented.
> ---
> doc/muxers.texi                | 11 ++++++
> libavformat/movenc.c           | 62 +++++++++++++++++++++++++++++++---
> libavformat/movenc.h           |  4 ++-
> libavformat/version.h          |  4 +--
> tests/fate/lavf-container.mak  |  3 +-
> tests/ref/lavf/mov_hybrid_frag |  3 ++
> 6 files changed, 78 insertions(+), 9 deletions(-)
> create mode 100644 tests/ref/lavf/mov_hybrid_frag

If there are no more comments on this one, I'll go ahead and push it soon.

// Martin


More information about the ffmpeg-devel mailing list