WebCodecs

WebCodecs 是一个灵活的 web API,用于对音频和视频进行编码和解码。「WebCodecs is a flexible web API for encoding and decoding audio and video.」

  • Owner: w3c/webcodecs
  • Platform:
  • License:: Other
  • Category::
  • Topic:
  • Like:
    0
      Compare:

Github stars Tracking Chart

Try it out in Chrome 86

To try it on your machine, either

  • enable chrome://flags/#enable-experimental-web-platform-features, or
  • pass --enable-blink-features=WebCodecs flag via the command line.

To try it with real users, sign up for the origin trial here.

WebCodecs

The WebCodecs API allows web applications
to encode and decode audio and video.

Many Web APIs use media codecs internally to support APIs for particular uses:

  • HTMLMediaElement and Media Source Extensions
  • WebAudio (decodeAudioData)
  • MediaRecorder
  • WebRTC

But there’s no general way to flexibly configure and use these media codecs.
Because of this, many web applications have resorted to implementing
media codecs in JavaScript or WebAssembly, despite the disadvantages:

  • Increased bandwidth to download codecs already in the browser.
  • Reduced performance
  • Reduced power efficiency

It's great for:

  • Live streaming
  • Cloud gaming
  • Media file editing and transcoding

See the explainer for more info.

Code samples

Please see https://w3c.github.io/webcodecs/samples/

Main metrics

Overview
Name With Ownerw3c/webcodecs
Primary LanguageHTML
Program languageMakefile (Language Count: 2)
Platform
License:Other
所有者活动
Created At2019-06-21 22:04:18
Pushed At2025-05-14 23:12:03
Last Commit At
Release Count0
用户参与
Stargazers Count1.1k
Watchers Count76
Fork Count143
Commits Count1k
Has Issues Enabled
Issues Count530
Issue Open Count128
Pull Requests Count294
Pull Requests Open Count7
Pull Requests Close Count19
项目设置
Has Wiki Enabled
Is Archived
Is Fork
Is Locked
Is Mirror
Is Private