MP4 in Video.js not playing until fully loaded

后端 未结 4 1409
北海茫月
北海茫月 2021-02-06 05:05

I\'m using Video.js to play back videos in MP4 format on a client\'s website. The player uses html5 video and Adobe Flash Player as a fallback. (In my case it seems to use Flash

相关标签:
4条回答
  • 2021-02-06 05:21

    I use this command to add the metadata:

    MP4Box -isma your-file.mp4
    

    ;)

    0 讨论(0)
  • 2021-02-06 05:27

    Are you sure that you have your tag with preload="none" because I was having the same issue and I had preload="auto". I changed it to "none", it worked great!!

    My issue had nothing to do with the moov atom because I tried that too and it didn't have any effect. I even removed this converted video and it still worked with preload="none".

    kjsharks

    0 讨论(0)
  • 2021-02-06 05:29

    That occurs because the moov atom of the mp4 file is on the end of the file, the player needs to know the moov atom before start playing, you can move easily the moov atom to the beginning of the file with MP4Box, there is a gui version for Windows.

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

    This takes a few seconds.

    More info:Adobe's explanation of moov atomhere

    0 讨论(0)
  • 2021-02-06 05:32

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

    The preload attribute informs the browser whether or not the video data should begin downloading as soon as the video tag is loaded. The options are auto, metadata, and none.

    0 讨论(0)
提交回复
热议问题