10

I'm attempting to stream youtube using Media Source Extensions (MSE) and it works fine but when trying to get seeking working I came across the problem that I don't know the byte ranges for certain time ranges. Using ebml parsing I can get the cues but I'd like to have a map of the cues to the cluster offsets without downloading the entire video.

The end goal is to seek throughout the video having only downloaded the init section of ebml.

I've tried parsing the entire video and of course then I get the clusters but again - I'd like to stream the video.

Edit: Here are some more details - using mkvinfo I can get all of the matroska nodes, in it it shows the clusters. The cluster times match up with the CueTimes I have but the CueClusterPosition does not match up. For example, on this video: https://www.youtube.com/watch?v=mDdzvKi3yiE mkvinfo says the cluster starts at 5105 but youtube has the "init" portion of the webm coming as 0-5101 - meaning there are 4 bits unaccounted for. When using ebml decoders the CueClusterPosition for the first cluster is coming as 5057 which conflicts with mkvinfo too.

Zachrip
  • 3,242
  • 1
  • 17
  • 32

0 Answers0