webrtc / samples

WebRTC Web demos and samples
https://webrtc.github.io/samples
BSD 3-Clause "New" or "Revised" License
13.94k stars 5.71k forks source link

record: Correct AV1 MIME type #1610

Closed rosetta-jpn closed 1 year ago

rosetta-jpn commented 1 year ago

The correct AV1 MIME is "av01".

alvestrand commented 1 year ago

The registered media type for AV1 at IANA is AV1: https://www.iana.org/assignments/media-types/video/AV1

Where did you get a reference saying "AV01" from?

rosetta-jpn commented 1 year ago

The media type should be used for real time streaming.

Applications which use this media: Video over IP, video conferencing, video streaming.

I think, for Media Streaming API, the regular MIME type should be used. https://aomediacodec.github.io/av1-isobmff/#av1sampleentry-section

rosetta-jpn commented 1 year ago

I searched more. So there are two ways how to specify the mime, mime and mime+codecs. https://developer.mozilla.org/en-US/docs/Web/API/MediaRecorder/mimeType

(1) With MIME only, video/av1 should be used.

See https://developer.mozilla.org/en-US/docs/Web/API/MediaRecorder/mimeType

The media type strings are standardized by the Internet Assigned Numbers Authority (IANA). For their official list of defined media type strings, see the article Media Types on the IANA site.

(2) With MIME + codecs, 'video/webm; codecs="av01"' should be used.

See https://developer.mozilla.org/en-US/docs/Web/Media/Formats/codecs_parameter#av1

I will clarify the commit message.

rosetta-jpn commented 1 year ago

I created a new pull request https://github.com/webrtc/samples/pull/1611.