[FFmpeg-devel] [PATCH 07/15] avformat/mov:Heuristic search for moov
Tomas Härdin
git at haerdin.se
Tue Oct 29 16:48:39 EET 2024
Needs sample. Also might be incorrect if mdat has moov atoms inside
mdat for some reason. But the concept is reasonable enough - mov files
tend to have the moov atom either in the header or in the footer. The
need for this patch may have been deprecated by the introduction of
mfra parsing, which is very similar to the RandomIndexPack (RIP) in
MXF..
The heuristic for how far to seek back from the end could use some
work. stts, ctts, stss, stsc, stsz and stco add up to 48 bytes per
frame, so the present heuristic won't work for lower bitrate files. For
example a 25 Hz video file below 3.6 Mbit/s is on average under 18k per
frame which when divided by 384 comes to 46 bytes compared to 48 bytes'
worth of stbl stuff. There some RLE possible with the headers, and
keyframe density makes a difference, but still
I also feel this should leverage the existing atom parsing code.
Spotify comments
----------------
Input mp4 file with lots of mdat:s (non-fragmented?) causing lots of
reads and seeks making initial parse over mid-latency network access
very slow.
Possible other solutions:
• Other or more safe way to quickly find moov?
• TODO: wasn’t there some option to use “mfra”? Only for fragmented
files? caused other problems?
/Tomas
-------------- next part --------------
A non-text attachment was scrubbed...
Name: 0007-avformat-mov-Heuristic-search-for-moov.patch
Type: text/x-patch
Size: 8083 bytes
Desc: not available
URL: <https://ffmpeg.org/pipermail/ffmpeg-devel/attachments/20241029/2dccc84a/attachment.bin>
More information about the ffmpeg-devel
mailing list