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

1、安装ffmpeg

ffmpeg的下载链接  https://ffmpeg.org/download.html

解压安装包

tar -jxvf ffmpeg-4.0.tar.bz2

进入目录

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

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

最新文章

  1. 《LINUX内核设计与实现》读书笔记之第五章
  2. Send push notification on Apple (APNS) on c#.net
  3. 旋转toast 自定义toast方向,支持多个方向的显示,自定义View
  4. GO語言視頻教程下載
  5. iOS-NSOperation多线程
  6. 2014--9=17 软工二班 MyEclipse blue==4
  7. 使用matplotlib绘制带图例的图表
  8. 前端跨域之html5 XMLHttpRequest Level2
  9. linux下修改.bash_profile立即生效的三种方法
  10. 在Freeplane中显示与隐藏层级图标
  11. BZOJ_4636_蒟蒻的数列_线段树+动态开点
  12. 基于Xamarin Android实现的简单的浏览器
  13. jQuery省市区三级联动菜单
  14. TypeScript语法学习--基本类型
  15. uva-10670-贪心
  16. 过滤器会拦截 前端页面加载 js文件的请求
  17. 小程序篇- data 数据绑定
  18. MySQL 安装与使用(三)
  19. IOC和DI 控制反转和依赖注入
  20. haskell 常用 函数

热门文章

  1. 51nod 1062【水题】
  2. hdoj4027【线段树】
  3. AGC031 A~C
  4. NSA互联网公开情报收集指南:迷宫中的秘密·下
  5. profile和bashrc
  6. AppStore 审核拒绝原因记录
  7. Educational Codeforces Round 19 A
  8. js 获取最后一个字符
  9. js中关于this的理解
  10. PHP的加密方式