Build FFmpeg Windows Version in Docker Container

Saturday, September 30, 2017

If you want to compile FFmpeg windows version, you may find it is not an easy task. Thank Roger Pack for his turnkey script to make this task much easier: ffmpeg-windows-build-helpers

Here I wrap this script into a dockerfile, so it will not break your current system if you want to build yourself. To build it, save the following file into a file named Dockerfile, then run command

docker build .

The file Dockerfile:

FROM ubuntu:16.04
LABEL maintainer "Changjiang Yang"

RUN apt-get update && apt-get install -y --no-install-recommends \
        subversion \
        curl \
        texinfo \
        g++ \
        bison \
        flex \
        cvs \
        yasm \
        automake \
        libtool \
        autoconf \
        gcc \
        cmake \
        git \
        make \
        pkg-config \
        zlib1g-dev \
        mercurial \
        unzip \
        pax \
        nasm \
        gperf \
        autogen \
        bzip2 \
        p7zip-full \
        wget \
        ca-certificates \
        ed

RUN git clone https://github.com/rdp/ffmpeg-windows-build-helpers.git && \
        cd ffmpeg-windows-build-helpers && \
        ./cross_compile_ffmpeg.sh --compiler-flavors=win64