Skip to content

WebCodecs mp4-decode demo using mp4box.js set codedWidth/codedHeight incorrectly #495

@dustinkerstein

Description

@dustinkerstein

In this demo - https://w3c.github.io/webcodecs/samples/mp4-decode - inside the mp4_demuxer.js file:

 async getConfig() {
    let info = await this.source.getInfo();
    this.track = info.videoTracks[0];

    var extradata = this.getExtradata(this.source.getAvccBox());

    let config = {
      codec: this.track.codec,
      codedHeight: this.track.track_height,
      codedWidth: this.track.track_width,
      description: extradata,
    }

    return Promise.resolve(config);
  }

this.track.track_height and this.track.track_width apparently have the DAR already applied, so they're not actually the correct codedWidth/codedHeight which can cause issues with isConfigSupported

See here for some additional background - https://bugs.chromium.org/p/chromium/issues/detail?id=1325659

Metadata

Metadata

Labels

No labels
No labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions