Skip to content

Simple, Minimalistic, No Allocations MPEG writer - without audio; Jon Olick and Wladislav Artsimovich (2016).

License

Notifications You must be signed in to change notification settings

nodef/jo_mpeg.c

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

6 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

jo_mpeg converted to C

jo_mpeg.cxx is a C++ simple, minimalistic, no allocations MPEG writer written as a single header library by Jon Olick, which creates MPEG-1 videos (without audio). It is listed as a C++ only library in stb’s single header library collection. However, only the & reference format is what makes this library C++ only. Replacing those with simple pointers makes this compile with both C and C++. Artsimovich is also a big fan of stb-type of library code, so he converted the library to C.

Installation

Run:

$ npm i jo_mpeg.c

And then include jo_mpeg.h as follows:

// main.c
#include <jo_mpeg.h>

int main() { /* ... */ }

Finally, compile while adding the path node_modules/jo_mpeg.c to your compiler's include paths.

$ clang -I./node_modules/jo_mpeg.c main.c  # or, use gcc
$ gcc   -I./node_modules/jo_mpeg.c main.c

You may also use a simpler approach with the cpoach tool, which automatically adds the necessary include paths of all the installed dependencies for your project.

$ cpoach clang main.c  # or, use gcc
$ cpoach gcc   main.c



ORG

About

Simple, Minimalistic, No Allocations MPEG writer - without audio; Jon Olick and Wladislav Artsimovich (2016).

Resources

License

Stars

Watchers

Forks