Skip to content

rq4w7z/openh264-js

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

1 Commit
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

OpenH264-js

This is an example of the Cisco's OpenH264 library compiled to javascript with emscripten for running natively in browsers.

This is very similar to eg https://github.com/mbebenita/Broadway and others. The main difference is that they use the BSD decoder which is limited to h264 baseline profile. Among others, that means no cabac. OpenH264 (http://www.openh264.org/) does support cabac.

Features

  • CABAC decoding
  • Tested in Chrome v43 and Firefox 40
  • single nal decoding, makes it easy to decode any container externally
  • > 30 fps for 1280x720 main profile stream (cabac encoded) on Haswell i7

Limitiations

  • Lot's of hardcoding in demo (decode.html).

Build instructions

The Makefile will download all dependencies and build everything. A small demo is provided in decoder.html. The demo uses Broadway's rendering library.

Possible improvements

There are a lot of copying going on, Several reasons:

  • A quick look didn't reveal any buffer control in OpenH264 (validity of data pointers are until next decode call?)
  • Broadway's yuv->rgb conversion needs back-to-back planes with stride = width: OpenH264 doesn't do that.

Other points

  • closure-compiler, even with at whitespace level makes playback slower and more jittery. No clue why.

About

emscript compiled Cisco's openh264 codec

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • C++ 53.3%
  • HTML 22.6%
  • JavaScript 15.5%
  • Makefile 8.6%