-
Notifications
You must be signed in to change notification settings - Fork 2
appendBuffer is not standard #8
Comments
Reliably parsing the timestamp info from the right MP4 boxes is needed. Based on referring to the ISO-IEC specs and guidance from Axel D. and team, I have found the following ways to do this:
https://w3c.github.io/media-source/isobmff-byte-stream-format.html
Here there seem to be multiple ways: The track fragment box ('tfdt') if present (not mandatory), gives the sum of the decode times of all earlier samples encountered. It can be thought of as being the base decode timestamp of the present sample. It does not seem to be an indicator of the presentation time though. The movie header box ('mvhd'), a mandatory box, gives the segment timescale and duration info. However, presentation start time is not available here. If the mp4 is of fragmented type, we would have access to the movie fragment header box ('mfhd') and the movie fragment random access box ('mfra'). The 'mfra' box seems to be a reliable way of getting the presentation time of the sync sample for fragmented mp4s. What is the preferred way of getting this information out? Are there other ways to get these params not listed here? Getting clarity on this will help remove the need to pass in these parameters in the appendBuffer call. Thanks for any pointers in advance. |
Got an update from @cconcolato:
|
Thanks a lot. I am proceeding in this direction by attempting parsing accordingly. However, the composition offset time in the I am looking at a segment where the tr_flags ( When this happens, should we still rely on the decode time in the |
CTS is indeed optional, if not there CTS is equal to DTS. |
Very clear on the CTS offsets inside Another question is on the timescale used to compute the timestamps. This is typically always present inside the
Thanks for your thoughts. |
|
Thank you for all the clarification. |
Another scenario is where byte ranges are accepted. Here there is no presence of unique files per segment. Instead, media segments are part of the one long byte stream, but with byte range offset as seen in the response header. We do not see an |
In appendBuffer call, as of now, we still need to pass the segment's start and end timestamp, and wether it's an initialization segment. See here
This is the main thing that still require some modifications in the JS player to work with this polyfill.
We need to parse these infos from the MP4 segments themselves in order to get rid of this issue
The text was updated successfully, but these errors were encountered: