Skip to content

Use the same codec names as the media APIs. #233

Closed

Description

@pthatcherg

MediaCapabilities (and other media APIs) uses a content type of "video/foo; codecs=A.B.C". We should probably use the "A.B.C" instead of what we have currently. For example, instead of "h264", use "avc1.4200" or instead of "vp9", "vp09.00.10.08". It's a little crazy and I can't find any RFCs for these things, but here is where Chromium parses them:

https://cs.chromium.org/chromium/src/media/base/mime_util_internal.cc?g=0&l=820

Activity

  1. markafoltz commented on Oct 1, 2019

    @markafoltz
    Contributor

    Is this what you are looking for? It covers some, but not all of the MPEG codecs.

    https://tools.ietf.org/html/rfc6381

    There may be an equivalent RFC for the VP*/AV1 codecs.

    The media APIs don't make any explicit reference to any RFCs. I have no idea what implementers are supposed to do, other than copy each other's source code :-P

  2. markafoltz commented on Oct 1, 2019

    @markafoltz
    Contributor

    Spoke with Dan Sanders, there are other RFCs for the webm container we can refer to as well.

    He noted that enumeration of codec strings for any given codec family is a hard problem because of the incredibly rich syntax for codecs - so we should avoid that in our protocol design.

  3. markafoltz commented on Mar 3, 2021

    @markafoltz
    Contributor

    It sounds like there wasn't an explicit action recorded in the last F2F minutes [1], but for the record, we discussed consulting with the Media WG folks working on Media Capabilities and related APIs to get feedback on this issue.

    [1] https://www.w3.org/2021/02/23-webscreens-minutes.html#t02

  4. chrisn commented on Jan 12, 2022

    @chrisn
    Member

    The minutes from the joint meeting with Media WG are here. Summary:

  5. markafoltz commented on Jun 7, 2022

    @markafoltz
    Contributor

    Want to discuss briefly and propose putting up a pull request to update the specification to explicitly use the WebCodecs registry to resolve this issue.

  6. markafoltz commented on Jun 8, 2022

    @markafoltz
    Contributor

    @chrisn, at the F2F [*] you mentioned you would follow up with any thoughts on how to extend the codecs name list beyond what is defined through WebCodecs. Maybe we can just fall back on the language that is already there, which is:

    This must be a single-codec RFC 6381 codecs parameter

    for codecs not listed in WebCodecs.

    [*] https://www.w3.org/2022/06/08-webscreens-minutes.html#t08

  7. chrisn commented on Jun 9, 2022

    @chrisn
    Member

    Yes, that could work, but it doesn't really help to know how to implement. Is a fall back enough? If we do need to be more specific, then we'd need to find relevant specs which aren't in the WebCodecs registry, e.g., via MP4RA - and perhaps turn that into its own spec, which as you noted earlier is a hard problem.

  8. markafoltz commented on Jun 9, 2022

    @markafoltz
    Contributor

    Good point. We could provide guidance along the lines that the codec string should only be returned in the capabilities response if MediaCapabilities would return "supported" and "smooth" in combination with other relevant parameters.

    need to find relevant specs which aren't in the WebCodecs registry, e.g., via MP4RA

    I'm not familiar with that registry; it looks like it's describing how media is described by MP4 containers? Handling the details container formats is (right now) out of scope for OSP.

    It seems like the alternatives for describing these strings are the MIME standards, or various codec-specific RFCs.

    I can put up a PR describing what I have in mind.

  9. markafoltz commented on Sep 30, 2022

    @markafoltz
    Contributor

    Closed by #299.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions