Linux-安装FFmpeg  

 

FFmpeg官网:http://www.ffmpeg.org

官网介绍

FFmpeg is the leading multimedia framework, able to decodeencodetranscodemuxdemuxstreamfilter and play pretty much anything that humans and machines have created. It supports the most obscure ancient formats up to the cutting edge. No matter if they were designed by some standards committee, the community or a corporation. It is also highly portable: FFmpeg compiles, runs, and passes our testing infrastructure FATEacross Linux, Mac OS X, Microsoft Windows, the BSDs, Solaris, etc. under a wide variety of build environments, machine architectures, and configurations.

下载安装

  1. 下载最新源码包并解压
$ wget http://ffmpeg.org/releases/ffmpeg-3.1.3.tar.bz2
$ tar jxvf ffmpeg-3.1.3.tar.bz2
  1. 安装ffmpeg
$ cd ffmpeg-3.1.3
$ ./configure
 
Linux-安装FFmpeg
 
安装报错

报了错误,提示yasm没有安装
  1. 安装yasm
  

  解决错误:安装yasm编译器。安装方法如下:

  1)下载:[yasm的下载链接](http://www.tortall.net/projects/yasm/releases/yasm-1.3.0.tar.gz)

  2)解压:把下载下来的压缩包进行解压

  3)切换路径: cd yasm-1.3.0

  4)执行配置: ./configure

  5)编译:make

  6)安装:make install(提示:Permission denied,就执行sudo make install)

  1. 继续安装ffmpeg
$ ./configure
$ make
$ make install
  1. 安装成功
$ ffmpeg

输入ffmpeg打印了相关信息,表示安装成功

 
Linux-安装FFmpeg
 
安装成功


设置软连接
ln -s /usr/local/ffmpeg/bin/ffmpeg  /usr/local/bin/ffmpeg


把视频转换为图片
ffmpeg -i "3.mp4" -r 1 -q:v 2 -f image2 pic-%03d.jpeg

FFmpeg官网:http://www.ffmpeg.org

官网介绍

FFmpeg is the leading multimedia framework, able to decodeencodetranscodemuxdemuxstreamfilter and play pretty much anything that humans and machines have created. It supports the most obscure ancient formats up to the cutting edge. No matter if they were designed by some standards committee, the community or a corporation. It is also highly portable: FFmpeg compiles, runs, and passes our testing infrastructure FATEacross Linux, Mac OS X, Microsoft Windows, the BSDs, Solaris, etc. under a wide variety of build environments, machine architectures, and configurations.

下载安装

  1. 下载最新源码包并解压
$ wget http://ffmpeg.org/releases/ffmpeg-3.1.3.tar.bz2
$ tar jxvf ffmpeg-3.1.3.tar.bz2
  1. 安装ffmpeg
$ cd ffmpeg-3.1.3
$ ./configure
 
Linux-安装FFmpeg
 
安装报错

报了错误,提示yasm没有安装
  1. 安装yasm
  

  解决错误:安装yasm编译器。安装方法如下:

  1)下载:[yasm的下载链接](http://www.tortall.net/projects/yasm/releases/yasm-1.3.0.tar.gz)

  2)解压:把下载下来的压缩包进行解压

  3)切换路径: cd yasm-1.3.0

  4)执行配置: ./configure

  5)编译:make

  6)安装:make install(提示:Permission denied,就执行sudo make install)

  1. 继续安装ffmpeg
$ ./configure
$ make
$ make install
  1. 安装成功
$ ffmpeg

输入ffmpeg打印了相关信息,表示安装成功

 
Linux-安装FFmpeg
 
安装成功


设置软连接
ln -s /usr/local/ffmpeg/bin/ffmpeg  /usr/local/bin/ffmpeg


把视频转换为图片
ffmpeg -i "3.mp4" -r 1 -q:v 2 -f image2 pic-%03d.jpeg