Skip to content

Does the specification require duration to be set for all blocks in WebM compliant files? #250

@guest271314

Description

@guest271314

Creating a WebM compliant file from an audio/x-opus+ogg file using mkvmerge (https://mkvtoolnix.download/doc/mkvmerge.html#d4e612)

-w, --webm | Create a WebM compliant file. This is also turned on if the output file name's extension is "webm". This mode enforces several restrictions. The only allowed codecs are VP8, VP9 video and Opus, Vorbis audio tracks. The DocType header item is changed to "webm".For chapters and tags only a subset of elements are allowed. mkvmerge(1) will automatically remove all elements not allowed by the specification.

without --enable-durations option

Write durations for all blocks. This will increase file size and does not offer any additional value for players at the moment.

results in an exception being thrown at Chromium 81 (https://bugs.chromium.org/p/chromium/issues/detail?id=1042988)

DOMException: Failed to execute 'appendBuffer' on 'SourceBuffer': The HTMLMediaElement.error attribute is not null.

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

  1. Update the duration attribute if it currently equals NaN:
  • If the initialization segment contains a duration:
    • Run the duration change algorithm with new duration set to the duration in the initialization segment.
  • Otherwise:
    • Run the duration change algorithm with new duration set to positive Infinity.

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?

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

No projects

Relationships

None yet

Development

No branches or pull requests

Issue actions