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

Dennis Sädtler dennis at obsproject.com
Mon Jun 3 12:38:59 EEST 2024


On 2024-06-03 09:51, Martin Storsjö wrote:
>> Finally, I've also had a somewhat cursed thought about having a 
>> second always-hidden ftyp before the initial moov, which would then 
>> allow you to use the same file for progressive download and DASH/HLS 
>> streaming by using range-requests (e.g. via BYTERANGE) to skip the 
>> first ftyp + mdat header for the init segment and then using the 
>> fragments as normal. Though that goes beyond the scope of this patch, 
>> I just had to get it out there in case anybody thinks that might 
>> actually be fun to try :P
>
> Oh, that sounds quite cursed indeed. I definitely can see the appeal 
> of it :-) I guess it'd require some custom tooling to parse out the 
> relevant byte ranges from it though (or maybe just listening to the 
> avio marker callbacks?).

It would at least require the DASH/HLS manifest creation tooling to 
understand this hack and skip the first N bytes. As I said this is kind 
of a fun idea but maybe not entirely practical.

> Anyway, Timo had thoughts about the name for this option/flag - do you 
> have any suggestions to follow up with on that thread?

Not really, I think "hide_fragments" is fine. Though perhaps the flag's 
description could explain what it does in a bit more detail.

For OBS I settled on "Hybrid MP4" and calling the process of hiding the 
fragments a "soft remux", but the name of the flag should probably be a 
bit more technical.

~Dennis



More information about the ffmpeg-devel mailing list