Skip to content

Build FFmpeg

Martin Pulec edited this page Jun 5, 2020 · 1 revision

This article describes custom configuration and of FFmpeg for UltraGrid.

Table of Contents

Download

You can use latest version of FFMPEG to configure custom codecs or utilize most recent features of libavcodec. In this case:

git clone git://source.ffmpeg.org/ffmpeg.git

Recommended configuration options include these (all platforms, leads to GPL build):

./configure --enable-gpl --enable-libx264 --enable-libopus

Features

HEVC

Additionally, you may want to add support for HEVC:

./configure ... --enable-libx265

(you may want to download x265 from https://github.com/videolan/x265.git)

NVENC

Clone this GIT: https://git.videolan.org/git/ffmpeg/nv-codec-headers.git

Then install it:

make
make install

  • Then enable support for NVENC in FFMPEG:

./configure ... --enable-nonfree --enable-nvenc

Intel Quick Sync Video

Note: Following setup is not tested yet. For installation and requirements, please refer here.

  • Download Intel Media Server Studio (or Intel Media SDK for Windows).
  • from the download archive, install SDK - supposing it gets installed to /opt/intel/mediasdk, remove distribution-sticked VA and DRM libs and install them from SDK.
  • run:

sudo ln -s /opt/intel/mediasdk/lib/lin_x64/libmfx.a /usr/local/lib
sudo ln -s /opt/intel/mediasdk/include /usr/local/include/mfx

  • create file /usr/local/lib/pkgconfig/libmfx.pc with following contents prefix=/opt/intel/mediasdk exec_prefix=({prefix} libdir=){exec_prefix}/lib includedir=({prefix}/include Name: libmfx Description: Intel Media SDK Version: 2015R6 Libs: -L){libdir} -lmfx -lstdc++ -lva-drm -lva -lva-x11 -lva Libs.private: Cflags: -I${includedir}

Configure FFMPEG with following flag:

./configure --enable-libmfx --extra-libs="-ldl"

Clone this wiki locally