Chinaunix首页 | 论坛 | 博客
  • 博客访问: 232272
  • 博文数量: 71
  • 博客积分: 10
  • 博客等级: 民兵
  • 技术积分: 817
  • 用 户 组: 普通用户
  • 注册时间: 2012-08-30 08:47
文章分类

全部博文(71)

文章存档

2021年(1)

2020年(2)

2019年(1)

2015年(1)

2014年(26)

2013年(40)

我的朋友

分类: LINUX

2020-02-24 15:55:28

先安装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
.....................
.....................

阅读(1797) | 评论(0) | 转发(0) |
给主人留下些什么吧!~~