4 ms·
For MP4s the metadata is at the end annoyingly enough.
by apitman 2y ago
For MP4s the metadata is at the end annoyingly enough.
- AnotherGoodName 2y agoMP4 allows the header at the start or the end. It’s usually written to the end since it’s its not a fixed size and it’s a pain for recording and processing tools to rewrite the whole file on completion just to move the header to the start. You should always re-encode to move the header to the start for web though. It’s something you see too much of online once you know about it but mp4 can absolutely have the header at the start.
- koakuma-chan 2y agoYou can `-movflags faststart` when encoding to place it at the beginning.
- tomsonj 2y agoimplementations may request the metadata range at the end in this case, if the content length is known
- lxgr 2y agoFor "VOD", that works (and is how very simple <video> tag based players sometimes still do it), but for live streaming, it wouldn't – hence the need for fragmented MP4, MPEG-DASH, HLS etc. It does work for simpler codecs/containers though: Shoutcast/Icecast web radio streams are essentially just endless MP3 downloads, optionally with some non-MP3 metadata interspersed at known intervals.