Linux下 FFmpeg 编译安装
来源:互联网 发布:excel多个数据求和 编辑:程序博客网 时间:2024/06/06 03:42
FFmpeg是一套可以用来记录、转换数字音频、视频,并能将其转化为流的开源计算机程序。
官网:http://ffmpeg.org
一、FFmpeg安装
安装依赖包:
yum install libtheora-devel libvorbis-devel
FFmpeg编译安装:
由于系统不同,会导致依赖也不尽相同,需根据报错信息逐渐安装依赖
wget http://ffmpeg.org/releases/ffmpeg-3.3.2.tar.bz2tar jxvf ffmpeg-3.3.2.tar.bz2cd ffmpeg-3.3.2# 如下是个人需要的编译参数,可以根据实际情况增减./configure --prefix=/data/server/ffmpeg \--enable-shared \--enable-libfdk-aac \--enable-gpl \--enable-nonfree \--enable-postproc \--enable-avfilter \--enable-pthreads \--enable-libmp3lame \--enable-libtheora \--enable-libvorbis \--enable-libx264 \--enable-libxvid \--enable-decoder=libx264 \--enable-encoder=libx264make && make install
安装后,查看版本
./bin/ffmpeg -version
转码:
ffmpeg -i input.mp4 output.avi
二、FFmpeg安装错误解决
有的包下载缓慢,备用下载地址: http://pan.baidu.com/s/1hsEeSNM
- 报错:
yasm/nasm not found or too old. Use --disable-yasm for a crippled build
# rpm包存在的话,可以直接yum安装 yasm,没有则编译安装wget http://www.tortall.net/projects/yasm/releases/yasm-1.3.0.tar.gztar -zxvf yasm.tar.gz./configuremakemake install
- 报错:
ERROR: libfdk_aac not found
https://sourceforge.net/projects/opencore-amr/files/fdk-aac/下载fdk-aac-0.1.5.tar.gz ./configure&& make && make install
- 报错:
ERROR: libtheora not found
http://downloads.xiph.org/releases/theora/?C=M;O=Dlibtheora-1.2.0alpha1.tar.gz./configure && make && make install
- 如下报错:
*** Could not run Ogg test program, checking why...*** The test program failed to compile or link. See the file config.log for the*** exact error that occured. This usually means Ogg was incorrectly installed*** or that you have moved Ogg since it was installed.
http://downloads.xiph.org/releases/ogg/?C=M;O=Dlibogg-1.3.2.tar.gz./configure && make && make install
- 报错:
ERROR: libvorbis not found
http://downloads.xiph.org/releases/vorbis/libvorbis-1.3.3.tar.gz
- 报错:
ERROR: libmp3lame >= 3.98.3 not found
http://downloads.sourceforge.net/lame我下到的是lame-3.99.5.tar.gz./configure && make && make install
- 报错:
ERROR: libx264 not found
git clone git://git.videolan.org/x264.git./configure --enable-shared && make && make install
- 报错:
ERROR: libxvid not found
http://downloads.xvid.org/downloads/xvidcore-1.3.2.tar.gzcd build/generic/./configure && make && make install
- 库文件找不到时解决:
ldd /data/server/ffmpeg/bin/ffmpeg # 查看依赖库文件,找到no found的库文件find / -name libavdevice.so # 查找库文件位置vim/etc/ld.so.conf # 如存在,添加库文件位置/data/server/ffmpeg/lib/ ldconfig # 重新加载,使新库文件生效
参考文档:
https://my.oschina.net/u/998693/blog/406997
http://www.lenky.info/archives/2013/10/2349
http://blog.sina.com.cn/s/blog_61bc01360102w815.html
http://java-er.com/blog/linux-installffmpeg/
阅读全文
0 0
- linux下编译安装ffmpeg
- Linux下编译安装ffmpeg
- linux下安装编译ffmpeg
- Linux下 FFmpeg 编译安装
- linux下编译安装ffmpeg
- ffmpeg-0.6 linux下编译安装
- FFmpeg在Linux下安装编译过程
- linux下编译安装ffmpeg和opencv
- FFmpeg在Linux下安装编译过程
- 【ffmpeg】linux下编译ffmpeg
- Linux下编译FFMpeg
- Linux下编译FFMpeg
- Linux下编译FFMpeg
- linux下编译ffmpeg
- linux下编译FFmpeg
- linux下编译ffmpeg
- linux下编译ffmpeg
- linux下编译ffmpeg
- $.parseJSON() 函数用于将符合标准格式的的JSON字符串转为与之对应的JavaScript对象。
- android性能优化
- 记一次修改系统时间后,Linux重启磁盘superblock不一致故障fsck恢复
- RecycleView的使用总结(需要在gradle中添加依赖)
- How to display hibernate sql parameter values – Log4j
- Linux下 FFmpeg 编译安装
- 电力101/104规约文件服务报文浅析
- 微信小程序登录数据解密以及状态维持
- html5桌面通知 提示
- 区别:指针常量、指针变量、常量指针和常量指针常量
- enqueue_task和dequeue_task源码分析
- [RK3288][Android6.0] 调试笔记 --- touch无法获取坐标点
- JQ多个表单必填 否则弹出提示 完善必填信息
- fmdb数据库的简单使用