FFmpeg is amazing! A simple tip for HTML5 use case

Video/Audio processing is not easy as far as I know, and the FFmpeg is like the Swiss Knife in my thought. In this case, I've some FLV files stored in Hadoop. I want to make it playable on web page without Flash plugins. The solution is quite simple, using

<!doctype html>
<h1>Apache Demo</h1>
<video controls=controls src=""/>

I've an Apache running on, and the above codes work well. However, when I placed the mp4 file on Hadoop and accessed by httpfs, it's not playable and halted when downloaded whole mp4 file. The code is only different in src prop:

This URL is accessable through browser. I think there must be something wrong in the mp4 file header or other config. After bing and bing some keywords, I found a solution: add a parameter:

$ ffmpeg -i input.flv -ar 22050 -movflags faststart output.mp4

Yes! The parameter is -movflags faststart! After this, the video is playable from Hadoop!