How to Install FFmpeg 4.0.2 in Ubuntu 18.04/16.04 via PPA

October 17, 2018


FFmpeg 4.0 “Wu” was released months ago as a new major release. Here’s how to install it in Ubuntu 14.04, Ubuntu 16.04, and/or Ubuntu 18.04.

FFmpeg 4.0 release highlights:

  • Intel QSV accelerated overlay filter
  • NVIDIA NVDEC GPU-based decoding for H264 / MJPEG / HEVC / MPEG-1/2/4, VC1, VP8, and VP9 formats.
  • OpenCL overlay filter
  • VA-API MJPEG and VP8 decoding support
  • AV1 Support through libaom
  • AMD AMF H.264 and HEVC encoders
  • And many other new filters, and accelerated code path improvements.

How to Install FFmpeg 4.0 in Ubuntu:

FFmpeg 4.0.2 is available in Ubuntu Software via SNAP package (Runs in sandbox).

To upgrade from the Ubuntu build FFmpeg 3.x, the unofficial PPA contains the latest packages for Ubuntu 18.04, Ubuntu 16.04, and Ubunu 14.04.

1. Open terminal either via Ctrl+Alt+T keyboard shortcut, or by searching for ‘terminal’ from software launcher. When it opens, run command to add the PPA:

sudo add-apt-repository ppa:jonathonf/ffmpeg-4

Type user password (no asterisks feedback) when it prompts and hit Enter.

2. You can then upgrade FFmpeg libraries via Software Updater:

Or run commands in terminal:

sudo apt-get update

sudo apt-get install ffmpeg

How to Restore:

For any reason, you can downgrade FFmpeg to the stock version in Ubuntu universe repositories by purging the PPA via command:

sudo apt-get install ppa-purge && sudo ppa-purge ppa:jonathonf/ffmpeg-4


I'm a freelance blogger who started using Ubuntu in 2007 and wishes to share my experiences and some useful tips with Ubuntu beginners and lovers. Please notify me if you find any typo/grammar/language mistakes. English is not my native language. Contact me via [email protected]

3 responses to How to Install FFmpeg 4.0.2 in Ubuntu 18.04/16.04 via PPA

  1. Great, thanks for sharing.

  2. I have cuda 10.0 and 10.1 installed and configured.
    When I install ffmpeg 4.1, I’m not getting cuvid installed nor ami I getting nvenc
    My output shows:
    ffmpeg version 4.1.3-0york1~18.04 Copyright (c) 2000-2019 the FFmpeg developers
    built with gcc 7 (Ubuntu 7.3.0-27ubuntu1~18.04)
    configuration: –prefix=/usr –extra-version=’0york1~18.04′ –toolchain=hardened –libdir=/usr/lib/x86_64-linux-gnu –incdir=/usr/include/x86_64-linux-gnu –arch=amd64 –enable-gpl –disable-stripping –enable-avresample –disable-filter=resample –enable-avisynth –enable-gnutls –enable-ladspa –enable-libaom –enable-libass –enable-libbluray –enable-libbs2b –enable-libcaca –enable-libcdio –enable-libcodec2 –enable-libflite –enable-libfontconfig –enable-libfreetype –enable-libfribidi –enable-libgme –enable-libgsm –enable-libjack –enable-libmp3lame –enable-libmysofa –enable-libopenjpeg –enable-libopenmpt –enable-libopus –enable-libpulse –enable-librsvg –enable-librubberband –enable-libshine –enable-libsnappy –enable-libsoxr –enable-libspeex –enable-libssh –enable-libtheora –enable-libtwolame –enable-libvidstab –enable-libvorbis –enable-libvpx –enable-libwavpack –enable-libwebp –enable-libx265 –enable-libxml2 –enable-libxvid –enable-libzmq –enable-libzvbi –enable-lv2 –enable-omx –enable-openal –enable-opengl –enable-sdl2 –enable-nonfree –enable-libfdk-aac –enable-libdc1394 –enable-libdrm –enable-libiec61883 –enable-chromaprint –enable-frei0r –enable-libx264 –enable-shared
    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.100
    Hardware acceleration methods:

    How do I enable this?

    • Either try SNAP package, or you may ask PPA maintainer to update the package with cuda support (Links are available in tutorial).