{"id":956,"date":"2021-03-03T11:58:29","date_gmt":"2021-03-03T03:58:29","guid":{"rendered":"http:\/\/blog.yyhcw.com\/?p=956"},"modified":"2021-03-03T11:58:29","modified_gmt":"2021-03-03T03:58:29","slug":"%e5%ae%9d%e5%a1%94%e7%8e%af%e5%a2%83%e5%ae%89%e8%a3%85ffmpeg-%e5%b0%8f%e7%99%bd%e5%bf%85%e7%9c%8b","status":"publish","type":"post","link":"http:\/\/blog.yyhcw.com\/post\/956.html","title":{"rendered":"\u5b9d\u5854\u73af\u5883\u5b89\u88c5FFMPEG \u5c0f\u767d\u5fc5\u770b"},"content":{"rendered":"<!--wp-compress-html--><!--wp-compress-html no compression--><p>\u7f51\u4e0a\u5404\u79cd\u6559\u7a0b\u5404\u79cd\u65b9\u6cd5\uff0c\u5927\u795e\u4eec\u90fd\u5404\u51fa\u5176\u624d\uff1b\u800c\u6211\u53ea\u662f\u4e2a\u5bf9linux\u7684\u5c0f\u767d\uff0c\u5b89\u88c5\u7684\u7cfb\u7edf\u662fCentOS 7.9 \u5b9d\u5854\u514d\u8d39\u72487.5.1\u3002\u9700\u8981\u7528\u5230<a href=\"http:\/\/blog.yyhcw.com\/post\/tag\/ffmpeg\" class=\"tag-tooltip\" data-toggle=\"tooltip\" title=\"\u67e5\u770b\u66f4\u591a\u5173\u4e8e FFMPEG \u7684\u6587\u7ae0\" target=\"_blank\">FFMPEG<\/a>\u6765\u5bf9\u89c6\u9891\u6d41\u8fdb\u884c\u5904\u7406\u64cd\u4f5c\uff1b<\/p>\n<p>\u7531\u4e8e\u5b98\u65b9\u6709\u4e2aFFMPEG2.X\u7248\u672c\uff0c\u5e76\u4e14\u7f51\u4e0a\u8bf4\u6b64\u7248\u672c\u6709\u6f0f\u6d1e\uff0c\u6240\u6709\u60f3\u5b89\u88c5\u6700\u65b0\u7248\u672c\u4f7f\u7528\uff0c\u4e2d\u95f4\u7f51\u4e0a\u67e5\u627e\u5404\u79cd\u5b89\u88c5\u6700\u65b0\u7248\u672c\u7684\u65b9\u6cd5\uff0c\u6700\u7ec8\u90fd\u88ab\u4e00\u4e00\u5426\u51b3\uff0c\u6700\u7ec8\u65e0\u5948\u4e4b\u4e0b\u5c06\u5b98\u65b9\u7684.sh\u6587\u4ef6\u4e0b\u8f7d\u56de\u6765\u53d1\u73b0\u6211\u53ef\u4ee5\u76f4\u63a5\u6539\u5b98\u65b9\u7684\u4e3a\u6700\u65b0\u7248\u8fdb\u884c\u5b89\u88c5\u554a\uff01<\/p>\n<p>\u5b98\u65b9\u5730\u5740\uff1ahttp:\/\/download.bt.cn\/install\/ext\/ffmpeg.sh \u4e0b\u8f7d\u56de\u6765\u67e5\u770b\uff08\u8fd9\u91cc\u653e\u6e90\u7801\u53ea\u662f\u4e3a\u4e86\u9632\u6b62\u90a3\u5929\u5b98\u65b9\u7684\u65e0\u6cd5\u6253\u5f00\u4e0b\u8f7d\u5c31\u5b8c\u4e86\uff09\uff0c<\/p>\n<pre class=\"lang:php decode:true\" title=\"FFMPEG.sh\">#!\/bin\/bash\r\nPATH=\/bin:\/sbin:\/usr\/bin:\/usr\/sbin:\/usr\/local\/bin:\/usr\/local\/sbin:~\/bin\r\nexport PATH\r\n\r\nrunPath=\"\/root\"\r\n\r\nInstall_yasm()\r\n{\r\n\tcd ${runPath}\r\n\twget http:\/\/www.tortall.net\/projects\/yasm\/releases\/yasm-1.3.0.tar.gz\r\n\ttar -xzvf yasm-1.3.0.tar.gz\r\n\tcd yasm-1.3.0\r\n\t.\/configure\r\n\tmake\r\n\tmake install\r\n\tcd ..\r\n\trm -rf yasm*\r\n}\r\nInstall_lame()\r\n{\r\n\tcd ${runPath}\r\n\twget http:\/\/jaist.dl.sourceforge.net\/project\/lame\/lame\/3.99\/lame-3.99.5.tar.gz\r\n\ttar -xzvf lame-3.99.5.tar.gz\r\n\tcd lame-3.99.5\r\n\t.\/configure\r\n\tmake\r\n\tmake install\r\n\tcd ..\r\n\trm -rf lame*\r\n}\r\nInstall_amr()\r\n{\r\n\tcd ${runPath}\r\n\twget http:\/\/downloads.sourceforge.net\/project\/opencore-amr\/opencore-amr\/opencore-amr-0.1.3.tar.gz\r\n\ttar -xzvf opencore-amr-0.1.3.tar.gz\r\n\tcd opencore-amr-0.1.3\r\n\t.\/configure\r\n\tmake\r\n\tmake install\r\n\tcd ..\r\n\trm -rf opencore-amr*\r\n}\r\nInstall_amrnb()\r\n{\r\n\tcd ${runPath}\r\n\twget http:\/\/www.penguin.cz\/~utx\/ftp\/amr\/amrnb-11.0.0.0.tar.bz2\r\n\ttar -xjvf amrnb-11.0.0.0.tar.bz2\r\n\tcd amrnb-11.0.0.0\r\n\t.\/configure\r\n\tmake\r\n\tmake install\r\n\tcd .. \r\n\trm -rf amrnb*\r\n}\r\nInstall_amrwb()\r\n{\r\n\tcd ${runPath}\r\n\twget http:\/\/www.penguin.cz\/~utx\/ftp\/amr\/amrwb-11.0.0.0.tar.bz2\r\n\ttar -xjvf amrwb-11.0.0.0.tar.bz2\r\n\tcd amrwb-11.0.0.0\r\n\t.\/configure\r\n\tmake\r\n\tmake install\r\n\tcd ..\r\n\trm -rf amrwb*\r\n}\r\nInstall_ffmpeg()\r\n{\r\n\tcd ${runPath}\r\n\twget http:\/\/ffmpeg.org\/releases\/ffmpeg-2.5.3.tar.bz2\r\n\ttar -xjvf ffmpeg-2.5.3.tar.bz2\r\n\tcd ffmpeg-2.5.3\r\n\t.\/configure --enable-libmp3lame --enable-libopencore-amrnb --enable-libopencore-amrwb --enable-version3 --enable-shared\r\n\tmake\r\n\tmake install\r\n\tcd ..\r\n\trm -rf ffmpeg*\r\n\tldconfig\r\n}\r\nInstall_yasm\r\nInstall_lame\r\nInstall_amr\r\nInstall_amrnb\r\nInstall_amrwb\r\nInstall_ffmpeg<\/pre>\n<p>\u53d1\u73b0\u9700\u8981\u5b89\u88c5\u597d\u591a\u4e2a\u4e1c\u897f\u624d\u53ef\u4ee5\uff0c\u5176\u5b83\u7684\u5ffd\u7565\uff0c\u53ea\u770b\u6700\u540e\u7684Install_ffmpeg\u53d1\u73b0\u5730\u5740\uff1ahttp:\/\/ffmpeg.org\/releases\/ \u5728\u6d4f\u89c8\u5668\u4e2d\u6253\u5f00\u53ef\u4ee5\u770b\u5230ffmpeg\u7684\u5404\u4e2a\u7248\u672c\uff0c\u4e8e\u662f\u4e4e\u5c31\u5c06\u5b98\u65b9\u76842.5.3\u7248\u672c\u6539\u62104.3.2\u7248\u672c\uff0c\u6700\u7ec8\u4fee\u6539\u7ed3\u679c\u5982\u4e0b\uff1a<\/p>\n<pre class=\"lang:php decode:true\" title=\"Install_ffmpeg\">Install_ffmpeg()\r\n{\r\n\tcd ${runPath}\r\n\twget http:\/\/ffmpeg.org\/releases\/ffmpeg-4.3.2.tar.bz2\r\n\ttar -xjvf ffmpeg-4.3.2.tar.bz2\r\n\tcd ffmpeg-4.3.2\r\n\t.\/configure --enable-libmp3lame --enable-libopencore-amrnb --enable-libopencore-amrwb --enable-version3 --enable-shared\r\n\tmake\r\n\tmake install\r\n\tcd ..\r\n\trm -rf ffmpeg*\r\n\tldconfig\r\n}<\/pre>\n<p>\u4fdd\u5b58\u597d\u6b64\u6587\u4ef6\uff0c\u5e76\u5c06\u6587\u4ef6\u4e0a\u4f20\u5230\u670d\u52a1\u5668\u4efb\u610f\u76ee\u5f55\u4e0b\u5982\uff1a<img decoding=\"async\" loading=\"lazy\" class=\"aligncenter size-full wp-image-957\" src=\"http:\/\/blog.yyhcw.com\/wp-content\/uploads\/2021\/03\/4191540f5e523018.png\" alt=\"\" width=\"630\" height=\"499\" \/><br \/>\n\u6700\u540e\u5728shell\u4e2d\u6267\u884c\uff1a<\/p>\n<pre class=\"lang:php decode:true\">cd \/www\/server\r\n\u548c\r\nsh ffmpeg.sh<\/pre>\n<p>\u63a5\u4e0b\u6765\u559d\u4e2a\u5496\u5561\u7b49\u5f85\u5c31\u884c\u4e86\uff0c\u5b89\u88c5\u5b8c\u6210\u540e\u6267\u884c\uff1a<\/p>\n<pre class=\"lang:php decode:true\">ffmpeg -version<\/pre>\n<p>\u67e5\u770b\u6700\u7ec8\u7ed3\u679c\u5927\u529f\u544a\u6210\uff01\uff01<img decoding=\"async\" loading=\"lazy\" class=\"aligncenter size-full wp-image-958\" src=\"http:\/\/blog.yyhcw.com\/wp-content\/uploads\/2021\/03\/9a7e20d740de238b.png\" alt=\"\" width=\"628\" height=\"467\" \/><\/p>\n<!--wp-compress-html no compression--><!--wp-compress-html-->","protected":false},"excerpt":{"rendered":"\u7f51\u4e0a\u5404\u79cd\u6559\u7a0b\u5404\u79cd\u65b9\u6cd5\uff0c\u5927\u795e\u4eec\u90fd\u5404\u51fa\u5176\u624d\uff1b\u800c\u6211\u53ea\u662f\u4e2a\u5bf9linux\u7684\u5c0f\u767d\uff0c\u5b89\u88c5\u7684\u7cfb\u7edf\u662fCentOS 7.9 \u5b9d\u5854\u514d \u00b7\u00b7\u00b7","protected":false},"author":1,"featured_media":958,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":[],"categories":[3],"tags":[256,69],"views":43280,"_links":{"self":[{"href":"http:\/\/blog.yyhcw.com\/api\/wp\/v2\/posts\/956"}],"collection":[{"href":"http:\/\/blog.yyhcw.com\/api\/wp\/v2\/posts"}],"about":[{"href":"http:\/\/blog.yyhcw.com\/api\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"http:\/\/blog.yyhcw.com\/api\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"http:\/\/blog.yyhcw.com\/api\/wp\/v2\/comments?post=956"}],"version-history":[{"count":0,"href":"http:\/\/blog.yyhcw.com\/api\/wp\/v2\/posts\/956\/revisions"}],"wp:featuredmedia":[{"embeddable":true,"href":"http:\/\/blog.yyhcw.com\/api\/wp\/v2\/media\/958"}],"wp:attachment":[{"href":"http:\/\/blog.yyhcw.com\/api\/wp\/v2\/media?parent=956"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"http:\/\/blog.yyhcw.com\/api\/wp\/v2\/categories?post=956"},{"taxonomy":"post_tag","embeddable":true,"href":"http:\/\/blog.yyhcw.com\/api\/wp\/v2\/tags?post=956"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}