Skip to content

Prehistoric codecs/H.263+ entry #416

@Yahweasel

Description

@Yahweasel

Short version: None of the video codecs in the registry are very approachable with a WebAssembly-compiled software-only encoder. Can we get something a bit more prehistoric, such as H.263+?

Long version:

Let me start with a not-hypothetical: If you're strange (bold?) enough to want to build a telephony app where the WebCodecs implementation might be a WebAssembly-compiled polyfill, what codecs should you use? For audio, it's simple: Opus. Opus is so blazingly fast there's essentially no reason to use anything but a polyfill. For video, the answer is a bit murky.

libvpx, bless its heart, can encode in real time, even when compiled to WebAssembly. But, its real-time mode is essentially "do as much as you can in the time budget, then give up". So, if the time budget is very limiting, the encoding looks awful. Real RealMedia vibes. H.264-era and later codecs are just too sophisticated to expect good quality with real-time encoding in WebAssembly, at least for the time being.

Would it be reasonable to add an earlier video codec to the registry? My proposal/suggestion is H.263v2/H.263+. Admittedly, the selection is purely self-serving—I can easily encode and decode H.263+ in real time in WebAssembly—but I think it's also a reasonable choice.

Some considerations:

  • There is no standard codec tag in MIME types for H.263+. Something would have to be invented, presumably "h263v2", "h263p", or "h263+".
  • Why not MPEG-4 Part 2? Patents. Besides, if real-time is the concern, then telephony is probably the application, and MPEG-4 Part 2's enhancements over H.263+ are mostly geared towards mastered video, not telephony applications. MPEG-4 Part 2 is backwards-compatible, so existing decoders can be used off-the-shelf for H.263+. Probably several of them are tweakable to emit H.263+ as well, but I'm insufficiently familiar to say this with any confidence.
  • Why not plain H.263? Its very limited selection of video frame sizes.
  • Why not even earlier? H.261, MPEG-1 video, H.262 (MPEG-2), and H.263 are all so similar to each other, practical software implementations I'm aware of all perform very similarly, so I just can't find a compelling reason for them.
  • Chrome presumably won't support H.263+. Well, that's what polyfills are for :)

Metadata

Metadata

Assignees

No one assigned

    Labels

    registrypertains to new or updated registry entry

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions