Detect if "faststart" is applied to the video

When you run qt-faststart on MP4, you essentially take the metadata from the back and place it at the front of the file. In my case, so that Flash can start playing the video correctly before it fully loads.

I have a large number of videos that I run through a shell script to encode overnight. However, when I upload, I will not necessarily know that in my last video folder (on the server) there is "qt-faststart" on it.

My goal is to find straggler videos and run qt-faststart on them manually, but I need a way to compile the list. Is there a way to check this metadata information using PHP or something else? I wonder how I can say that qt-faststart was already running on the video or not.

+4
source share
2 answers

Do not harm the launch of qt-faststart more than once, the second time it will be no-op. Thus, the easiest solution is to always run qt-faststart.

For more precise control, I would use the qt-faststart Python translation: https://github.com/danielgtaylor/qtfaststart

It has functions that examine atoms in an MP4 file, it shouldn't be too hard to use them to determine if they need to be reordered.

+5
source
mediainfo -f file.mp4 | grep IsStreamable 

or

 ffprobe -v debug file.mp4 2>&1 | grep seeks 
+1
source

All Articles