https://github.com/udevbe/tinyh264
A tiny WASM h.264 decoder, for node and browser
https://github.com/udevbe/tinyh264
browser decoder h264 html5 node nodejs wasm
Last synced: 6 months ago
JSON representation
A tiny WASM h.264 decoder, for node and browser
- Host: GitHub
- URL: https://github.com/udevbe/tinyh264
- Owner: udevbe
- License: apache-2.0
- Created: 2018-02-22T16:02:18.000Z (over 7 years ago)
- Default Branch: master
- Last Pushed: 2021-09-18T21:06:32.000Z (about 4 years ago)
- Last Synced: 2025-03-16T10:23:36.367Z (7 months ago)
- Topics: browser, decoder, h264, html5, node, nodejs, wasm
- Language: C
- Homepage:
- Size: 15 MB
- Stars: 196
- Watchers: 10
- Forks: 25
- Open Issues: 3
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# Tiny H264
This project was forked from [h264bsd](https://github.com/oneam/h264bsd).
Available on npm as `tinyh264` and meant to be used with a builder system like webpack as [worker module](https://webpack.js.org/loaders/worker-loader/).
See `demo` folder for an example.All non-essential operations like color conversions, querying cropping parameters or render to canvas have been removed.
All required decoding operations have been moved to C to optimize performance.Quick tests show an up to 50% performance improvement on chrome, and up to 20% on Firefox.
- Input is expected to be a picture of NALs (a complete access units or AU) as Uint8Array, the output result is a yuv420 buffer as Uint8Array.
- Profile must be constrained-baseline or baseline.
- Only I and P frames are considered supported (so no B-frames).This project was created for use in [Greenfield](https://github.com/udevbe/greenfield)
# Building
## Prerequisites
- BashMake sure you have sourced the emscripten environment and run `npm install && npm run build`.