Open guest271314 opened 4 years ago
See https://bugs.chromium.org/p/chromium/issues/detail?id=1042988#c15 Recommendation is, yes, include block durations in bytestreams muxed for use with MSE so that implementations can precisely buffer the media. Unlike traditional linear buffering, MSE allows segments to be relocated in the presentation timeline. Determinining the precise buffering overlap and adjacency requires accurate coded frame duration information. In this case, it seems to me that the comment "This will increase file size and does not offer any additional value for players at the moment." is incorrect w.r.t. MSE players. The spec references in the OP to the initialization segment logic are around the stream duration, not coded frame duration.
See also https://github.com/w3c/media-source/pull/234, where this recommendation is hoped to be merged into the MSE bytestream format spec for WebM soon.
Given the various implementations of WebM writers one solution which would resolve this issue and the linked PR would be to create a WebM writer that outputs WebM files with the container structure MediaSource
SourceBuffer
with codecs set to "<audio|video>/webm;codecs=<codec(s)>"
expects per any (including the current) iteratation of https://www.w3.org/TR/mse-byte-stream-format-registry/.
Creating a WebM compliant file from an
audio/x-opus+ogg
file usingmkvmerge
(https://mkvtoolnix.download/doc/mkvmerge.html#d4e612)without
--enable-durations
optionresults in an exception being thrown at Chromium 81 (https://bugs.chromium.org/p/chromium/issues/detail?id=1042988)
When
--enable-durations
is used the WebM file does not throw an execption and plays back the file.The relevant section in the specification appears to be 3.5.7 Initialization Segment Received https://w3c.github.io/media-source/#sourcebuffer-init-segment-received
which does not indicate duration MUST be set for all blocks.
If there is in fact technical language in the specifcation which refers to
MediaSource
implementation expecting duration for all blocks in WebM compliant files can those specifc sections and language kindly be pointed out here?