Take the 2-minute tour ×
Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

I'm converting my video to H.264 / MP4 with ffmpeg. I then move the moov atom to the start of the file with qt-faststart, so I can stream the video.

Everything works fine with small videos of 5–10 minutes length, but when it comes to large ones of 1–2 hours, it can take a significant time to start playing. it loads 6–10 MB and only than I can start playing the video.

With FLV videos that's not the case; it plays immediately, no matter how large the video is. How can I fix that?

share|improve this question

1 Answer 1

up vote 5 down vote accepted

You can check the size of your MOOV atom with AtomicParsley. Run atomicparsley file.mp4 -T and look for something like this:

Atom moov @ 20 of size: 1653815, ends @ 1653835

For example, here the atom would be 1653815 bytes (roughly 1.5 MB) in size. It could be that for your files the atom is simply too large.

You could try to reduce its size during encoding. In ffmpeg you can set the maximum size of the atom with the -moov_size option. That being said, your file might be simply too large for that, and you should consider changing your streaming method.

One way to do that would be the ISMV "smooth streaming" format. It creates fragmented MP4 files. You can enable it by setting one of the fragment options and choosing an empty MOOV. For example:

ffmpeg -i input.mp4 -c:v libx264 -c:a aac -strict experimental \
-b:v 1M -b:a 128k -movflags frag_keyframe+empty_moov \
output.mp4
share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.