先安装yasm,ffmpeg会依赖他,当然可以禁用改编译选项
wget
tar zxvf yasm-1.3.0.tar.gz
cd yasm-1.3.0/
./configure
make
make install
安装ffmpge
wget
tar jxvf ffmpeg-4.2.2.tar.bz2
cd ffmpeg-4.2.2/
./configure --enable-shared --prefix=/usr/local/ffmpeg
make
make install
配置ffmpeg库文件路径
# /usr/local/ffmpeg/bin/ffmpeg -h
/usr/local/ffmpeg/bin/ffmpeg: error while loading shared libraries: libavdevice.so.58: cannot open shared object file: No such file or directory
解决方法:
添加如下内容,然后执行ldconfig使其生效
# cat /etc/ld.so.conf.d/ffmpeg.conf
/usr/local/ffmpeg/lib
# ldconfig
验证:
# /usr/local/ffmpeg/bin/ffmpeg -h
ffmpeg version 4.2.2 Copyright (c) 2000-2019 the FFmpeg developers
built with gcc 4.8.5 (GCC) 20150623 (Red Hat 4.8.5-28)
configuration: --enable-shared --prefix=/usr/local/ffmpeg
libavutil 56. 31.100 / 56. 31.100
libavcodec 58. 54.100 / 58. 54.100
libavformat 58. 29.100 / 58. 29.100
libavdevice 58. 8.100 / 58. 8.100
libavfilter 7. 57.100 / 7. 57.100
.....................
.....................
阅读(1852) | 评论(0) | 转发(0) |