[FFmpeg-devel] [PATCH v2] movenc: Add an option for hiding fragments at the end

Martin Storsjö martin at martin.st
Thu Jun 13 23:48:49 EEST 2024


On Thu, 13 Jun 2024, Gyan Doshi wrote:

> On 2024-06-13 06:20 pm, Martin Storsjö wrote:
>> On Wed, 5 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.
>>> ---
>>> v2: Made the flag implicitly set FF_MOV_FLAG_FRAGMENT (as it makes
>>> no sense without it).
>>>
>>> Updated the description of the flag to "Write a fragmented file that
>>> is converted to non-fragmented at the end".
>>>
>>> Kept the flag named "hide_fragments", but I'm also pondering if we
>>> maybe should go for a name like "hybrid_fragmented" or so, as a
>>> better description of _what_ it produces, as opposed to _how_ it
>>> does things. (One could also consider "hybrid_mp4", but even if mp4
>>> is the main thing, the same also goes for mov and a bunch of other
>>> related formats.)
>>
>> I'd otherwise want to push this, but I'm not entirely satisfied with 
>> the option name quite yet. I'm pondering if we should call it 
>> "hybrid_fragmented" - any opinions, Dennis or Timo?
>
> How about `resilient_mode` or `recoverable`?
> I agree that the how is secondary.

Those are good suggestions as well - but I think I prefer 
"hybrid_fragmented" still.

In theory, I guess one could implement resilient writing in a number of 
different ways, whereas the hybrid fragmented/non-fragmented only is one.

So with a couple other voices agreeing with the name "hybrid_fragmented", 
I'll post a new patch with the option in that form - hopefully you don't 
object to it.

// Martin


More information about the ffmpeg-devel mailing list