ffmpeg下载和安装
官网:https://ffmpeg.org
下载
wget https://ffmpeg.org/releases/ffmpeg-6.0.tar.gz
tar -zxvf ffmpeg-6.0.tar.gz
准备工作
安装X264库
yum install -y git (如果已安装GIT则忽略) git clone https://code.videolan.org/videolan/x264.git cd x264
#执行 ./configure --enable-shared --enable-static --disable-asm make && make install
进入解压后的目录安装
cd ffmpeg-6.0
yum install yasm -y #这步省略--下一步可能会报错(如果已安装,则不需要) ./configure --prefix=/usr/local/ffmpeg #需要提前mkdir ffmpeg
make && make install
make编译时间很长很长
检查
[root@VM-16-10-centos m3u8]# cat /etc/ld.so.conf include ld.so.conf.d/*.conf #只显示这个 [root@VM-16-10-centos m3u8]# vim /etc/ld.so.conf /usr/local/ffmpeg/lib #追加上这一行,有则忽略这一步
[root@VM-16-10-centos ffmpeg-6.0]# vim /etc/profile #添加环境变量
export PATH=$PATH:/usr/local/ffmpeg/bin
[root@VM-16-10-centos ffmpeg-6.0]# source /etc/profile
[root@VM-16-10-centos ffmpeg-6.0]# ffmpeg -version #查看版本---如果显示如下,安装成功
ffmpeg version 6.0 Copyright (c) 2000-2023 the FFmpeg developers
built with gcc 4.8.5 (GCC) 20150623 (Red Hat 4.8.5-44)
configuration: --prefix=/usr/local/ffmpeg
libavutil 58. 2.100 / 58. 2.100
libavcodec 60. 3.100 / 60. 3.100
libavformat 60. 3.100 / 60. 3.100
libavdevice 60. 1.100 / 60. 1.100
libavfilter 9. 3.100 / 9. 3.100
libswscale 7. 1.100 / 7. 1.100
libswresample 4. 10.100 / 4. 10.100
【推荐】国内首个AI IDE,深度理解中文开发场景,立即下载体验Trae
【推荐】编程新体验,更懂你的AI,立即体验豆包MarsCode编程助手
【推荐】抖音旗下AI助手豆包,你的智能百科全书,全免费不限次数
【推荐】轻量又高性能的 SSH 工具 IShell:AI 加持,快人一步
· 物流快递公司核心技术能力-地址解析分单基础技术分享
· .NET 10首个预览版发布:重大改进与新特性概览!
· 单线程的Redis速度为什么快?
· 展开说说关于C#中ORM框架的用法!
· Pantheons:用 TypeScript 打造主流大模型对话的一站式集成库