zoukankan      html  css  js  c++  java
  • linux(php环境) 安装ffmpeg

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

    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

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

  • 相关阅读:
    Step by Step To Create a K8S Cluster
    Linux简单操作指令
    安装redis 最新版 redis-6.2.6
    GCC升级到11.2.0
    SQL开窗函数
    SQL 树形结构递归查询
    一文详解python的类方法,普通方法和静态方法
    _new_()与_init_()的区别
    关于Python的import机制原理
    【原创】android内存管理-hprof文件
  • 原文地址:https://www.cnblogs.com/lpyan/p/9015890.html
Copyright © 2011-2022 走看看