Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

chrberger/mini-decoder.js

Open more actions menu

Repository files navigation

mini-decoder.js

Simple raw video frame decoder for JavaScript using openh264 and libvpx libraries.

This work is based on https://github.com/kazuki/video-codec.js.

Build

We use Docker to build:

docker build -f Dockerfile -t builder .

Get the build artefacts:

docker run --rm -ti --init -v $PWD:/opt/output builder

The Docker container will copy openh264_decoder.js, and libvpx_decoder.js into your current working directory.

Install

Simply copy mini-decoder.js, openh264_decoder.js, and libvpx_decoder.js into your project. Then, you can feed raw frames into it using

decodeAndRenderH264('videoFrame' /*your canvas*/,
                    640 /*frame's width*/,
                    640 /*frame's height*/,
                    rawData /*frame's rawData*/));
decodeAndRenderVPX('videoFrame' /*your canvas*/,
                   640 /*frame's width*/,
                   640 /*frame's height*/,
                   rawData /*frame's rawData*/),
                   'VP80' /*if rawData is encoded using VP8, otherwise 'VP90'*/);

About

Video decoding functions for JavaScript to decode raw h264 or VP8/VP9 frames using openh264 and libvpx

Topics

Resources

Stars

Watchers

Forks

Releases

Packages

Contributors

Languages

Morty Proxy This is a proxified and sanitized view of the page, visit original site.