MP4 in Video.js does not play until fully loaded

I am using Video.js to play MP4 video on a client website. The player uses html5 video and Adobe Flash Player as a backup. (In my case, Flash always seems to be used, so I don't know if there is a problem in the native html5 player.)

The video only starts after the * .mp4 file is fully downloaded. So don't buffer for a few seconds. The file must be fully downloaded by the browser before it starts playing.

When the video is long, the visitor must wait a very long time before he even sees that the video is working.

Now the question is whether it is a browser, script (video.js) or a video file that creates this problem.

On the videojs.com website, the video plays during boot, so it works correctly. Therefore, I think this is not a browser.

Has anyone else had this problem? How can I fix this problem?
Any advice is greatly appreciated!

thanks

Max

+7
source share
4 answers

This is because the moov atom of the mp4 file is at the end of the file, the player must know the moov atom before starting the game, you can easily move the moov atom to the beginning of the file with MP4Box, there it is a version of gui for Windows.

On the Linux command line, you move the MA with: MP4Box -add my_video.mp4 my_newVideo.mp4 .

It takes a few seconds.

More info: Adobe explains moov atom here

+9
source

Are you sure you have a tag with preload = "none" because I had the same problem and I had preload = "auto". I changed it to "none", it works great !!

My problem had nothing to do with the moov atom, because I tried it too, and it had no effect. I even deleted this converted video and it still worked with preload = "none".

kjsharks

+4
source

I use this command to add metadata:

 MP4Box -isma your-file.mp4 

;)

+1
source

Quote http://docs.videojs.com/docs/guides/options.html

The preload attribute informs the browser whether to upload video data immediately after loading the video tag. Possible values ​​are auto, metadata, and none.

0
source

All Articles