Giter Club home page Giter Club logo

h264_decoder's Introduction

Simple H264 Decoder

This is a simple C++ h264 stream decoder. It is quite fast and more importantly, does not require any other libs to compile/use. The idea is to be easy to use and import to your project, without all the problems of seting up a larger lib like ffstream, gstreamer or libvlc. You just need to compile, add the Decoder.h header (which contains all the interface that you need) and link the libmeerkat_h264_decoder lib.

The idea came from a project that imported the h264 decoder to JavaScript called Broadway, which is quite amazing. They used the decoder code from the Android project, but they did an abstraction layer on top (you'll see on all the functions calls that start with broadway). We've used this abstraction layer to make things even easier, but with some small changes for our purpose.

We also added a python wrapper for this lib, which is quite easy to use and (not so much to) compile. However you'll need OpenCV 3.1, Boost and Python 3. We used some code of pyboostcvconverter and numpy-opencv-converter, but also had to do some manual changes to fix some memory leak problems when using it with OpenCV 3.0.

Hope you like it :)

Meerkat team

Warnings

This was done on a real tight deadline, so it is quite possible that you find some problems/limitations when using this code. We encourage you to open a new Issue relating your problems, so that everyone will be aware of. And better yet, you may do a pull request.

If you submit a pull request, please try to follow the code style of each particular file. There are code in here that originated from several repositories/authors, but we don't think it is a good idea to mix different coding styles in the same file.

Compilation

To compile the main lib:

$ mkdir build
$ cd build
$ cmake ..
$ make

To compile the test program (it needs OpenCV to generate a RGB image and plot on the screen):

$ cd test
$ mkdir build
$ cd build
$ cmake ..
$ make

Usage example:

$ ./h264_test ../../data/video_full.avi

h264_decoder's People

Contributors

gfickel avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.