From white Wolf Stack: Check out the original

Ffmpeg installation, some people may have to agonize for a long time, or even for a week, the basic reason is the compilation and installation caused by the disaster.

We provide four installation methods, the most complicated being compiled and installed on Centos7.

  1. Ffmpeg static library download installation
  2. Install FFMPEG on your MAC
  3. Compile and install ffmpeg on centos7
  4. Install FFMPEG using Docker

You can install it according to your preference. Today we will look at how to install FFMPEG under Docker.

Compared to installing FFMPEG for MAC and centos7, installing FFMPEG for Docker is almost as easy as installing FFMPEG, so there is a big reason why Docker is so popular.

First OF all, I’ll assume that if you’re reading this, you’ve already installed Docker and can use it simply.

1. Download the image

~ docker pull jrottenberg/ffmpeg
Copy the code

2. Run the container directly to test whether the installation is successful

~ docker run jrottenberg/ffmpeg: latest version - ffmpeg version 4.1 Copyright (c) 2000-2018 the ffmpeg developers built With GCC 5.4.0 (Ubuntu 5.4.0-6Ubuntu1 ~16.04.11) 20160609 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-libx265 --enable-libxvid --enable-libx264 --enable-nonfree --enable-openssl --enable-libfdk_aac --enable-libkvazaar --enable-libaom --extra-libs=-lpthread --enable-postproc --enable-small --enable-version3 --extra-cflags=-I/opt/ffmpeg/include --extra-ldflags=-L/opt/ffmpeg/lib --extra-libs=-ldl --prefix=/opt/ffmpeg libavutil 56\.22.100/56 \.22.100 libavCodec 58\.35.100/58 \.35.100 libavFormat 58\.20.100/58 \.20.100 libavDevice 58\. 5.100/58 \.5.100 libavFilter 7\.40.101/7 \.40.101 libavresample 4\.0 \.0/4 \.0 \.0 libswScale 5\.3.100/5 \. 3.100 libswresample 3\.3.100/3 \.3.100 libpostProc 55\.3.100/55 \.3.100Copy the code

It feels good to be there in one step.

For the sake of practice, we will simply install it now, and we will write a Dockfile to install it when the deployment goes live.