
The output listing contains two lines for each file : This batch file searches the first occurence of either "mdat" atom or "moov" atom within each MP4 file in the current directory. Under Windows, the "delims=µ" parameter allows to manage file names containing white spaces or any other special offįor /F "delims=µ" %%i in ('dir /b /on *.mp4') do (įfmpeg -v trace -i "%%i" NUL 2>&1 | grep -m 1 -o -e "type:'mdat'" -e "type:'moov'" The first approach is to fully scan the H.264/MP4 files to look for "mdat" and "moov" atoms. Prior to using the next batch files, Windows users should download grep.exe and head.exe from an Internet site. This page is intended for Windows 10 users but can be adapted by Unix users with only small changes. In other words, the file is enabled for Fast Start playback only when the "moov" atom is located before the "mdat" atom. By using this option, the "moov" atom is located before the "mdat" atom. If the file is created by adding the -movflags faststart option to the ffmpeg command line, the "moov" atom is moved at the beginning of the MP4 file during the ffmpeg second pass. The "mdat" atom is located before the "moov" atom.

Normally, a MP4 file has all the metadata about all packets stored at the end of the file, in data units named atoms. This allows video playback to begin before the file has been completely downloaded. Streaming web sites recommend to upload videos with Fast Start enabled. This How to applies to H.264/MP4 files only but will probably work with H.264/MOV files too.

How to check if Fast Start is enabled for playback Introduction
