On Wed, 24 Sep 2025 20:15:06 +0200, Timo Rothenpieler via ffmpeg-user
<ffmpeg-user@ffmpeg.org> wrote:

>On 24.09.2025 09:54, Bo Berglund via ffmpeg-user wrote:
>> On Wed, 11 Jun 2025 20:54:06 +0200, Bo Berglund
>> <bo.berglund-at-gmail....@ffmpeg.org> wrote:
>> 
>>> The hybrid_fragmented flag is used to enable viewers to read an mp4 file 
>>> while
>>> it is being wrtitten according to the documentation here:
>>> https://ffmpeg.org/ffmpeg-formats.html
>>>
>>> But has it been released yet and in that case from which version is it
>>> available?
>>> I really need to be able to start viewing mp4 files before they are closed 
>>> by
>>> the writer....
>> 
>> So now 3+ months later and noone seems to know about this?
>> 
>> Will this flag ever be available to the public using Linux?
>> 
>> Or is it available, but only if one uses some special installation of ffmpeg 
>> (I
>> am using the standard apt delivered ffmpeg on Ubuntu Server 24.04.3 LTS)
>> 
>> TIA
>> 
>
>https://github.com/FFmpeg/FFmpeg/commit/6ec22731ae7694d4db08fff556eea58aa3b990d3

So that is a *description* of why you need it (in my case I want to read an
unfinished mp4 while it is being downloaded).

Now I have grabbed the very latest ffmpeg nightly from github and symlinked it
to be the on-path ffmpeg on one of my Linux machines and it does work for my
ordinary scripts to get the mp4 downloads working.
So I am on the bleeding edge of ffmpeg on that device.

But I have totally failed in using it with movflags, probably due to the lack of
instructions on *how* to activate that flag...

So please give me an example command for ffmpeg download where it is used
successfully to allow reading while writing the mp4 file.

I use this ffmpeg command in my download script today where I am forced to save
into a ts file because of the inability to read it if it is set to mp4 and I
want to modify it to use the new flag to allow me to download into an mp4:

CMD="ffmpeg -hide_banner -loglevel warning ${MODE} -i \"${M3U8URL}\" -r 30 -vf
scale=w=-4:h=480 -c:v libx264 -preset fast -crf 26 -x264-params
keyint=30:scenecut=0:open-gop=0 -c:a aac -t ${CAPTURETIME} -f mpegts
${TARGETFILETS}"

The variables are:
MODE = "-referer \"${VIDEOURL}\""
VIDEOURL = https URL of the webpage hosting the player
M3U8URL = the m3u8 of the video stream
CAPTURETIME = download time in seconds
TARGETFILETS = the ts video file name which I want to be an mp4 instead

I have tried adding this command before the  -i argument:
movflags=+hybrid_fragmented

But it does not work, throws an error.

Apparently I do not know how to apply the movflags argument.....

Please help!


-- 
Bo Berglund
Developer in Sweden

_______________________________________________
ffmpeg-user mailing list -- ffmpeg-user@ffmpeg.org
To unsubscribe send an email to ffmpeg-user-le...@ffmpeg.org

Reply via email to