﻿{"id":562,"date":"2020-03-16T21:05:31","date_gmt":"2020-03-16T13:05:31","guid":{"rendered":"https:\/\/www.linuxmi.com\/?p=562"},"modified":"2020-03-16T21:05:31","modified_gmt":"2020-03-16T13:05:31","slug":"centos-8-ffmpeg","status":"publish","type":"post","link":"https:\/\/www.linuxmi.com\/centos-8-ffmpeg.html","title":{"rendered":"\u5982\u4f55\u5728CentOS 8\u4e0a\u5b89\u88c5\u548c\u4f7f\u7528FFmpeg"},"content":{"rendered":"<p>FFmpeg\u662f\u4e00\u4e2a\u514d\u8d39\u7684\u5f00\u653e\u6e90\u4ee3\u7801\u5de5\u5177\u96c6\uff0c\u7528\u4e8e\u5904\u7406\u591a\u5a92\u4f53\u6587\u4ef6\u3002 \u5b83\u5305\u542b\u4e00\u7ec4\u5171\u4eab\u7684\u97f3\u9891\u548c\u89c6\u9891\u5e93\uff0c\u4f8b\u5982libavcodec\uff0clibavformat\u548clibavutil\u3002 \u4f7f\u7528FFmpeg\uff0c\u60a8\u53ef\u4ee5\u5728\u5404\u79cd\u89c6\u9891\u548c\u97f3\u9891\u683c\u5f0f\u4e4b\u95f4\u8f6c\u6362\uff0c\u8bbe\u7f6e\u91c7\u6837\u7387\uff0c\u6355\u83b7\u6d41\u97f3\u9891\/\u89c6\u9891\u4ee5\u53ca\u8c03\u6574\u89c6\u9891\u5927\u5c0f\u3002<\/p>\n<p>\u672c\u6587\u4ecb\u7ecd\u5982\u4f55\u5728CentOS 8\u4e0a\u5b89\u88c5FFmpeg\u3002<\/p>\n<p><strong>\u5728CentOS 8\u4e0a\u5b89\u88c5FFmpeg<\/strong><\/p>\n<p>FFmpeg\u5728\u9ed8\u8ba4\u7684CentOS 8\u5b58\u50a8\u5e93\u4e2d\u4e0d\u53ef\u7528\u3002 \u60a8\u53ef\u4ee5\u9009\u62e9\u4ece\u6e90\u4ee3\u7801\u6784\u5efaFFmpeg\u5de5\u5177\uff0c\u4e5f\u53ef\u4ee5\u4eceNegativo17\u5b58\u50a8\u5e93\u4e2d\u4f7f\u7528dnf\u5b89\u88c5\u5b83\u3002 \u6211\u4eec\u5c06\u9009\u62e9\u7b2c\u4e8c\u4e2a\u9009\u9879\u3002<\/p>\n<p>\u5b8c\u6210\u4ee5\u4e0b\u6b65\u9aa4\u4ee5\u5728CentOS 8\u4e0a\u5b89\u88c5FFmpeg\uff1a<\/p>\n<p>Negativo17\u5b58\u50a8\u5e93\u53d6\u51b3\u4e8eEPEL\u548cPowerTools\u5b58\u50a8\u5e93\u3002 \u4ee5\u8d85\u7ea7\u7528\u6237\u6216\u5177\u6709sudo\u7279\u6743\u7684\u7528\u6237\u8eab\u4efd\u8fd0\u884c\u4ee5\u4e0b\u547d\u4ee4\u4ee5\u542f\u7528\u6240\u9700\u7684\u5b58\u50a8\u5e93\uff1a<\/p>\n<p>[linuxmi@localhost ~\/www.linuxmi.com]$sudo dnf install epel-release<br \/>\n[sudo] linuxmi \u7684\u5bc6\u7801\uff1a<br \/>\n\u4e0a\u6b21\u5143\u6570\u636e\u8fc7\u671f\u68c0\u67e5\uff1a0:27:17 \u524d\uff0c\u6267\u884c\u4e8e 2020\u5e7403\u670816\u65e5 \u661f\u671f\u4e00 07\u65f651\u520651\u79d2\u3002<br \/>\n\u8f6f\u4ef6\u5305 epel-release-8-7.el8.noarch \u5df2\u5b89\u88c5\u3002<br \/>\n\u4f9d\u8d56\u5173\u7cfb\u89e3\u51b3\u3002<br \/>\n\u65e0\u9700\u4efb\u4f55\u5904\u7406\u3002<br \/>\n\u5b8c\u6bd5\uff01<br \/>\n[linuxmi@localhost ~\/www.linuxmi.com]$sudo yum config-manager &#8211;set-enabled PowerTools<br \/>\n[sudo] linuxmi \u7684\u5bc6\u7801\uff1a<br \/>\n[linuxmi@localhost ~\/www.linuxmi.com]$sudo yum-config-manager &#8211;add-repo=https:\/\/negativo17.org\/repos\/epel-multimedia.repo<br \/>\n\u6dfb\u52a0\u4ed3\u5e93\u81ea\uff1ahttps:\/\/negativo17.org\/repos\/epel-multimedia.repo<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"alignnone size-full wp-image-564\" src=\"https:\/\/www.linuxmi.com\/wp-content\/uploads\/2020\/03\/1-1-6.png\" alt=\"\" width=\"734\" height=\"273\" srcset=\"https:\/\/www.linuxmi.com\/wp-content\/uploads\/2020\/03\/1-1-6.png 734w, https:\/\/www.linuxmi.com\/wp-content\/uploads\/2020\/03\/1-1-6-300x112.png 300w, https:\/\/www.linuxmi.com\/wp-content\/uploads\/2020\/03\/1-1-6-430x160.png 430w\" sizes=\"auto, (max-width: 734px) 100vw, 734px\" \/><\/p>\n<p>\u542f\u7528\u5b58\u50a8\u5e93\u540e\uff0c\u5b89\u88c5FFmpeg\uff1a<\/p>\n<p>[linuxmi@localhost ~\/www.linuxmi.com]$sudo dnf install ffmpeg<\/p>\n<p>\u901a\u8fc7\u68c0\u67e5FFmpeg\u7684\u7248\u672c\u6765\u9a8c\u8bc1\u5176\u5b89\u88c5\uff1a<\/p>\n<p>[linuxmi@localhost ~\/www.linuxmi.com]$ffmpeg -version<\/p>\n<p>\u5728\u64b0\u5199\u672c\u6587\u65f6\uff0cNegativo17\u5b58\u50a8\u5e93\u4e2d\u53ef\u7528\u7684FFmpeg\u5f53\u524d\u7248\u672c\u4e3a2.8.15\u3002<\/p>\n<p>[linuxmi@localhost ~\/www.linuxmi.com]$ffmpeg -version<br \/>\nffmpeg version 4.2.2 Copyright (c) 2000-2019 the FFmpeg developers<br \/>\nbuilt with gcc 8 (GCC)<\/p>\n<p>&#8230;<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"alignnone size-large wp-image-565\" src=\"https:\/\/www.linuxmi.com\/wp-content\/uploads\/2020\/03\/1-2-5.png\" alt=\"\" width=\"731\" height=\"469\" srcset=\"https:\/\/www.linuxmi.com\/wp-content\/uploads\/2020\/03\/1-2-5.png 734w, https:\/\/www.linuxmi.com\/wp-content\/uploads\/2020\/03\/1-2-5-300x193.png 300w, https:\/\/www.linuxmi.com\/wp-content\/uploads\/2020\/03\/1-2-5-430x276.png 430w\" sizes=\"auto, (max-width: 731px) 100vw, 731px\" \/><\/p>\n<p>\u8be5\u547d\u4ee4\u8fd8\u5c06\u663e\u793aFFmpeg\u914d\u7f6e\u9009\u9879\u3002<\/p>\n<p>Ok\uff0c\u5c31\u8fd9\u6837\u3002\u73b0\u5728FFmpeg\u5df2\u5b89\u88c5\u5728CentOS\u8ba1\u7b97\u673a\u4e0a\uff0c\u60a8\u53ef\u4ee5\u5f00\u59cb\u4f7f\u7528\u5b83\u4e86\u3002<\/p>\n<p><strong>\u4f7f\u7528FFmpeg<\/strong><\/p>\n<p>\u5728\u672c\u8282\u4e2d\uff0c\u6211\u4eec\u5c06\u770b\u4e00\u4e9b\u6709\u5173\u5982\u4f55\u4f7f\u7528ffmpeg\u5b9e\u7528\u7a0b\u5e8f\u7684\u57fa\u672c\u793a\u4f8b\u3002<\/p>\n<p>\u57fa\u672c\u8f6c\u6362<\/p>\n<p>\u4f7f\u7528ffmpeg\u8f6c\u6362\u97f3\u9891\u548c\u89c6\u9891\u6587\u4ef6\u65f6\uff0c\u4e0d\u5fc5\u6307\u5b9a\u8f93\u5165\u548c\u8f93\u51fa\u683c\u5f0f\u3002 \u81ea\u52a8\u68c0\u6d4b\u5230\u8f93\u5165\u6587\u4ef6\u683c\u5f0f\uff0c\u5e76\u4ece\u6587\u4ef6\u6269\u5c55\u540d\u4e2d\u731c\u6d4b\u8f93\u51fa\u683c\u5f0f\u3002<\/p>\n<p>\u5c06\u89c6\u9891\u6587\u4ef6\u4ecemp4\u8f6c\u6362\u4e3awebm\uff1a<\/p>\n<p>[linuxmi@localhost ~\/www.linuxmi.com]$ffmpeg -i linuxmi.mp4 output.webm<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"alignnone size-large wp-image-566\" src=\"https:\/\/www.linuxmi.com\/wp-content\/uploads\/2020\/03\/1-3-3.png\" alt=\"\" width=\"731\" height=\"469\" srcset=\"https:\/\/www.linuxmi.com\/wp-content\/uploads\/2020\/03\/1-3-3.png 734w, https:\/\/www.linuxmi.com\/wp-content\/uploads\/2020\/03\/1-3-3-300x193.png 300w, https:\/\/www.linuxmi.com\/wp-content\/uploads\/2020\/03\/1-3-3-430x276.png 430w\" sizes=\"auto, (max-width: 731px) 100vw, 731px\" \/><\/p>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"alignnone size-full wp-image-568\" src=\"https:\/\/www.linuxmi.com\/wp-content\/uploads\/2020\/03\/1-10.png\" alt=\"\" width=\"734\" height=\"471\" srcset=\"https:\/\/www.linuxmi.com\/wp-content\/uploads\/2020\/03\/1-10.png 734w, https:\/\/www.linuxmi.com\/wp-content\/uploads\/2020\/03\/1-10-300x193.png 300w, https:\/\/www.linuxmi.com\/wp-content\/uploads\/2020\/03\/1-10-430x276.png 430w\" sizes=\"auto, (max-width: 734px) 100vw, 734px\" \/><\/p>\n<p>\u5c06\u97f3\u9891\u6587\u4ef6\u4ecemp3\u8f6c\u6362\u4e3aogg\uff1a<\/p>\n<p>[linuxmi@localhost ~\/www.linuxmi.com]$ffmpeg -i linuxmi.mp3 output.ogg<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"alignnone size-full wp-image-569\" src=\"https:\/\/www.linuxmi.com\/wp-content\/uploads\/2020\/03\/5.png\" alt=\"\" width=\"734\" height=\"1011\" srcset=\"https:\/\/www.linuxmi.com\/wp-content\/uploads\/2020\/03\/5.png 734w, https:\/\/www.linuxmi.com\/wp-content\/uploads\/2020\/03\/5-218x300.png 218w, https:\/\/www.linuxmi.com\/wp-content\/uploads\/2020\/03\/5-254x350.png 254w\" sizes=\"auto, (max-width: 734px) 100vw, 734px\" \/><\/p>\n<p><strong>\u4f7f\u7528\u7f16\u89e3\u7801\u5668<\/strong><\/p>\n<p>\u8f6c\u6362\u6587\u4ef6\u65f6\uff0c\u8bf7\u4f7f\u7528-c\u9009\u9879\u6307\u5b9a\u7f16\u89e3\u7801\u5668\u3002 \u5b83\u53ef\u4ee5\u662f\u4efb\u4f55\u53d7\u652f\u6301\u7684\u89e3\u7801\u5668\/\u7f16\u7801\u5668\u7684\u540d\u79f0\uff0c\u4e5f\u53ef\u4ee5\u662f\u4ec5\u590d\u5236\u8f93\u5165\u6d41\u7684\u7279\u6b8a\u503c\u526f\u672c\u3002<\/p>\n<p>\u4f7f\u7528libvpx\u89c6\u9891\u7f16\u89e3\u7801\u5668\u548clibvorbis\u97f3\u9891\u7f16\u89e3\u7801\u5668\u5c06\u89c6\u9891\u6587\u4ef6\u4ecemp4\u8f6c\u6362\u4e3awebm\uff1a<\/p>\n<p>[linuxmi@localhost ~\/www.linuxmi.com]$ffmpeg -i linuxmi.mp4 -c:v libvpx -c:a libvorbis output.webm<\/p>\n<p>\u5c06\u97f3\u9891\u6587\u4ef6\u4ecemp3\u8f6c\u6362\u4e3a\u7528libopus\u7f16\u89e3\u7801\u5668\u7f16\u7801\u7684ogg\u3002<\/p>\n<p>[linuxmi@localhost ~\/www.linuxmi.com]$ffmpeg -i linuxmi.mp3 -c:a libopus output.ogg<\/p>\n<p><strong>\u603b\u7ed3<\/strong><\/p>\n<p>\u6211\u4eec\u5df2\u7ecf\u5411\u60a8\u5c55\u793a\u4e86\u5982\u4f55\u5728CentOS 8\u4e0a\u5b89\u88c5FFmpeg\u3002\u73b0\u5728\uff0c\u60a8\u5e94\u8be5\u8bbf\u95eeFFmpeg\u5b98\u65b9\u6587\u6863\u9875\u9762\uff0c\u5e76\u5b66\u4e60\u5982\u4f55\u4f7f\u7528FFmpeg\u8f6c\u6362\u89c6\u9891\u548c\u97f3\u9891\u6587\u4ef6\u3002<\/p>\n<p>\u5982\u679c\u60a8\u9047\u5230\u95ee\u9898\u6216\u6709\u53cd\u9988\uff0c\u8bf7\u5728\u4e0b\u9762\u53d1\u8868\u8bc4\u8bba\u3002<\/p>\n","protected":false},"excerpt":{"rendered":"<p>FFmpeg\u662f\u4e00\u4e2a\u514d\u8d39\u7684\u5f00\u653e\u6e90\u4ee3\u7801\u5de5\u5177\u96c6\uff0c\u7528\u4e8e\u5904\u7406\u591a\u5a92\u4f53\u6587\u4ef6\u3002 \u5b83\u5305\u542b\u4e00\u7ec4\u5171\u4eab\u7684\u97f3\u9891\u548c\u89c6\u9891\u5e93\uff0c\u4f8b\u5982l &hellip;<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"inline_featured_image":false,"_monsterinsights_skip_tracking":false,"_monsterinsights_sitenote_active":false,"_monsterinsights_sitenote_note":"","_monsterinsights_sitenote_category":0,"footnotes":""},"categories":[3],"tags":[23,43],"class_list":["post-562","post","type-post","status-publish","format-standard","hentry","category-linux","tag-centos-8","tag-ffmpeg"],"aioseo_notices":[],"views":1757,"_links":{"self":[{"href":"https:\/\/www.linuxmi.com\/wp-json\/wp\/v2\/posts\/562","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.linuxmi.com\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.linuxmi.com\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.linuxmi.com\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/www.linuxmi.com\/wp-json\/wp\/v2\/comments?post=562"}],"version-history":[{"count":3,"href":"https:\/\/www.linuxmi.com\/wp-json\/wp\/v2\/posts\/562\/revisions"}],"predecessor-version":[{"id":570,"href":"https:\/\/www.linuxmi.com\/wp-json\/wp\/v2\/posts\/562\/revisions\/570"}],"wp:attachment":[{"href":"https:\/\/www.linuxmi.com\/wp-json\/wp\/v2\/media?parent=562"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.linuxmi.com\/wp-json\/wp\/v2\/categories?post=562"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.linuxmi.com\/wp-json\/wp\/v2\/tags?post=562"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}