

In the following examples, substitue with the version of the sources used. At the time of writing, the version used was 4.1.1, but check first if the version has been bumped. This will fetch the FFmpeg sources from the ffmpeg ppa repository. Checkout the 8.x API headers with: git checkout 106d84a2c1960d1ccac7fa2646f0adc52d2d4ff2 Get the FFmpeg sourcesĬreate a build location for FFmpeg and download the Debianized sources. Note: If you are running NVIDIA Drivers 415 or older, you need to go back a bit in the API used. Install external dependencies FFmpeg NVIDIA headers ("ffnvcodec")įFmpeg sources used to come with the required headers, but they where recently split out into their own repository. Install various dependencies Install build dependencies sudo apt-get build-dep ffmpeg Note: If nvidia-418 is not available for your distribution, for example if you are on Ubuntu Xenical / Linux Mint 18.3, then install nvidia-415. Luckily there is a PPA for that too.Īdd the Proprietary GPU Drivers PPA and upgrade your driver: sudo add-apt-repository ppa:graphics-drivers/ppa You need to be running updated NVIDIA GPU driver, so first upgrade your NVIDIA drivers. Otherwise continue with the tutorial! Add NVIDIA Driver PPA Note: If all you need is updated FFmpeg, without the NVIDIA hardware acceleration extras, then you can just install the ffmpeg package and you are done. sudo add-apt-repository ppa:jonathonf/ffmpeg-4 Lets get started ! Add required repositories Add FFMPEG PPAįortunately there exists a PPA with everything we need for FFmpeg 4. For example if you are streaming and your CPU is not fast enough you will get frame drops. Using the GPU for encoding or decoding is much faster the CPU-only based codecs and you can free up CPU resources for the uses. FFmpeg sources and build result will take about 3GB. We will need to add a couple of PPAs and install quite a lot of dependencies, so make sure you have enough disk space available. By using PPAs and building proper packages they integrate better with your distribution. It is fully possible to use plain sources from the FFmpeg site on these and other distributions. These instruction are meant for Ubuntu (and maybe Debian) based distributions and has been tested on Linux Mint 18. The formats supported varies with the GPU used, consult this video encode & decode support matrix for details. This tutorial will help you build proper FFmpeg packages that includes NVIDIA hardware acceleration for encoding and decoding of various video formats. Unfortunately, due to legal & license reasons and also version dependencies, the binary distributed versions of FFmpeg don't usually have NVIDIA hardware acceleration enabled. It support many video and audio formats and can use hardware acceleration, with for example NVIDIA GPUs. FFmpeg is an extremely versatile video manipulation utility and used by many related software packages.
