{"id":37495,"date":"2022-02-18T17:55:40","date_gmt":"2022-02-18T17:55:40","guid":{"rendered":"https:\/\/ubuntuhandbook.org\/?p=37495"},"modified":"2022-02-18T17:59:48","modified_gmt":"2022-02-18T17:59:48","slug":"install-ffmpeg-5-0-ubuntu","status":"publish","type":"post","link":"https:\/\/ubuntuhandbook.org\/index.php\/2022\/02\/install-ffmpeg-5-0-ubuntu\/","title":{"rendered":"How to Install FFmpeg 5.0 in Ubuntu 20.04 or Ubuntu 18.04 via PPA"},"content":{"rendered":"<p><a href=\"https:\/\/ubuntuhandbook.org\/wp-content\/uploads\/2022\/02\/ffmpeg-logo.webp\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/ubuntuhandbook.org\/wp-content\/uploads\/2022\/02\/ffmpeg-logo-250x250.webp\" alt=\"\" width=\"250\" height=\"250\" class=\"alignleft size-thumbnail wp-image-37497\" srcset=\"https:\/\/ubuntuhandbook.org\/wp-content\/uploads\/2022\/02\/ffmpeg-logo-250x250.webp 250w, https:\/\/ubuntuhandbook.org\/wp-content\/uploads\/2022\/02\/ffmpeg-logo-300x300.webp 300w, https:\/\/ubuntuhandbook.org\/wp-content\/uploads\/2022\/02\/ffmpeg-logo-600x600.webp 600w, https:\/\/ubuntuhandbook.org\/wp-content\/uploads\/2022\/02\/ffmpeg-logo-768x768.webp 768w, https:\/\/ubuntuhandbook.org\/wp-content\/uploads\/2022\/02\/ffmpeg-logo.webp 1200w\" sizes=\"auto, (max-width: 250px) 100vw, 250px\" \/><\/a><\/p>\n<p>The popular FFmpeg multi-media library released version 5.0 recently. Here&#8217;s how to install it in Ubuntu 20.04, Ubuntu 18.04 and\/or Ubuntu 16.04 via PPA.<\/p>\n<p>FFmpeg 5.0, codename &#8220;Lorentz&#8221;, is a new major release that features:<\/p>\n<ul>\n<li>remove the old encode\/decode APIs and replace them with an N:M-based API.<\/li>\n<li>new easy to use AVframe-based API for libswscale.<\/li>\n<li>remove the entire libavresample library.<\/li>\n<li>Many new filters.<\/li>\n<li>ADPCM IMA Westwood encoder, Apple Graphics (SMC) encoder, VideoToolbox ProRes encoder<\/li>\n<li>ADPCM IMA Acorn Replay decoder, GEM Raster image decoder.<\/li>\n<li>DoVi support, and more in <a href=\"https:\/\/ffmpeg.org\/\" rel=\"noopener\" target=\"_blank\">ffmpeg.org<\/a>.<\/li>\n<\/ul>\n<h3>Install FFmpeg 5.0 in Ubuntu:<\/h3>\n<p><b>IMPORTANT: Upgrading FFmpeg is not recommended for beginners! It may conflict with other packages in your system. Use it at your own risk!<\/b><\/p>\n<p><a href=\"https:\/\/launchpad.net\/~savoury1\" rel=\"noopener\" target=\"_blank\">Rob Savoury<\/a> has built the FFmpeg 5.0 packages into PPA for all the current Ubuntu LTS releases. Though the updates is suspend due to lack of donations. The PPA still works, and if you find it&#8217;s useful you may help by making donations (see the previous link).<\/p>\n<h4>1.) Add the PPAs<\/h4>\n<p>Firstly, press Ctrl+Alt+T on keyboard to open a terminal window. When it opens, run command to add the PPA:<\/p>\n<pre>sudo add-apt-repository ppa:savoury1\/ffmpeg5<\/pre>\n<p>Also add the FFmpeg4 PPA which contains the dependency libraries:<\/p>\n<pre>sudo add-apt-repository ppa:savoury1\/ffmpeg4<\/pre>\n<p><a href=\"https:\/\/ubuntuhandbook.org\/wp-content\/uploads\/2022\/02\/ffmpeg5ppa.webp\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/ubuntuhandbook.org\/wp-content\/uploads\/2022\/02\/ffmpeg5ppa-600x440.webp\" alt=\"\" width=\"600\" height=\"440\" class=\"aligncenter size-large wp-image-37498\" srcset=\"https:\/\/ubuntuhandbook.org\/wp-content\/uploads\/2022\/02\/ffmpeg5ppa-600x440.webp 600w, https:\/\/ubuntuhandbook.org\/wp-content\/uploads\/2022\/02\/ffmpeg5ppa-300x220.webp 300w, https:\/\/ubuntuhandbook.org\/wp-content\/uploads\/2022\/02\/ffmpeg5ppa.webp 746w\" sizes=\"auto, (max-width: 600px) 100vw, 600px\" \/><\/a><\/p>\n<h4>2.) Update package cache:<\/h4>\n<p>If you&#8217;re running Ubuntu 18.04 or Ubuntu 16.04, you need to manually refresh the system package cache by running command:<\/p>\n<pre>sudo apt update<\/pre>\n<h4>3.) Upgrade FFmpeg to 5.0:<\/h4>\n<p>Finally, run the command below to install all the available updates including FFmpeg 5:<\/p>\n<pre>sudo apt full-upgrade<\/pre>\n<p><b>NOTE: This command may remove some apps on your system due to package conflict! DO CHECK the terminal output before typing &#8216;<i>y<\/i>&#8216; to confirm installation!<\/b><\/p>\n<p>When everything&#8217;s done successfully, verify via <code>ffmpeg -version<\/code> command.<\/p>\n<p><a href=\"https:\/\/ubuntuhandbook.org\/wp-content\/uploads\/2022\/02\/ffmpeg-version5.webp\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/ubuntuhandbook.org\/wp-content\/uploads\/2022\/02\/ffmpeg-version5-600x351.webp\" alt=\"\" width=\"600\" height=\"351\" class=\"aligncenter size-large wp-image-37499\" srcset=\"https:\/\/ubuntuhandbook.org\/wp-content\/uploads\/2022\/02\/ffmpeg-version5-600x351.webp 600w, https:\/\/ubuntuhandbook.org\/wp-content\/uploads\/2022\/02\/ffmpeg-version5-300x176.webp 300w, https:\/\/ubuntuhandbook.org\/wp-content\/uploads\/2022\/02\/ffmpeg-version5-768x449.webp 768w, https:\/\/ubuntuhandbook.org\/wp-content\/uploads\/2022\/02\/ffmpeg-version5.webp 935w\" sizes=\"auto, (max-width: 600px) 100vw, 600px\" \/><\/a><\/p>\n<h3>How to Restore:<\/h3>\n<p>You may purge the two PPAs which also downgrade all the installed packages. Firstly, install the ppa-purge tool via command:<\/p>\n<pre>sudo apt install ppa-purge<\/pre>\n<p>Then purge the PPAs via the commands below one by one:<\/p>\n<pre>sudo ppa-purge ppa:savoury1\/ffmpeg5<\/pre>\n<pre>sudo ppa-purge ppa:savoury1\/ffmpeg4<\/pre>\n<p>NOTE: The downgrade process <b>may also remove some other apps<\/b>. Keep an eye on terminal output before performing the action!<\/p>","protected":false},"excerpt":{"rendered":"<p>The popular FFmpeg multi-media library released version 5.0 recently. Here&#8217;s how to install it in Ubuntu 20.04, Ubuntu 18.04 and\/or Ubuntu 16.04 via PPA. FFmpeg 5.0, codename &#8220;Lorentz&#8221;, is a new major release that features: remove the old encode\/decode APIs and replace them with an N:M-based API. new easy to use AVframe-based API for libswscale. [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":37497,"comment_status":"open","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[9],"tags":[1506],"class_list":["post-37495","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-howtos","tag-media-codec"],"amp_enabled":true,"_links":{"self":[{"href":"https:\/\/ubuntuhandbook.org\/index.php\/wp-json\/wp\/v2\/posts\/37495","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/ubuntuhandbook.org\/index.php\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/ubuntuhandbook.org\/index.php\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/ubuntuhandbook.org\/index.php\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/ubuntuhandbook.org\/index.php\/wp-json\/wp\/v2\/comments?post=37495"}],"version-history":[{"count":0,"href":"https:\/\/ubuntuhandbook.org\/index.php\/wp-json\/wp\/v2\/posts\/37495\/revisions"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/ubuntuhandbook.org\/index.php\/wp-json\/wp\/v2\/media\/37497"}],"wp:attachment":[{"href":"https:\/\/ubuntuhandbook.org\/index.php\/wp-json\/wp\/v2\/media?parent=37495"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/ubuntuhandbook.org\/index.php\/wp-json\/wp\/v2\/categories?post=37495"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/ubuntuhandbook.org\/index.php\/wp-json\/wp\/v2\/tags?post=37495"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}