Simple, Minimalistic, No Allocations MPEG writer - without audio; Jon Olick and Wladislav Artsimovich (2016).
npm install jo_mpeg.c& 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.
bash
$ npm i jo_mpeg.c
`
And then include jo_mpeg.h as follows:
`c
// main.c
#include
int main() { / ... / }
`
Finally, compile while adding the path node_modules/jo_mpeg.c to your compiler's include paths.
`bash
$ 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.
`bash
$ cpoach clang main.c # or, use gcc
$ cpoach gcc main.c
``