@yume-chan/scrcpy-decoder-webcodecs
TypeScript icon, indicating that this package has built-in type declarations

0.0.24 • Public • Published

@yume-chan/scrcpy-decoder-webcodecs

Decode and render H.264 streams using the WebCodecs API.

It has no dependencies and high performance, but is only available on recent versions of Chrome.

WARNING: The public API is UNSTABLE. Open a GitHub discussion if you have any questions.

Compatibility

Chrome Firefox Safari Performance Supported H.264 profile/level
94 No No High with hardware acceleration High level 5

Usage

It draws frames onto decoder.renderer (a <canvas> element), you can insert it anywhere you want to display the video.

const decoder = new WebCodecsDecoder();
document.body.appendChild(decoder.renderer);

videoPacketStream // from `@yume-chan/scrcpy`
    .pipeTo(decoder.writable)
    .catch(() => {});

Package Sidebar

Install

npm i @yume-chan/scrcpy-decoder-webcodecs

Weekly Downloads

15

Version

0.0.24

License

MIT

Unpacked Size

102 kB

Total Files

77

Last publish

Collaborators

  • yume-chan