{"id":3217,"date":"2015-12-08T07:33:59","date_gmt":"2015-12-08T07:33:59","guid":{"rendered":"https:\/\/cpanelplesk.com\/wp62\/?p=3217"},"modified":"2021-02-06T11:34:44","modified_gmt":"2021-02-06T11:34:44","slug":"install-ffmpeg-and-ffmpeg-php-on-centos","status":"publish","type":"post","link":"https:\/\/cpanelplesk.com\/wp62\/install-ffmpeg-and-ffmpeg-php-on-centos\/","title":{"rendered":"How to Install FFmpeg on CentOS"},"content":{"rendered":"<p><span style=\"color: #000000;\">FFmpeg is an awesome\u00a0collection of open-source tools that can record and stream video and audio. However, it can also convert multimedia the files to different formats. <\/span><!--more--><\/p>\n<p><span style=\"color: #000000;\">FFmpeg includes libavcodec audio\/video codec library in it.Today, in this article i am going to show you how to install FFmpeg .<\/span><\/p>\n<p><span style=\"color: #000000;\">Note that I did all the following steps on a CentOS server.<\/span><\/p>\n<p><span style=\"color: #000000;\">The first thing that you need to do is to add the DAG\u00a0repository, to add it do the following steps:<\/span><\/p>\n<p><span style=\"color: #000000;\">Open a file\u00a0<strong>\/etc\/yum.repos.d\/dag.repo\u00a0<\/strong>and add the following lines:<\/span><\/p>\n<div class=\"cpanel-files\"><\/div>\n<pre class=\"lang:default decode:true \">[dag]\r\nname=DAG RPM Repository\r\nbaseurl=http:\/\/apt.sw.be\/redhat\/el$releasever\/en\/$basearch\/dag\r\ngpgcheck=1\r\nenabled=1<\/pre>\n<p><span style=\"color: #000000;\">Once done , Save and close the file.<\/span><\/p>\n<p><span style=\"color: #000000;\">To successfully use the DAG repository with yum tool, you need to add DAG\u2019s GPG key:<\/span><\/p>\n<div class=\"command-sh\">\n<pre class=\"lang:default decode:true \">rpm --import http:\/\/apt.sw.be\/RPM-GPG-KEY.dag.txt<\/pre>\n<\/div>\n<p><span style=\"color: #000000;\">Now DAG is setup, it\u2019s good to update all your packages.<\/span><\/p>\n<div class=\"command-sh\">\n<pre class=\"lang:default decode:true \">yum update<\/pre>\n<\/div>\n<p><span style=\"color: #000000;\">This could potentially upgrade, install, or replace various packages that may or may not be very important to you. Make sure you carefully look through that list and do any essential preparations before telling yum that it can proceed.<\/span><\/p>\n<h2>Installing \u2013 FFmpeg<\/h2>\n<p><span style=\"color: #000000;\">Now you are ready to install FFmpeg with yum.<\/span><\/p>\n<div class=\"command-sh\">\n<pre class=\"lang:default decode:true \">yum install ffmpeg<\/pre>\n<\/div>\n<p><span style=\"color: #000000;\">Now copy ffmpeg.so extenstion under php extensions directory<\/span><\/p>\n<div class=\"cpanel-files\"><\/div>\n<pre>cp \/srv\/build\/ffmpeg-php-0.6.0\/.libs\/ffmpeg.so\u00a0 \/path\/to\/php\r\n\/extemsionmodules\/<\/pre>\n<p><span style=\"color: #000000;\">Add <strong>extension=ffmpeg.so<\/strong> to php.ini file you can find this extension under <strong>.\/lib\/ffmgeg.so<\/strong><\/span><\/p>\n<div class=\"cpanel-files\"><\/div>\n<pre>nano \/path\/to\/php.ini<\/pre>\n<p><span style=\"color: #000000;\">Add below lines at the end of php.ini file<\/span><\/p>\n<div class=\"cpanel-files\"><\/div>\n<pre>[ffmpeg]\r\nextension=ffmpeg.so<\/pre>\n<p><span style=\"color: #000000;\">Now open yum.conf nano \/etc\/yum.conf and add ffmpeg* in exclude line.<\/span><\/p>\n<div class=\"cpanel-files\"><\/div>\n<pre>nano \/etc\/yum.conf\r\nexclude= ffmpeg*<\/pre>\n<p><span style=\"color: #000000;\">Verify the status of ffmpeg extension on a PHP info web page or from command line as given below:<\/span><\/p>\n<div class=\"command-sh\">\n<pre>php -i | grep ffmpeg\r\n\r\nphp -m | grep ffmpeg<\/pre>\n<\/div>\n<p><span style=\"color: #000000;\">After successfully install FFmpeg, let\u2019s check the version installed on system:<\/span><\/p>\n<div class=\"command-sh\">\n<pre class=\"lang:default decode:true \">ffmpeg -version<\/pre>\n<\/div>\n<p><span style=\"color: #000000;\">Here is the list of few ffmepg basic command options:<\/span><\/p>\n<div class=\"command-sh\">\n<pre class=\"lang:default decode:true \">fmpeg -version:            show version\r\nffmpeg -formats:            show available formats\r\nffmpeg -codecs:             show available codecs\r\nffmpeg -decoders:           show available decoders\r\nffmpeg -encoders:           show available encoders\r\nffmpeg -bsfs:               show available bit stream filters\r\nffmpeg -protocols:          show available protocols\r\nffmpeg -filters:            show available filters\r\nffmpeg -pix_fmts:           show available pixel formats\r\nffmpeg -layouts:            show standard channel layouts\r\nffmpeg -sample_fmts:        show available audio sample formats<\/pre>\n<\/div>\n<p>Done.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>FFmpeg is an awesome\u00a0collection of open-source tools that can record and stream video and audio. However, it can also convert multimedia the files to different formats. [&#8230;]<\/p>\n<p><a class=\"understrap-read-more-link\" href=\"https:\/\/cpanelplesk.com\/wp62\/install-ffmpeg-and-ffmpeg-php-on-centos\/\">Continue Reading&#8230;<\/a><\/p>\n","protected":false},"author":2,"featured_media":3219,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[1,14],"tags":[],"class_list":["post-3217","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-cpanel","category-linux"],"yoast_head":"<!-- This site is optimized with the Yoast SEO plugin v24.1 - https:\/\/yoast.com\/wordpress\/plugins\/seo\/ -->\n<title>How to Install FFmpeg on CentOS - cPanel Plesk<\/title>\n<meta name=\"robots\" content=\"index, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1\" \/>\n<link rel=\"canonical\" href=\"https:\/\/cpanelplesk.com\/wp62\/install-ffmpeg-and-ffmpeg-php-on-centos\/\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:title\" content=\"How to Install FFmpeg on CentOS - cPanel Plesk\" \/>\n<meta name=\"twitter:description\" content=\"FFmpeg is an awesome\u00a0collection of open-source tools that can record and stream video and audio. However, it can also convert multimedia the files to different formats. [...]Continue Reading...\" \/>\n<meta name=\"twitter:image\" content=\"https:\/\/cpanelplesk.com\/wp62\/wp-content\/uploads\/2015\/12\/ffmpeg-e1449560025612.jpg\" \/>\n<meta name=\"twitter:label1\" content=\"Written by\" \/>\n\t<meta name=\"twitter:data1\" content=\"Seemab Saleem\" \/>\n\t<meta name=\"twitter:label2\" content=\"Est. reading time\" \/>\n\t<meta name=\"twitter:data2\" content=\"2 minutes\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\/\/schema.org\",\"@graph\":[{\"@type\":\"Article\",\"@id\":\"https:\/\/cpanelplesk.com\/wp62\/install-ffmpeg-and-ffmpeg-php-on-centos\/#article\",\"isPartOf\":{\"@id\":\"https:\/\/cpanelplesk.com\/wp62\/install-ffmpeg-and-ffmpeg-php-on-centos\/\"},\"author\":{\"name\":\"Seemab Saleem\",\"@id\":\"https:\/\/cpanelplesk.com\/wp62\/#\/schema\/person\/73d573cc7eaaf6625cf0dbd72191a648\"},\"headline\":\"How to Install FFmpeg on CentOS\",\"datePublished\":\"2015-12-08T07:33:59+00:00\",\"dateModified\":\"2021-02-06T11:34:44+00:00\",\"mainEntityOfPage\":{\"@id\":\"https:\/\/cpanelplesk.com\/wp62\/install-ffmpeg-and-ffmpeg-php-on-centos\/\"},\"wordCount\":281,\"commentCount\":0,\"publisher\":{\"@id\":\"https:\/\/cpanelplesk.com\/wp62\/#\/schema\/person\/c78ae1cf9451a09592fb9697d69c0c13\"},\"image\":{\"@id\":\"https:\/\/cpanelplesk.com\/wp62\/install-ffmpeg-and-ffmpeg-php-on-centos\/#primaryimage\"},\"thumbnailUrl\":\"https:\/\/cpanelplesk.com\/wp62\/wp-content\/uploads\/2015\/12\/ffmpeg-e1449560025612.jpg\",\"articleSection\":[\"Cpanel\",\"Linux\"],\"inLanguage\":\"en-US\"},{\"@type\":\"WebPage\",\"@id\":\"https:\/\/cpanelplesk.com\/wp62\/install-ffmpeg-and-ffmpeg-php-on-centos\/\",\"url\":\"https:\/\/cpanelplesk.com\/wp62\/install-ffmpeg-and-ffmpeg-php-on-centos\/\",\"name\":\"How to Install FFmpeg on CentOS - cPanel Plesk\",\"isPartOf\":{\"@id\":\"https:\/\/cpanelplesk.com\/wp62\/#website\"},\"primaryImageOfPage\":{\"@id\":\"https:\/\/cpanelplesk.com\/wp62\/install-ffmpeg-and-ffmpeg-php-on-centos\/#primaryimage\"},\"image\":{\"@id\":\"https:\/\/cpanelplesk.com\/wp62\/install-ffmpeg-and-ffmpeg-php-on-centos\/#primaryimage\"},\"thumbnailUrl\":\"https:\/\/cpanelplesk.com\/wp62\/wp-content\/uploads\/2015\/12\/ffmpeg-e1449560025612.jpg\",\"datePublished\":\"2015-12-08T07:33:59+00:00\",\"dateModified\":\"2021-02-06T11:34:44+00:00\",\"breadcrumb\":{\"@id\":\"https:\/\/cpanelplesk.com\/wp62\/install-ffmpeg-and-ffmpeg-php-on-centos\/#breadcrumb\"},\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\/\/cpanelplesk.com\/wp62\/install-ffmpeg-and-ffmpeg-php-on-centos\/\"]}]},{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\/\/cpanelplesk.com\/wp62\/install-ffmpeg-and-ffmpeg-php-on-centos\/#primaryimage\",\"url\":\"https:\/\/cpanelplesk.com\/wp62\/wp-content\/uploads\/2015\/12\/ffmpeg-e1449560025612.jpg\",\"contentUrl\":\"https:\/\/cpanelplesk.com\/wp62\/wp-content\/uploads\/2015\/12\/ffmpeg-e1449560025612.jpg\",\"width\":200,\"height\":200},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\/\/cpanelplesk.com\/wp62\/install-ffmpeg-and-ffmpeg-php-on-centos\/#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Home\",\"item\":\"https:\/\/cpanelplesk.com\/wp62\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"How to Install FFmpeg on CentOS\"}]},{\"@type\":\"WebSite\",\"@id\":\"https:\/\/cpanelplesk.com\/wp62\/#website\",\"url\":\"https:\/\/cpanelplesk.com\/wp62\/\",\"name\":\"cPanel Plesk\",\"description\":\"Blog on famous hosting control panels\",\"publisher\":{\"@id\":\"https:\/\/cpanelplesk.com\/wp62\/#\/schema\/person\/c78ae1cf9451a09592fb9697d69c0c13\"},\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":{\"@type\":\"EntryPoint\",\"urlTemplate\":\"https:\/\/cpanelplesk.com\/wp62\/?s={search_term_string}\"},\"query-input\":{\"@type\":\"PropertyValueSpecification\",\"valueRequired\":true,\"valueName\":\"search_term_string\"}}],\"inLanguage\":\"en-US\"},{\"@type\":[\"Person\",\"Organization\"],\"@id\":\"https:\/\/cpanelplesk.com\/wp62\/#\/schema\/person\/c78ae1cf9451a09592fb9697d69c0c13\",\"name\":\"Farooq Omer\",\"image\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\/\/cpanelplesk.com\/wp62\/#\/schema\/person\/image\/\",\"url\":\"https:\/\/cpanelplesk.com\/wp62\/wp-content\/uploads\/2020\/11\/cpanelplesk.png\",\"contentUrl\":\"https:\/\/cpanelplesk.com\/wp62\/wp-content\/uploads\/2020\/11\/cpanelplesk.png\",\"width\":300,\"height\":44,\"caption\":\"Farooq Omer\"},\"logo\":{\"@id\":\"https:\/\/cpanelplesk.com\/wp62\/#\/schema\/person\/image\/\"}},{\"@type\":\"Person\",\"@id\":\"https:\/\/cpanelplesk.com\/wp62\/#\/schema\/person\/73d573cc7eaaf6625cf0dbd72191a648\",\"name\":\"Seemab Saleem\",\"image\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\/\/cpanelplesk.com\/wp62\/#\/schema\/person\/image\/\",\"url\":\"https:\/\/secure.gravatar.com\/avatar\/6a87ff2e53b03e6839250e5278a6bd46?s=96&d=mm&r=g\",\"contentUrl\":\"https:\/\/secure.gravatar.com\/avatar\/6a87ff2e53b03e6839250e5278a6bd46?s=96&d=mm&r=g\",\"caption\":\"Seemab Saleem\"},\"description\":\"Linux Server Administrator, Web Hosting engineer. I'm dealing with Linux servers since 2014. I started this blog to share the work i love with the world . let me know if you need any assistance. Thanks!!\",\"sameAs\":[\"https:\/\/cpanelplesk.com\/wp62\"],\"url\":\"https:\/\/cpanelplesk.com\/wp62\/author\/cmb\/\"}]}<\/script>\n<!-- \/ Yoast SEO plugin. -->","yoast_head_json":{"title":"How to Install FFmpeg on CentOS - cPanel Plesk","robots":{"index":"index","follow":"follow","max-snippet":"max-snippet:-1","max-image-preview":"max-image-preview:large","max-video-preview":"max-video-preview:-1"},"canonical":"https:\/\/cpanelplesk.com\/wp62\/install-ffmpeg-and-ffmpeg-php-on-centos\/","twitter_card":"summary_large_image","twitter_title":"How to Install FFmpeg on CentOS - cPanel Plesk","twitter_description":"FFmpeg is an awesome\u00a0collection of open-source tools that can record and stream video and audio. However, it can also convert multimedia the files to different formats. [...]Continue Reading...","twitter_image":"https:\/\/cpanelplesk.com\/wp62\/wp-content\/uploads\/2015\/12\/ffmpeg-e1449560025612.jpg","twitter_misc":{"Written by":"Seemab Saleem","Est. reading time":"2 minutes"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"Article","@id":"https:\/\/cpanelplesk.com\/wp62\/install-ffmpeg-and-ffmpeg-php-on-centos\/#article","isPartOf":{"@id":"https:\/\/cpanelplesk.com\/wp62\/install-ffmpeg-and-ffmpeg-php-on-centos\/"},"author":{"name":"Seemab Saleem","@id":"https:\/\/cpanelplesk.com\/wp62\/#\/schema\/person\/73d573cc7eaaf6625cf0dbd72191a648"},"headline":"How to Install FFmpeg on CentOS","datePublished":"2015-12-08T07:33:59+00:00","dateModified":"2021-02-06T11:34:44+00:00","mainEntityOfPage":{"@id":"https:\/\/cpanelplesk.com\/wp62\/install-ffmpeg-and-ffmpeg-php-on-centos\/"},"wordCount":281,"commentCount":0,"publisher":{"@id":"https:\/\/cpanelplesk.com\/wp62\/#\/schema\/person\/c78ae1cf9451a09592fb9697d69c0c13"},"image":{"@id":"https:\/\/cpanelplesk.com\/wp62\/install-ffmpeg-and-ffmpeg-php-on-centos\/#primaryimage"},"thumbnailUrl":"https:\/\/cpanelplesk.com\/wp62\/wp-content\/uploads\/2015\/12\/ffmpeg-e1449560025612.jpg","articleSection":["Cpanel","Linux"],"inLanguage":"en-US"},{"@type":"WebPage","@id":"https:\/\/cpanelplesk.com\/wp62\/install-ffmpeg-and-ffmpeg-php-on-centos\/","url":"https:\/\/cpanelplesk.com\/wp62\/install-ffmpeg-and-ffmpeg-php-on-centos\/","name":"How to Install FFmpeg on CentOS - cPanel Plesk","isPartOf":{"@id":"https:\/\/cpanelplesk.com\/wp62\/#website"},"primaryImageOfPage":{"@id":"https:\/\/cpanelplesk.com\/wp62\/install-ffmpeg-and-ffmpeg-php-on-centos\/#primaryimage"},"image":{"@id":"https:\/\/cpanelplesk.com\/wp62\/install-ffmpeg-and-ffmpeg-php-on-centos\/#primaryimage"},"thumbnailUrl":"https:\/\/cpanelplesk.com\/wp62\/wp-content\/uploads\/2015\/12\/ffmpeg-e1449560025612.jpg","datePublished":"2015-12-08T07:33:59+00:00","dateModified":"2021-02-06T11:34:44+00:00","breadcrumb":{"@id":"https:\/\/cpanelplesk.com\/wp62\/install-ffmpeg-and-ffmpeg-php-on-centos\/#breadcrumb"},"inLanguage":"en-US","potentialAction":[{"@type":"ReadAction","target":["https:\/\/cpanelplesk.com\/wp62\/install-ffmpeg-and-ffmpeg-php-on-centos\/"]}]},{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/cpanelplesk.com\/wp62\/install-ffmpeg-and-ffmpeg-php-on-centos\/#primaryimage","url":"https:\/\/cpanelplesk.com\/wp62\/wp-content\/uploads\/2015\/12\/ffmpeg-e1449560025612.jpg","contentUrl":"https:\/\/cpanelplesk.com\/wp62\/wp-content\/uploads\/2015\/12\/ffmpeg-e1449560025612.jpg","width":200,"height":200},{"@type":"BreadcrumbList","@id":"https:\/\/cpanelplesk.com\/wp62\/install-ffmpeg-and-ffmpeg-php-on-centos\/#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https:\/\/cpanelplesk.com\/wp62\/"},{"@type":"ListItem","position":2,"name":"How to Install FFmpeg on CentOS"}]},{"@type":"WebSite","@id":"https:\/\/cpanelplesk.com\/wp62\/#website","url":"https:\/\/cpanelplesk.com\/wp62\/","name":"cPanel Plesk","description":"Blog on famous hosting control panels","publisher":{"@id":"https:\/\/cpanelplesk.com\/wp62\/#\/schema\/person\/c78ae1cf9451a09592fb9697d69c0c13"},"potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/cpanelplesk.com\/wp62\/?s={search_term_string}"},"query-input":{"@type":"PropertyValueSpecification","valueRequired":true,"valueName":"search_term_string"}}],"inLanguage":"en-US"},{"@type":["Person","Organization"],"@id":"https:\/\/cpanelplesk.com\/wp62\/#\/schema\/person\/c78ae1cf9451a09592fb9697d69c0c13","name":"Farooq Omer","image":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/cpanelplesk.com\/wp62\/#\/schema\/person\/image\/","url":"https:\/\/cpanelplesk.com\/wp62\/wp-content\/uploads\/2020\/11\/cpanelplesk.png","contentUrl":"https:\/\/cpanelplesk.com\/wp62\/wp-content\/uploads\/2020\/11\/cpanelplesk.png","width":300,"height":44,"caption":"Farooq Omer"},"logo":{"@id":"https:\/\/cpanelplesk.com\/wp62\/#\/schema\/person\/image\/"}},{"@type":"Person","@id":"https:\/\/cpanelplesk.com\/wp62\/#\/schema\/person\/73d573cc7eaaf6625cf0dbd72191a648","name":"Seemab Saleem","image":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/cpanelplesk.com\/wp62\/#\/schema\/person\/image\/","url":"https:\/\/secure.gravatar.com\/avatar\/6a87ff2e53b03e6839250e5278a6bd46?s=96&d=mm&r=g","contentUrl":"https:\/\/secure.gravatar.com\/avatar\/6a87ff2e53b03e6839250e5278a6bd46?s=96&d=mm&r=g","caption":"Seemab Saleem"},"description":"Linux Server Administrator, Web Hosting engineer. I'm dealing with Linux servers since 2014. I started this blog to share the work i love with the world . let me know if you need any assistance. Thanks!!","sameAs":["https:\/\/cpanelplesk.com\/wp62"],"url":"https:\/\/cpanelplesk.com\/wp62\/author\/cmb\/"}]}},"_links":{"self":[{"href":"https:\/\/cpanelplesk.com\/wp62\/wp-json\/wp\/v2\/posts\/3217","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/cpanelplesk.com\/wp62\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/cpanelplesk.com\/wp62\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/cpanelplesk.com\/wp62\/wp-json\/wp\/v2\/users\/2"}],"replies":[{"embeddable":true,"href":"https:\/\/cpanelplesk.com\/wp62\/wp-json\/wp\/v2\/comments?post=3217"}],"version-history":[{"count":0,"href":"https:\/\/cpanelplesk.com\/wp62\/wp-json\/wp\/v2\/posts\/3217\/revisions"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/cpanelplesk.com\/wp62\/wp-json\/wp\/v2\/media\/3219"}],"wp:attachment":[{"href":"https:\/\/cpanelplesk.com\/wp62\/wp-json\/wp\/v2\/media?parent=3217"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/cpanelplesk.com\/wp62\/wp-json\/wp\/v2\/categories?post=3217"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/cpanelplesk.com\/wp62\/wp-json\/wp\/v2\/tags?post=3217"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}