zoukankan      html  css  js  c++  java
  • Centos 7 安装 FFmpeg

    Step 1: Update the system

    sudo yum install epel-release -y
    sudo yum update -y
    sudo shutdown -r now
    

    Step 2: Install the Nux Dextop YUM repo

    There are no official FFmpeg rpm packages for CentOS for now. Instead, you can use a 3rd-party YUM repo, Nux Dextop, to finish the job.

    On CentOS 7, you can install the Nux Dextop YUM repo with the following commands:

    sudo rpm --import http://li.nux.ro/download/nux/RPM-GPG-KEY-nux.ro
    sudo rpm -Uvh http://li.nux.ro/download/nux/dextop/el7/x86_64/nux-dextop-release-0-5.el7.nux.noarch.rpm
    

    For CentOS 6, you need to install another release:

    sudo rpm --import http://li.nux.ro/download/nux/RPM-GPG-KEY-nux.ro
    sudo rpm -Uvh http://li.nux.ro/download/nux/dextop/el6/x86_64/nux-dextop-release-0-2.el6.nux.noarch.rpm
    

    Step 3: Install FFmpeg and FFmpeg development packages

    sudo yum install ffmpeg ffmpeg-devel -y
    

    Step 4: Test drive

    1) Confirm the installation of FFmpeg:

    ffmpeg
    

    This command provides detailed info about FFmpeg installed on your system. At the time of writing, the version of FFmpeg installed using Nux dextop is 2.6.8.

    If you want to learn more about FFmpeg, input:

    ffmpeg -h
    

    2) Convert an mp3 audio file to an ogg audio file.

    You need to determine the appropriate parameters when using FFmpeg. For example, you can convert an mp3 file to an ogg file using the following commands:

    cd
    wget https://archive.org/download/MLKDream/MLKDream_64kb.mp3
    ffmpeg -i MLKDream_64kb.mp3 -c:a libvorbis -q:a 4 MLKDream_64kb.ogg
    

    3) Convert an flv video file to an mp4 video file.

    Here is an example of lossless conversion from flv to mp4:

    cd
    wget https://archive.org/download/beeenieilp/beeen.flv
    ffmpeg -i beeen.flv -y -vcodec copy -acodec copy beeen.mp4
    

    That concludes our tutorial. Thank you for reading.

  • 相关阅读:
    在Vue中使用Echart图表库。【全网最简单】
    asp.net core的授权过滤器中获取action上的Attribute
    用node.js给C#写一个数据表的实体类生成工具
    node.js操作MySQL数据库
    基于node.js的爬虫框架 node-crawler简单尝试
    Angular双向绑定简单理解
    使用.Net core3.0 开发斗图小程序后端+斗图小程序
    Django的命令操作,python
    python,函数式编程
    python 推导式的用法
  • 原文地址:https://www.cnblogs.com/kzwrcom/p/7009843.html
Copyright © 2011-2022 走看看