{"user":"jrottenberg","name":"ffmpeg","namespace":"jrottenberg","repository_type":"image","status":1,"status_description":"active","description":"FFmpeg 2.8 - 3.x - 4.x Copyright (c) 2000-2017 the FFmpeg developers","is_private":false,"is_automated":true,"star_count":468,"pull_count":85711987,"last_updated":"2026-04-28T01:55:51.821623Z","last_modified":"2024-10-16T13:48:34.145251Z","date_registered":"2014-08-29T22:29:16.503006Z","collaborator_count":2,"affiliation":null,"hub_user":"jrottenberg","has_starred":false,"full_description":"# FFmpeg Docker image\n\n\n [![Docker Stars](https://img.shields.io/docker/stars/jrottenberg/ffmpeg.svg?style=plastic)](https://registry.hub.docker.com/v2/repositories/jrottenberg/ffmpeg/stars/count/) [![Docker pulls](https://img.shields.io/docker/pulls/jrottenberg/ffmpeg.svg?style=plastic)](https://registry.hub.docker.com/v2/repositories/jrottenberg/ffmpeg/)\n[![gitlab pipeline status](https://gitlab.com/jrottenberg/ffmpeg/badges/master/pipeline.svg)](https://gitlab.com/jrottenberg/ffmpeg/commits/master)\n[![Azure Build Status](https://dev.azure.com/video-tools/ffmpeg/_apis/build/status/jrottenberg.ffmpeg)](https://dev.azure.com/video-tools/ffmpeg/_build/latest?definitionId=1)\n[![Docker Automated build](https://img.shields.io/docker/automated/jrottenberg/ffmpeg.svg?maxAge=2592000?style=plastic)](https://github.com/jrottenberg/ffmpeg/)\n\nThis project prepares a minimalist Docker image with FFmpeg. It compiles FFmpeg from sources following instructions from the [Compilation Guide](https://trac.ffmpeg.org/wiki/CompilationGuide).\n\nYou can install the latest build of this image by running `docker pull jrottenberg/ffmpeg`.\n\nThis image can be used as a base for an encoding farm.\n\n## Builds\n\nYou can use jrottenberg/ffmpeg or jrottenberg/ffmpeg:3.3\nto get the latest build based on ubuntu.\n\nNote : I've made ubuntu the default after 3.1\n\nYou'll find centos based image using `ffmpeg:X.Y-centos` or `ffmpeg:centos` to get the latest.\nalpine images  `ffmpeg:X.Y-alpine` to get the latest.\nscratch images `ffmpeg:X.Y-scratch` to get the latest. (Scratch is an experimental image containing only FFmpeg and libraries)\n\nFormat is `ffmpeg:MAJOR.MINOR-VARIANT` with MAJOR.MINOR in :\n- 2.8\n- 3.0\n- 3.1\n- 3.2\n- 3.3\n- 3.4\n- 4.0\n- 4.1\n- snapshot\n\nand VARIANT in :\n- alpine\n- centos\n- nvidia\n- scratch\n- ubuntu\n- vaapi\n\n\nRecent images:\n\n```\nsnapshot-vaapi      74mb\nsnapshot-ubuntu     86mb\nsnapshot-scratch    20mb\nsnapshot-nvidia     640mb\nsnapshot-centos     97mb\nsnapshot-alpine     35mb\n4.1-vaapi           73mb\n4.1-ubuntu          85mb\n4.1-scratch         20mb\n4.1-nvidia          640mb\n4.1-centos          97mb\n4.1-alpine          34mb\n4.0-vaapi           73mb\n4.0-ubuntu          83mb\n4.0-scratch         20mb\n4.0-nvidia          639mb\n4.0-centos          97mb\n4.0-alpine          34mb\n3.4-vaapi           71mb\n3.4-ubuntu          83mb\n3.4-scratch         18mb\n3.4-nvidia          637mb\n3.4-centos          97mb\n3.4-alpine          32mb\n3.4                 83mb\n3.3-vaapi           71mb\n3.3-ubuntu          83mb\n3.3-scratch         18mb\n3.3-nvidia          637mb\n3.3-centos          96mb\n3.3-alpine          31mb\n3.3                 82mb\n3.2-vaapi           83mb\n3.2-ubuntu          83mb\n3.2-scratch         18mb\n3.2-nvidia          623mb\n3.2-centos          96mb\n3.2-alpine          32mb\n3.1-vaapi           83mb\n3.1-ubuntu          82mb\n3.1-scratch         17mb\n3.1-nvidia          623mb\n3.1-centos          96mb\n3.1-alpine          32mb\n3.1                 81mb\n3.0-ubuntu          82mb\n3.0-scratch         17mb\n3.0-nvidia          623mb\n3.0-centos          96mb\n3.0-alpine          31mb\n2.8-vaapi           82mb\n2.8-ubuntu          81mb\n2.8-scratch         17mb\n2.8-nvidia          622mb\n2.8-centos          95mb\n2.8-alpine          30mb\n```\n\n### How the 'recent images' was generated\n\n```\n$ curl --silent https://hub.docker.com/v2/repositories/jrottenberg/ffmpeg/tags/?page_size=500 | jq -cr \".results|sort_by(.name)|reverse[]|.sz=(.full_size/1048576|floor|tostring+\\\"mb\\\")|[.name,( (20-(.name|length))*\\\" \\\" ),.sz,( (8-(.sz|length))*\\\" \\\"),.last_updated[:10]]|@text|gsub(\\\"[,\\\\\\\"\\\\\\]\\\\\\[]\\\";null)\"\n\n# If you want to compare the one you have locally\n$ docker images | grep ffmpeg | sort | awk '{print $1 \":\" $2 \"\\t\" $7 $8}'\n```\n\nPlease use [Github issues](https://github.com/jrottenberg/ffmpeg/issues/new) to report any bug or missing feature.\n\n## Test\n\n```\nffmpeg version 3.3.4 Copyright (c) 2000-2017 the FFmpeg developers\n  built with gcc 5.4.0 (Ubuntu 5.4.0-6ubuntu1~16.04.4) 20160609\n  configuration: --disable-debug --disable-doc --disable-ffplay --enable-shared --enable-avresample --enable-libopencore-amrnb --enable-libopencore-amrwb --enable-gpl --enable-libass --enable-libfreetype --enable-libvidstab --enable-libmp3lame --enable-libopenjpeg --enable-libopus --enable-libtheora --enable-libvorbis --enable-libvpx --enable-libwebp --enable-libx265 --enable-libxvid --enable-libx264 --enable-nonfree --enable-openssl --enable-libfdk_aac --enable-postproc --enable-small --enable-version3 --extra-cflags=-I/opt/ffmpeg/include --extra-ldflags=-L/opt/ffmpeg/lib --extra-libs=-ldl --prefix=/opt/ffmpeg\n  libavutil      55. 58.100 / 55. 58.100\n  libavcodec     57. 89.100 / 57. 89.100\n  libavformat    57. 71.100 / 57. 71.100\n  libavdevice    57.  6.100 / 57.  6.100\n  libavfilter     6. 82.100 /  6. 82.100\n  libavresample   3.  5.  0 /  3.  5.  0\n  libswscale      4.  6.100 /  4.  6.100\n  libswresample   2.  7.100 /  2.  7.100\n  libpostproc    54.  5.100 / 54.  5.100\n\n  configuration:\n    --disable-debug\n    --disable-doc\n    --disable-ffplay\n    --enable-shared\n    --enable-avresample\n    --enable-libopencore-amrnb\n    --enable-libopencore-amrwb\n    --enable-gpl\n    --enable-libass\n    --enable-libfreetype\n    --enable-libvidstab\n    --enable-libmp3lame\n    --enable-libopenjpeg\n    --enable-libopus\n    --enable-libtheora\n    --enable-libvorbis\n    --enable-libvpx\n    --enable-libwebp\n    --enable-libx265\n    --enable-libxvid\n    --enable-libx264\n    --enable-nonfree\n    --enable-openssl\n    --enable-libfdk_aac\n    --enable-postproc\n    --enable-small\n    --enable-version3\n    --extra-cflags=-I/opt/ffmpeg/include\n    --extra-ldflags=-L/opt/ffmpeg/lib\n    --extra-libs=-ldl\n    --prefix=/opt/ffmpeg\n```\n\nCapture output from the container to the host running the command\n\n```\n docker run jrottenberg/ffmpeg \\\n            -i http://url/to/media.mp4 \\\n            -stats \\\n            $ffmpeg_options  - \u003e out.mp4\n```\n\n### Examples\n#### Extract 5s @00:49:42 into a GIF\n\n```\n docker run jrottenberg/ffmpeg -stats  \\\n        -i http://archive.org/download/thethreeagesbusterkeaton/Buster.Keaton.The.Three.Ages.ogv \\\n        -loop 0  \\\n        -final_delay 500 -c:v gif -f gif -ss 00:49:42 -t 5 - \u003e trow_ball.gif\n```\n\n#### Convert 10bits MKV into a 10Bits MP4\n```\n docker run -v $(pwd):$(pwd) -w $(pwd) jrottenberg/ffmpeg:3.4-scratch \\\n        -stats \\\n        -i http://www.jell.yfish.us/media/jellyfish-20-mbps-hd-hevc-10bit.mkv \\\n        -c:v libx265 -pix_fmt yuv420p10 \\\n        -t 5 -f mp4 test.mp4\n```\nThe image has been compiled with [X265 Multilib](https://x265.readthedocs.io/en/default/api.html#multi-library-interface).\nUse the pixel format switch to change the number of bits per pixel by suffixing it with 10 for 10bits or 12 for 12bits.\n\n#### Convert a local GIF into a mp4\n\nLet's assume ```original.gif``` is located in the current directory :\n```\n docker run -v $(pwd):$(pwd) -w $(pwd)\\\n        jrottenberg/ffmpeg:3.2-scratch -stats \\\n        -i original.gif \\\n        original-converted.mp4\n```\n\n#### Use hardware acceleration enabled build\n\nThanks to [qmfrederik](https://github.com/qmfrederik) for the [vaapi ubuntu based variant](https://github.com/jrottenberg/ffmpeg/pull/106)\n\n jrottenberg/ffmpeg:vaapi or jrottenberg/ffmpeg:${VERSION}-vaapi\n\n- Run the container with the device attached /dev/dri from your host into the container :\n\n`docker run --device /dev/dri:/dev/dri -v $(pwd):$(pwd) -w $(pwd) jrottenberg/ffmpeg:vaapi [...]`\n- Have the Intel drivers up and running on your host. You can run `vainfo` (part of vainfo package on Ubuntu) to determine whether your graphics card has been recognized correctly.\n- Run ffmpeg with the correct parameters, this is the same as when running [ffmpeg natively](https://trac.ffmpeg.org/wiki/Hardware/VAAPI).\n\n\n#### Use nvidia hardware acceleration enabled build\n\nThanks to [ShaulMyplay](https://github.com/ShaulMyplay) for the [nvidia based variant](https://github.com/jrottenberg/ffmpeg/pull/168)\n\nSupports nvenc only on all ffmpeg versions, and hardware decoding and scaling on ffmpeg \u003e= 4.0\n\n- Install nvidia latest drivers on host machine.\n- Install [nvidia-docker](https://github.com/NVIDIA/nvidia-docker) on host machine.\n- Run container using \"--runtime=nvidia\" flag and use supported [ffmpeg hwaccel options](https://trac.ffmpeg.org/wiki/HWAccelIntro)\n\nHardware encoding only example:\n`docker run --runtime=nvidia jrottenberg/ffmpeg:2.8-nvidia -i INPUT -c:v nvenc_h264 -preset hq OUTPUT`\nFull hardware acceleration example:\n`docker run --runtime=nvidia jrottenberg/ffmpeg:4.1-nvidia -hwaccel cuvid -c:v h264_cuvid -i INPUT -vf scale_npp=-1:720 -c:v h264_nvenc -preset slow OUTPUT`\n\n\n##### See what's inside the beast\n\n```\ndocker run -it --entrypoint='bash' jrottenberg/ffmpeg\n\nfor i in ogg amr vorbis theora mp3lame opus vpx xvid fdk x264 x265;do echo $i; find /usr/local/ -name *$i*;done\n```\n\n## Keep up to date\n\nSee Dockerfile-env to update a version\n\n- [FFMPEG_VERSION](http://ffmpeg.org/releases/): [GNU Lesser General Public License (LGPL) version 2.1](https://ffmpeg.org/legal.html)\n- [OGG_VERSION](https://xiph.org/downloads/): [BSD-style license](https://git.xiph.org/?p=mirrors/ogg.git;a=blob_plain;f=COPYING;hb=HEAD)\n- [OPENCOREAMR_VERSION](https://sourceforge.net/projects/opencore-amr/files/opencore-amr/): [Apache License](https://sourceforge.net/p/opencore-amr/code/ci/master/tree/LICENSE)\n- [VORBIS_VERSION](https://xiph.org/downloads/): [BSD-style license](https://git.xiph.org/?p=mirrors/vorbis.git;a=blob_plain;f=COPYING;hb=HEAD)\n- [THEORA_VERSION](https://xiph.org/downloads/): [BSD-style license](https://git.xiph.org/?p=mirrors/theora.git;a=blob_plain;f=COPYING;hb=HEAD)\n- [LAME_VERSION](http://lame.sourceforge.net/download.php): [GNU Lesser General Public License (LGPL) version 2.1](http://lame.cvs.sourceforge.net/viewvc/lame/lame/LICENSE?revision=1.9)\n- [OPUS_VERSION](https://www.opus-codec.org/downloads/): [BSD-style license](https://www.opus-codec.org/license/)\n- [VPX_VERSION](https://github.com/webmproject/libvpx/releases): [BSD-style license](https://github.com/webmproject/libvpx/blob/master/LICENSE)\n- [WEBP_VERSION](https://storage.googleapis.com/downloads.webmproject.org/releases/webp/index.html): [BSD-style license](https://github.com/webmproject/libvpx/blob/master/LICENSE)\n- [XVID_VERSION](https://labs.xvid.com/source/): [GNU General Public Licence (GPL) version 2](http://websvn.xvid.org/cvs/viewvc.cgi/trunk/xvidcore/LICENSE?revision=851)\n- [FDKAAC_VERSION](https://github.com/mstorsjo/fdk-aac/releases): [Liberal but not a license of patented technologies](https://github.com/mstorsjo/fdk-aac/blob/master/NOTICE)\n- [FREETYPE_VERSION](http://download.savannah.gnu.org/releases/freetype/): [GNU General Public License (GPL) version 2](https://www.freetype.org/license.html)\n- [LIBVIDSTAB_VERSION](https://github.com/georgmartius/vid.stab/releases): [GNU General Public License (GPL) version 2](https://github.com/georgmartius/vid.stab/blob/master/LICENSE)\n- [LIBFRIDIBI_VERSION](https://www.fribidi.org/): [GNU General Public License (GPL) version 2](https://cgit.freedesktop.org/fribidi/fribidi/plain/COPYING)\n- [X264_VERSION](http://www.videolan.org/developers/x264.html): [GNU General Public License (GPL) version 2](https://git.videolan.org/?p=x264.git;a=blob_plain;f=COPYING;hb=HEAD)\n- [X265_VERSION](https://bitbucket.org/multicoreware/x265/downloads/):[GNU General Public License (GPL) version 2](https://bitbucket.org/multicoreware/x265/raw/f8ae7afc1f61ed0db3b2f23f5d581706fe6ed677/COPYING)\n\n\n## Contribute\n\n\n```\n# Add / fix stuff\n${EDITOR} templates/\n\n# Generates the Dockerfile for all variants\n./update.py\n\n# Test a specific variant\ndocker build -t my-build docker-images/VERSION/\n\n# Make sure all variants pass before CI\nfind ffmpeg/ -name Dockerfile | xargs dirname | parallel --no-notice -j 4 --results logs docker build -t {} {}\n```\n\n\nCommit the templates files THEN all the generated Dockerfile for a merge request. So it's easier to review the template change.\n","permissions":{"read":true,"write":false,"admin":false},"media_types":["application/vnd.docker.container.image.v1+json","application/vnd.docker.distribution.manifest.v1+prettyjws","application/vnd.oci.image.index.v1+json"],"content_types":["image"],"categories":[],"immutable_tags_settings":{"enabled":false,"rules":[".*"]},"storage_size":464777999268,"source":null}