ffmpeg php linux,linux(php环境) 安装ffmpeg

linux(php环境) 安装ffmpeg

创建时间:2019年6月3日(星期一) 下午5:07| 分类:未分类

| 字数:1572  | 另存为... | 打印 | 添加到日历

db107bbae302?utm_campaign=maleskine&utm_content=note&utm_medium=seo_notes&utm_source=recommendation

实现上传视频获取视频的第一帧当做视频封面

1、安装ffmpeg

解压安装包

tar -jxvf ffmpeg-4.0.tar.bz2

//可能这一步会报错,如果报错是  yasm/nasm not found or too old. Use --disable-yasm for a crippledbuild错误

2)解压:tar zxvf yasm-1.3.0.tar.gz

3)切换路径: cd yasm-1.3.0

4)执行配置: ./configure

5)编译:make

6)安装:make install

进入目录

cd ffmpeg-4.0

编译安装

./configure --enable-shared && make && make install

安装完成之后 执行 ffmpeg

如果能够出现类似下列信息,说明ffmpeg安装成功。

ffmpeg version 4.0 Copyright (c) 2000-2018 the FFmpeg developers

built with gcc 4.4.7 (GCC) 20120313 (Red Hat 4.4.7-18)

configuration: --enable-shared

libavutil 56. 14.100 / 56. 14.100

libavcodec 58. 18.100 / 58. 18.100

libavformat 58. 12.100 / 58. 12.100

libavdevice 58. 3.100 / 58. 3.100

libavfilter 7. 16.100 / 7. 16.100

libswscale 5. 1.100 / 5. 1.100

libswresample 3. 1.100 / 3. 1.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'

如果出现:

ffmpeg: error while loading shared libraries: libavdevice.so.52: cannot open shared object file: No such file or directory

编辑这个文件    vim /etc/ld.so.conf

加上

include ld.so.conf.d/*.conf

/usr/local/ffmpeg-4.0

执行ldconfig

再次输入 ffmpeg

以上就是我遇到的问题 并解决

need-to-insert-img

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值