linux离线安装ffmpeg

亲测不会有各种坑!!!

我需要在一台内网环境的centos7.6(192.168.1.33)上安装ffmpeg

可以借助一台有网的服务器,来操作

静态编译FFmpeg

复制代码
./configure --enable-static --disable-shared --prefix=/usr/local/ffmpeg-static
make -j$(nproc)
make install

此时可以看到出现了

复制代码
ffmpeg ffprobe config.h doc/ libav*/ fftools/

打包编译好的二进制文件

复制代码
tar czvf ffmpeg-static.tar.gz /usr/local/ffmpeg-static

在离线服务器上解压即可使用

复制代码
tar xzvf ffmpeg-static.tar.gz -C /usr/local
export PATH=/usr/local/ffmpeg-static/bin:$PATH

查看

复制代码
[root@host-136-64-250-219 ffmpeg]# ffmpeg
ffmpeg version 6.1.1 Copyright (c) 2000-2023 the FFmpeg developers
  built with gcc 4.8.5 (GCC) 20150623 (Red Hat 4.8.5-44)
  configuration: --enable-static --disable-shared --prefix=/usr/local/ffmpeg-static
  libavutil      58. 29.100 / 58. 29.100
  libavcodec     60. 31.102 / 60. 31.102
  libavformat    60. 16.100 / 60. 16.100
  libavdevice    60.  3.100 / 60.  3.100
  libavfilter     9. 12.100 /  9. 12.100
  libswscale      7.  5.100 /  7.  5.100
  libswresample   4. 12.100 /  4. 12.100
Hyper fast Audio and Video encoder
usage: ffmpeg [options] [[infile options] -i infile]... {[outfile options] outfile}...

Use -h to get full help or, even better, run 'man ffmpeg'
相关推荐
leoufung4 分钟前
逆波兰表达式 LeetCode 题解及相关思路笔记
linux·笔记·leetcode
鸠摩智首席音效师7 分钟前
如何在 Linux 中使用 dd 命令 ?
linux·运维·服务器
一夜空中最亮的星一28 分钟前
【Linux】ubuntu24.04 安装docker
linux·docker·eureka
赖small强34 分钟前
【Linux 网络基础】libwebsockets 技术文档
linux·网络·https·tls·lib·websockets
q***51891 小时前
ubuntu 安装 Redis
linux·redis·ubuntu
JuiceFS1 小时前
JuiceFS sync 原理解析与性能优化,企业级数据同步利器
运维·后端
q***47182 小时前
使用Canal将MySQL数据同步到ES(Linux)
linux·mysql·elasticsearch
别动哪条鱼2 小时前
MP4转AAC转换器C++
c++·ffmpeg·音视频·aac
Logan Lie2 小时前
Web服务监听地址的取舍:0.0.0.0 vs 127.0.0.1
运维·后端
别动哪条鱼3 小时前
FFmpeg 核心数据结构关系图
数据结构·ffmpeg