I have a Video in webm format (like video.webm the duration is 60 seconds)
I want to get specified segment of video (i.e split video) with http header range (Range: 100-200).
In an other word :
I want to get a section of video (e.g. from second 4 to 12) but i don't want to use any converter like ffmpeg. i want to send http request to server & get specified range of webm file.
Can i use this method (http range header)?
Thanks
Since the source is non-live it should have a
Cuesblock. I think one way to do it is to fetch the start of the file to get to theMetaSeekinformation which will point you to theCuesbox.Parsing the
Cueswill give theCueTime,CueTrack,CueClusterPosition,CueBlockNumberetc. You can use the information to find the clusters that you need.Take a look at the file with mkvinfo in verbose level 3 to see how it's organized (
mkvinfo -v -v -v input.webm).Example output:
You can also find the Matroska specifications here.
WebMis a subset, see the specs here.Update: I found an example on how to use
HTTP Rangerequest to download a cluster here. It uses the Media Source Extension Tools to dump theWebMinfo inJSON.