{"id":376,"date":"2019-08-19T20:58:11","date_gmt":"2019-08-19T12:58:11","guid":{"rendered":"https:\/\/dell755.cith.ddnsfree.com:5444\/?p=376"},"modified":"2021-02-17T18:57:08","modified_gmt":"2021-02-17T10:57:08","slug":"centos%e4%b8%adyum%e5%ae%89%e8%a3%85ffmpeg","status":"publish","type":"post","link":"https:\/\/blog.cithwu.com\/wp5444\/centos%e4%b8%adyum%e5%ae%89%e8%a3%85ffmpeg\/","title":{"rendered":"CentOS\u4e2dyum\u5b89\u88c5ffmpeg"},"content":{"rendered":"\n<p class=\"wp-block-paragraph\">FFmpeg is a popular open-source solution to record, convert, and stream audio and video, which is widely used in all kinds of online streaming services. This guide has been tested on CentOS 6, 7, and 8.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\" id=\"Prerequisites\">Prerequisites<\/h2>\n\n\n\n<ul class=\"wp-block-list\"><li>Deploy a new Vultr CentOS cloud server instance.<\/li><li>Create a <a href=\"https:\/\/www.vultr.com\/docs\/create-a-sudo-user-on-centos\">sudo user<\/a>.<\/li><li><a href=\"https:\/\/www.vultr.com\/docs\/how-to-update-centos-linux\">Update the system<\/a>.<\/li><\/ul>\n\n\n\n<h2 class=\"wp-block-heading\" id=\"CentOS_8\">CentOS 8<\/h2>\n\n\n\n<p class=\"wp-block-paragraph\">Install the Extra Packages for Enterprise Linux repository.<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>$ sudo yum install https:\/\/dl.fedoraproject.org\/pub\/epel\/epel-release-latest-8.noarch.rpm\n$ sudo yum install https:\/\/download1.rpmfusion.org\/free\/el\/rpmfusion-free-release-8.noarch.rpm https:\/\/download1.rpmfusion.org\/nonfree\/el\/rpmfusion-nonfree-release-8.noarch.rpm\n$ sudo yum install http:\/\/rpmfind.net\/linux\/epel\/7\/x86_64\/Packages\/s\/SDL2-2.0.10-1.el7.x86_64.rpm\n<\/code><\/pre>\n\n\n\n<p class=\"wp-block-paragraph\">Install the FFmpeg and FFmpeg development packages.<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code># sudo yum install ffmpeg ffmpeg-devel\n<\/code><\/pre>\n\n\n\n<h2 class=\"wp-block-heading\" id=\"CentOS_7\">CentOS 7<\/h2>\n\n\n\n<p class=\"wp-block-paragraph\">Install the Nux Dextop repository.<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>$ sudo rpm --import http:\/\/li.nux.ro\/download\/nux\/RPM-GPG-KEY-nux.ro\n$ sudo rpm -Uvh http:\/\/li.nux.ro\/download\/nux\/dextop\/el7\/x86_64\/nux-dextop-release-0-5.el7.nux.noarch.rpm\n<\/code><\/pre>\n\n\n\n<p class=\"wp-block-paragraph\">Install the FFmpeg and FFmpeg development packages.<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>$ sudo yum install ffmpeg ffmpeg-devel -y\n<\/code><\/pre>\n\n\n\n<h2 class=\"wp-block-heading\" id=\"CentOS_6\">CentOS 6<\/h2>\n\n\n\n<p class=\"wp-block-paragraph\">Install the Nux Dextop repository.<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>$ sudo rpm --import http:\/\/li.nux.ro\/download\/nux\/RPM-GPG-KEY-nux.ro\n$ sudo rpm -Uvh http:\/\/li.nux.ro\/download\/nux\/dextop\/el6\/x86_64\/nux-dextop-release-0-2.el6.nux.noarch.rpm\n<\/code><\/pre>\n\n\n\n<p class=\"wp-block-paragraph\">Install the FFmpeg and FFmpeg development packages.<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>$ sudo yum install ffmpeg ffmpeg-devel -y\n<\/code><\/pre>\n\n\n\n<h2 class=\"wp-block-heading\" id=\"Test_the_Installation\">Test the Installation<\/h2>\n\n\n\n<p class=\"wp-block-paragraph\">Confirm the installation of FFmpeg:<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>$ ffmpeg -version\n<\/code><\/pre>\n\n\n\n<p class=\"wp-block-paragraph\"><strong>Example:<\/strong> Convert an MP3 audio file to an OGG audio file.<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>$ cd\n$ wget https:\/\/archive.org\/download\/MLKDream\/MLKDream_64kb.mp3\n$ ffmpeg -i MLKDream_64kb.mp3 -c:a libvorbis -q:a 4 MLKDream_64kb.ogg\n<\/code><\/pre>\n\n\n\n<p class=\"wp-block-paragraph\"><strong>Example:<\/strong> Convert an MP4 video file to an OGG video file.<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>$ cd\n$ wget https:\/\/archive.org\/30\/items\/I_Have_A_Dream_Speech_excerpt\/I_Have_A_Dream_Speech_excerpt.mpeg4 -O MLKDream.mpeg4\n$ ffmpeg -i MLKDream.mpeg4 -codec:v libtheora -qscale:v 3 -codec:a libvorbis -qscale:a 3 -f ogv MLKDream.ogv\n<\/code><\/pre>\n\n\n\n<h2 class=\"wp-block-heading\" id=\"More_Information\">More Information<\/h2>\n","protected":false},"excerpt":{"rendered":"<p>FFmpeg is a popu&#46;&#46;&#46;<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[2],"tags":[],"class_list":["post-376","post","type-post","status-publish","format-standard","hentry","category-linux"],"_links":{"self":[{"href":"https:\/\/blog.cithwu.com\/wp5444\/wp-json\/wp\/v2\/posts\/376","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/blog.cithwu.com\/wp5444\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/blog.cithwu.com\/wp5444\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/blog.cithwu.com\/wp5444\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/blog.cithwu.com\/wp5444\/wp-json\/wp\/v2\/comments?post=376"}],"version-history":[{"count":4,"href":"https:\/\/blog.cithwu.com\/wp5444\/wp-json\/wp\/v2\/posts\/376\/revisions"}],"predecessor-version":[{"id":867,"href":"https:\/\/blog.cithwu.com\/wp5444\/wp-json\/wp\/v2\/posts\/376\/revisions\/867"}],"wp:attachment":[{"href":"https:\/\/blog.cithwu.com\/wp5444\/wp-json\/wp\/v2\/media?parent=376"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/blog.cithwu.com\/wp5444\/wp-json\/wp\/v2\/categories?post=376"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/blog.cithwu.com\/wp5444\/wp-json\/wp\/v2\/tags?post=376"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}