Public | Automated Build

Last pushed: 7 days ago
Short Description
ffmpeg version 3.2 Copyright (c) 2000-2016 the FFmpeg developers
Full Description

FFMPEG for Docker on Centos7



This project prepares a minimalist Docker image with FFMPEG. It compiles FFMPEG from sources following instructions from the Compilation Guide.

You can install the latest build of this image by running docker pull jrottenberg/ffmpeg.

This image can be used as a base for an encoding farm, based on centos7.

Ubuntu builds

You can use jrottenberg/ffmpeg:ubuntu or jrottenberg/ffmpeg:3.1 or jrottenberg/ffmpeg:3
to get the latest build based on ubuntu.

Note : I've made ubuntu the default after 3.1

You'll find centos based image using ffmpeg:X.Y-centos or ffmpeg:centos to get the latest.
alpine images ffmpeg:X.Y-alpine or ffmpeg:alpine to get the latest.

For information :

u-3.2               ubuntu              1e998987f2da        2 minutes ago        205.5 MB
c-3.2               centos              b73e2e768092        9 minutes ago        274.4 MB
a-3.2               alpine              5da8a4eaeb41        45 minutes ago       73.64 MB

Please use Github issues to report any bug or missing feature.

Test

ffmpeg version 3.0 Copyright (c) 2000-2016 the FFmpeg developers
  built with gcc 4.8.5 (GCC) 20150623 (Red Hat 4.8.5-4)
  configuration: --prefix=/usr/local --extra-cflags=-I/usr/local/include --extra-ldflags=-L/usr/local/lib --bindir=/usr/local/bin --extra-libs=-ldl --enable-version3 --enable-libfaac --enable-libmp3lame --enable-libx264 --enable-libxvid --enable-gpl --enable-postproc --enable-nonfree --enable-avresample --enable-libfdk_aac --disable-debug --enable-small --enable-openssl --enable-libtheora --enable-libx265 --enable-libopus --enable-libvorbis --enable-libvpx
  libavutil      55. 17.103 / 55. 17.103
  libavcodec     57. 24.102 / 57. 24.102
  libavformat    57. 25.100 / 57. 25.100
  libavdevice    57.  0.101 / 57.  0.101
  libavfilter     6. 31.100 /  6. 31.100
  libavresample   3.  0.  0 /  3.  0.  0
  libswscale      4.  0.100 /  4.  0.100
  libswresample   2.  0.101 /  2.  0.101
  libpostproc    54.  0.100 / 54.  0.100

  configuration:
    --prefix=/usr/local
    --extra-cflags=-I/usr/local/include
    --extra-ldflags=-L/usr/local/lib
    --bindir=/usr/local/bin
    --extra-libs=-ldl
    --enable-version3
    --enable-libfaac
    --enable-libmp3lame
    --enable-libx264
    --enable-libxvid
    --enable-gpl
    --enable-postproc
    --enable-nonfree
    --enable-avresample
    --enable-libfdk_aac
    --disable-debug
    --enable-small
    --enable-openssl
    --enable-libtheora
    --enable-libx265
    --enable-libopus
    --enable-libvorbis
    --enable-libvpx

Capture output from the container to the host running the command

 docker run jrottenberg/ffmpeg \
            -i http://url/to/media.mp4 \
            -stats \
            $ffmpeg_options  - > out.mp4

Example

 docker run jrottenberg/ffmpeg -stats  \
        -i http://archive.org/download/thethreeagesbusterkeaton/Buster.Keaton.The.Three.Ages.ogv \
        -loop 0  \
        -final_delay 500 -c:v gif -f gif -ss 00:49:42 -t 5 - > trow_ball.gif

See what's inside the beast

docker run -it --entrypoint='bash' jrottenberg/ffmpeg

for i in ogg amr vorbis theora mp3lame opus vpx xvid fdk x264 x265;do echo $i; find /usr/local/ -name *$i*;done

Keep up to date

See Dockerfile-env to update a version

Contribute


${EDITOR} Dockerfile-env

./update.py # generates the Dockerfile

docker build -t my-build VERSION/path/

# make sure all variants pass before Travis does
find ffmpeg/ -name Dockerfile | xargs  dirname | parallel --no-notice -j 4 --results logs docker build -t {} {}

Commit the env file AND all the generated Dockerfile for a merge request.

Docker Pull Command
Owner
jrottenberg
Source Repository

Comments (13)
holibut
4 months ago

For this comment system consideration, re-input the information:
For using local file as input, here is an example:

docker run --rm -v `pwd`:/tmp/workdir -w="/tmp/workdir" jrottenberg/ffmpeg \
-ss 00:00:00 -i NorthHutchinsonIsland-FloridaBeachWaves.mp4 -vframes 1 -q:v 2 BeachWaves.jpg

the mp4 file is located in the host file system: pwd, is your current directory.

holibut
4 months ago

The hidden character is called: grave accent (`), ASCII code is 0x60, it should be around pwd.

holibut
4 months ago

Oh, this comment system hide my double around the pwd command, it may cause confusion. Use full path to replace the pwd, or use pwd quoted with double.

holibut
4 months ago

For using local file as input, here is an example:

docker run --rm -v pwd:/tmp/workdir -w="/tmp/workdir" jrottenberg/ffmpeg \
-ss 00:00:00 -i NorthHutchinsonIsland-FloridaBeachWaves.mp4 -vframes 1 -q:v 2 BeachWaves.jpg

the mp4 file is located in the host file system: pwd, is your current directory.

jrottenberg
7 months ago

@baseddata it does now, thanks to https://github.com/jrottenberg/ffmpeg/pull/14

Going forward please put questions/requests on github.

baseddata
9 months ago

Does it compile the 10bit library for x265? (libx265_main10.dylib)

jrottenberg
a year ago

@jamiegau can you add it there ? https://github.com/jrottenberg/ffmpeg/issues/new

I try to keep that build in sync with upstream, I'm behind ffmpeg release by a week maximum, try to docker pull jrottenberg/ffmpeg:latest

jamiegau
a year ago

Hi,
I am using your ffmpeg container to do some conversion from DCP based mxf files..It seems to have a BUG still in it that the later version should have fixed.. (From my Googleing)
You get all these erros when decoding the JPEG200 stream.
[jpeg2000 @ 0x47dda00] End mismatch 2
[jpeg2000 @ 0x47dda00] End mismatch 1

Kind of still works.. But this slows it down a lot..

How recent is the version compiled into the container?

ivandotv
a year ago

Just a head up, I've created an image based on this one for a sole task of making it easy to split video files in multiple parts.
https://hub.docker.com/r/ivandotv/ffmpeg-split-video/

jrottenberg
a year ago

@pakastin , yes it has webm support

$ docker run jrottenberg/ffmpeg -buildconf 2>/dev/null|grep libvpx
--enable-libvpx