FFmpeg是一套可以用来记录、转换数字音频、视频,并能将其转化为流的开源计算机程序。采用LGPL或GPL许可证。它提供了录制、转换以及流化音视频的完整解决方案。下面记录在CentOS 7.5下FFmpeg安装、简单使用的总结,希望对大家有所帮助。
FFmpeg 还是非常好用的,简单一点的可以进行视频的裁剪与压缩。高级些的还可以合并视频等。
1、Linux系统
CentOS 7.5
2、安装
安装EPEL Release,因为安装需要使用其他的repo源,所以需要EPEL支持
[linuxidc@localhost www.linuxidc.com]$ sudo yum install -y epel-release rpm
[linuxidc@localhost www.linuxidc.com]$ sudo rpm –import /etc/pki/rpm-gpg/RPM-GPG-KEY-EPEL-7 //如果出现缺少Code提示,就执行此条命令
[linuxidc@localhost www.linuxidc.com]$ yum repolist //安装完成之后,可以查看是否安装成功
安装Nux-Dextop源
[linuxidc@localhost www.linuxidc.com]$ sudo rpm –import http://li.nux.ro/download/nux/RPM-GPG-KEY-nux.ro //导入一个Code
[linuxidc@localhost www.linuxidc.com]$ sudo rpm -Uvh http://li.nux.ro/download/nux/dextop/el7/x86_64/nux-dextop-release-0-1.el7.nux.noarch.rpm //安装nux-dextop 源
[linuxidc@localhost www.linuxidc.com]$ sudo yum repolist #查看repo源是否安装成功
安装ffmpeg
[linuxidc@localhost www.linuxidc.com]$ sudo yum install -y ffmpeg
[linuxidc@localhost www.linuxidc.com]$ ffmpeg -version
ffmpeg version 2.8.15 Copyright (c) 2000-2018 the FFmpeg developers
built with gcc 4.8.5 (GCC) 20150623 (Red Hat 4.8.5-28)
configuration: –prefix=/usr –bindir=/usr/bin –datadir=/usr/share/ffmpeg –incdir=/usr/include/ffmpeg –libdir=/usr/lib64 –mandir=/usr/share/man –arch=x86_64 –optflags=’-O2 -g -pipe -Wall -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector-strong –param=ssp-buffer-size=4 -grecord-gcc-switches -m64 -mtune=generic’ –extra-ldflags=’-Wl,-z,relro ‘ –enable-libopencore-amrnb –enable-libopencore-amrwb –enable-libvo-amrwbenc –enable-version3 –enable-bzlib –disable-crystalhd –enable-gnutls –enable-ladspa –enable-libass –enable-libcdio –enable-libdc1394 –disable-indev=jack –enable-libfreetype –enable-libgsm –enable-libmp3lame –enable-openal –enable-libopenjpeg –enable-libopus –enable-libpulse –enable-libschroedinger –enable-libsoxr –enable-libspeex –enable-libtheora –enable-libvorbis –enable-libv4l2 –enable-libx264 –enable-libx265 –enable-libxvid –enable-x11grab –enable-avfilter –enable-avresample –enable-postproc –enable-pthreads –disable-static –enable-shared –enable-gpl –disable-debug –disable-stripping –shlibdir=/usr/lib64 –enable-runtime-cpudetect
libavutil 54. 31.100 / 54. 31.100
libavcodec 56. 60.100 / 56. 60.100
libavformat 56. 40.101 / 56. 40.101
libavdevice 56. 4.100 / 56. 4.100
libavfilter 5. 40.101 / 5. 40.101
libavresample 2. 1. 0 / 2. 1. 0
libswscale 3. 1.101 / 3. 1.101
libswresample 1. 2.101 / 1. 2.101
libpostproc 53. 3.100 / 53. 3.100