[FFmpeg-devel] [PATCH] qt-faststart: Add mode for probing faststart-ness

Tomas Härdin tjoppen at acc.umu.se
Sat Jul 28 01:03:59 EEST 2018


fre 2018-07-27 klockan 19:54 +0530 skrev Gyan Doshi:
> 
> On 27-07-2018 07:36 PM, Tomas Härdin wrote:
> 
> > This is something the PeerTube guys need, and this seemed a
> > straightforward enough approach. Feedback appreciated
> 
> Not a patch review, just a note that one can do this with
> ffmpeg/ffprobe 
> and basic *nix tools.
> 
> To check for moof,
> 
>       ffmpeg -i in.mp4 -v 56 2>&1 | grep -e type:'moof'
> 
> To see if moov precedes mdat
> 
>       ffmpeg -i in.mp4 -v 56 2>&1 | grep -e "type:'moov'" -e 
> "type:'mdat'" | head -1 | grep moov

woot! I didn't know the mov demuxer dumped such things. It is quite
slow however, since it will scan through every leaf atom in the file.
For example, running time ffmpeg -i input.mov -v 56 2>&1 | wc on a 1.5 
GiB MP4 on an SSD takes:

real    0m4,740s
user    0m6,708s
sys     0m2,356s

While using the patched qt-faststart:

real    0m0,002s
user    0m0,000s
sys     0m0,000s

/Tomas


More information about the ffmpeg-devel mailing list