前言
FFmpeg是一套可以用来记录、转换数字音频、视频,并能将其转化为流的开源计算机程序。 采用LGPL或GPL许可证。 它提供了录制、转换以及流化音视频的完整解决方案。 它包含了非常先进的音频/视频编解码库libavcodec,为了保证高可移植性和编解码质量,libavcodec里很多code都是从头开发的
同时它是一个开源项目,可以将任何格式的音视频文档进行编解码转换播放等等等等,基本可以这么说你对音视频相关的任何需求她都能办到,但首先你得会用她。开源领域内神一样的VLC,还有Media Player Classic都是在用ffmpeg的codec库。
在Mac上安装linux社区的软件常用有两种方式:一、使用MacPorts;二、使用Homebrew,因为我用的是brew所以只说用它安装的方式。
一、安装Homebrew
参考本文:Mac 安装 brew (2020最新,不报错)
二、使用brew安装ffmpeg:
或者直接使用
除了安装选项 --with-ffplay外还有更多的选项如下:
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 | –with-fdk-aac (Enable the Fraunhofer FDK AAC library) –with-ffplay (Enable FFplay media player) –with-freetype (Build with freetype support) –with-frei0r (Build with frei0r support) –with-libass (Enable ASS/SSA subtitle format) –with-libcaca (Build with libcaca support) –with-libvo-aacenc (Enable VisualOn AAC encoder) –with-libvorbis (Build with libvorbis support) –with-libvpx (Build with libvpx support) –with-opencore-amr (Build with opencore-amr support) –with-openjpeg (Enable JPEG 2000 image format) –with-openssl (Enable SSL support) –with-opus (Build with opus support) –with-rtmpdump (Enable RTMP protocol) –with-schroedinger (Enable Dirac video format) –with-speex (Build with speex support) –with-theora (Build with theora support) –with-tools (Enable additional FFmpeg tools) –without-faac (Build without faac support) –without-lame (Disable MP3 encoder) –without-x264 (Disable H.264 encoder) –without-xvid (Disable Xvid MPEG-4 video encoder) –devel (install development version 2.1.1) –HEAD (install HEAD version) |