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

Dennis Mungai dmngaie at gmail.com
Mon Jun 24 12:42:33 EEST 2024


On Mon, 24 Jun 2024, 11:24 Martin Storsjö, <martin at martin.st> wrote:

> On Thu, 20 Jun 2024, Dennis Sädtler wrote:
>
> > On 2024-06-20 15:47, Timo Rothenpieler wrote:
> >> On 20/06/2024 15:46, Martin Storsjö wrote:
> >>> 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.
> >>
> >> +1 from me
> >
> > Sounds good to me as well.
>
> Pushed now, thanks for all the input!
>
> // Martin
>



Thanks for the patch, this resolves multiple issues with fragmented output
even when FFmpeg exits suddenly. Retesting shortly with fmp4 + tee
muxer(s).

>


More information about the ffmpeg-devel mailing list