Building ffmpeg.js for Ubuntu

FFMPEG.js is an amazing project and it helped me building one of my latest projects: Device Frame. It basically builds ffmpeg (with a good set of defaults to keep the size small — as small as it can be). If the default build doesn't support the filters and encoders you need, then you will need to build it yourself.

This is more of a note for me in the future, but this is what I did to get it working. (Note: I tried on macOS sierra and was getting compile errors).

Install Deps

  1. sudo apt-get install automake libtool build-essential cmake

Download ffmpeg.js

  1. git clone
  2. cd ffmpeg.js
  3. git submodule init
  4. git submodule update --recursive

Install Emscripten:

  1. Linux: Download
  2. ./emsdk update
  3. ./emsdk install latest
  4. Wait...
  5. ./emsdk activate latest
  6. source ./

Build ffmpeg.js

If there are errors with fribidi:

You might see errors like:

./configure: line 4255: syntax error near unexpected token `2.2'
./configure: line 4255: `LT_PREREQ(2.2)'

Make sure you have libtool installed.


I lead the Chrome Developer Relations team at Google.

We want people to have the best experience possible on the web without having to install a native app or produce content in a walled garden.

Our team tries to make it easier for developers to build on the web by supporting every Chrome release, creating great content to support developers on, contributing to MDN, helping to improve browser compatibility, and some of the best developer tools like Lighthouse, Workbox, Squoosh to name just a few.

I love to learn about what you are building, and how I can help with Chrome or Web development in general, so if you want to chat with me directly, please feel free to book a consultation.

I'm trialing a newsletter, you can subscribe below (thank you!)