ffmpeg 研究

ffmpeg -codecs | grep mp3

可以查看ffmpeg是否把mp3编解码模块编译进去了。

libmp3lame is the mp3 encoder for ffmpeg. It needs to be enabled during configure stage of the build. --enable-libmp3lame should enable it. Also you should libmp3lame-dev installed. I follow this guide to install ffmpeg: https://ffmpeg.org/trac/ffmpeg/wiki/UbuntuCompilationGuide

$ ffmpeg -codecs | grep mp3
ffmpeg version 0.11.1 Copyright (c) 2000-2012 the FFmpeg developers
  built on Jan 25 2013 15:16:27 with llvm_gcc 4.2.1 (Based on Apple Inc. build 5658) (LLVM build 2335.15.00)
  configuration: --prefix=/usr/local/Cellar/ffmpeg/0.11.1 --enable-shared --enable-gpl --enable-version3 --enable-nonfree --enable-hardcoded-tables --cc=/usr/bin/llvm-gcc --host-cflags='-Os -w -pipe -march=core2 -msse4 -mmacosx-version-min=10.7' --host-ldflags=-L/usr/local/lib --enable-libx264 --enable-libfaac --enable-libmp3lame --enable-libxvid
  libavutil      51. 54.100 / 51. 54.100
  libavcodec     54. 23.100 / 54. 23.100
  libavformat    54.  6.100 / 54.  6.100
  libavdevice    54.  0.100 / 54.  0.100
  libavfilter     2. 77.100 /  2. 77.100
  libswscale      2.  1.100 /  2.  1.100
  libswresample   0. 15.100 /  0. 15.100
  libpostproc    52.  0.100 / 52.  0.100
  EA    libmp3lame      libmp3lame MP3 (MPEG audio layer 3)
 D A D  mp3             MP3 (MPEG audio layer 3)
 D A D  mp3adu          ADU (Application Data Unit) MP3 (MPEG audio layer 3)
 D A D  mp3adufloat     ADU (Application Data Unit) MP3 (MPEG audio layer 3)
 D A D  mp3float        MP3 (MPEG audio layer 3)
 D A D  mp3on4          MP3onMP4
 D A D  mp3on4float     MP3onMP4
You can see that E (encoder) is available with libmp3lame.

 

 ffmpeg 命令行查看音视频文件的信息:

ffmpeg -i filename.flv  或者  ffprobe video.flv

 

posted @ 2014-06-18 14:34  微信公众号--共鸣圈  阅读(404)  评论(0编辑  收藏  举报