videojs / video.js

Video.js - open source HTML5 video player
https://videojs.com
Other
38.18k stars 7.47k forks source link

VideoJS loads flv video as a whole #3407

Closed markusha closed 8 years ago

markusha commented 8 years ago

Hello. My problem is that video.js loads flv videos as whole files so there's a big delay before large files start to play. MP4 files e. g. are being loaded partially and start to play the moment you press "play" button. Is this a server problem or video.js problem?

gkatsev commented 8 years ago

Videojs just passes flv urls to Flash's netstream and don't do anything special with it. I assume that either the flv has the metadata at the end, so, Flash downloads the whole thing to know anything about it or there's potentially some server problem.

markusha commented 8 years ago

It turned out that files that have .flv extension had actually AVC + AAC inside of the container with the following properties:

Format: MPEG-4 Format profile: Base Media Codec ID: isom

Which as I understand is some version of mp4. Mime type of these files was determined by their extension, i. e. incorrectly (video/x-flv). So after I corrected mime type detection (which for these files turned out to be video/mp4) the files started to play at once.

P. S. Thanks for your work.

gkatsev commented 8 years ago

Glad you figured it out!