Domanda

i have simple html5 video player like this

<video id="video" controls="true" src="video.webm"></video>

If the 'video.webm' is some professional webm video (for example movie trailer), seeking works by downloading only requested parts, if i put my own encoded webm video, upon seeking browser first downloads whole file before seeks.

From http requests i have observed that partial http requests are working correctly for professional video, but for my video the browser always asks for whole file.

  • what is missing in my webm video for browser to ask for specific byte-range?
È stato utile?

Soluzione

Generally, seeking-behavior will depend on the keyframe rate of the encoded video. If you're using FFMpeg to do the encodes, have a look here: http://wiki.webmproject.org/ffmpeg

The parameter to note is -g, which sets the maximum number of interframes allowed before the encoder must set an intraframe (a keyframe) -- whether it feels it needs to or not. The value to choose is a matter of taste and tradeoffs, so you must experiment and decide for yourself. Perhaps start with a value of 360, and work downward if needed.

Autorizzato sotto: CC-BY-SA insieme a attribuzione
Non affiliato a StackOverflow
scroll top