

Most of time it works, but sometimes you may face bugs that is hard to resolve due to the variation of package versions and operating system.

There are two ways to build, one is native way which requires you to install packages (ex. libx264, libvpx) are disabled by default.Īs we don’t need to actually install the FFmpeg, only step 1 and 2 are required. Type `make install` to install all binaries and libraries you built. To do this, use an absolute path when launching `configure`, e.g. `configure` can be launched from a directory different from the FFmpeg sources to build the objects out of tree. A list of configure options is printed by running `configure -help`. Type `./configure` to create the configuration. The instruction of building and installing FFmpeg can be found inside INSTALL.md in the root of the repository: Installing FFmpeg: 1. To start with, we need to clone FFmpeg source code from its repository, as the master branch is under development, it is better we choose a specific release to compile.Īt the moment I wrote the story, the latest stable version of FFmpeg is n4.3.1, so we will use this version through out the stories.Īfter completing cloning the repository, it is time to build with GCC to make sure it works.Īctually you can skip this part if you are in a rush, but in my own experience it is better to get used to the build system of library first. I considered to take over maybe one of the repositories, but as there are too many changes these years, I decided to do it from scratch and wrote this series of tutorial at the same time to help people to learn how to use Emscripten in a real world C/C++ library. (Kagami/ffmpeg.js continues its development in April 2020) Not under active maintenance for years.The versions of both FFmpeg and Emscripten are out-dated.These libraries are great and ready-to-use in most cases, but they are suffering from following issues: If you google “ffmpeg.js”, you will find few existing libraries exactly the same as what we are going to build: It is an useful library and there is no JavaScript library with exactly the same capabilities. A guide for people who want to learn how to use Emscripten to compile a C/C++ library to JavaScript (Hopefully the most useful and detailed so far)įFmpeg is a free and open-source project consisting of a vast software suite of libraries and programs for handling video, audio, and other multimedia files and streams.This series of stories aim to serve following purposes:
