[FFmpeg-devel] [PATCH] dashenc: Write out DASH manifest immediately in streaming mode

Timo Rothenpieler timo at rothenpieler.org
Tue Jun 8 22:10:44 EEST 2021


On 08.06.2021 21:03, Kevin LaFlamme wrote:
> When streaming mode is enabled with fMP4/CMAF for DASH output, the
> segment files are available to read by players as soon as the first byte
> is written instead of only after the file is fully written. The DASH
> manifest currently only gets written when the final write to the segment
> file occurs. This means that players cannot stream the first segment
> while it is being written.

Is this really a good idea?
Imagine the files are being served by a http server.
The server will stat() the file, and then send that size to the client 
in the HTTP headers.
If now a Client reads that file way early, it will receive an incomplete 
version of the file. HTTP servers don't typically are capable of 
streaming files that are actively being written to.

Reading a file while it's being written to is also not sensible possible 
or behaves in potentially unexpected ways, depending on the OS.

> When -lhls is enabled with MP4 segments the HLS manifest is written
> immediately to advertise the in-flight segments. This change adds the
> same behavior for the DASH manifest so players can stream it
> immediately.


-------------- next part --------------
A non-text attachment was scrubbed...
Name: smime.p7s
Type: application/pkcs7-signature
Size: 4494 bytes
Desc: S/MIME Cryptographic Signature
URL: <https://ffmpeg.org/pipermail/ffmpeg-devel/attachments/20210608/f78233e2/attachment.bin>


More information about the ffmpeg-devel mailing list