Mac配置FFmpeg环境和编译IOS FFmpeg库

参考这两篇文章,先配置Mac 下 FFmpeg环境,再编译IOS FFmpeg库

Mac配置FFmpeg:     https://www.jianshu.com/p/70b0af4d0ec7
编译IOS FFmpeg库:  https://blog.csdn.net/To_by/article/details/52151077



过程中遇到的问题:

一,关于MAC系统没有修改usr bin和usr sbin文件夹权限问题

1.重启电脑
2.command + R 进入recover模式 
3.点击最上方菜单使用工具,选择终端 
4.运行命令csrutil disable 
5.当出现successfully字样,代表关闭成功

二,xcode9环境下错误 xcrun -sdk iphoneos clang is unable to create an executable file.

终端执行以下命令:
sudo xcode-select --switch /Applications/Xcode.app

三,mac配置FFmpeg后没有ffplay的解决办法

终端执行以下命令:
brew reinstall ffmpeg --with-sdl2

四,mac FFmpeg集成所需库的方法

brew reinstall ffmpeg --with-sdl2 --with-fdk-aac --with-fontconfig

可以添加多个
==> Options
--with-chromaprint
    Enable the Chromaprint audio fingerprinting library
--with-fdk-aac
    Enable the Fraunhofer FDK AAC library
--with-fontconfig
    Build with fontconfig support
--with-freetype
    Build with freetype support
--with-frei0r
    Build with frei0r support
--with-game-music-emu
    Build with game-music-emu support
--with-libass
    Enable ASS/SSA subtitle format
--with-libbluray
    Build with libbluray support
--with-libbs2b
    Build with libbs2b support
--with-libcaca
    Build with libcaca support
--with-libgsm
    Build with libgsm support
--with-libmodplug
    Build with libmodplug support
--with-librsvg
    Enable SVG files as inputs via librsvg
--with-libsoxr
    Enable the soxr resample library
--with-libssh
    Enable SFTP protocol via libssh
--with-libvidstab
    Enable vid.stab support for video stabilization
--with-libvorbis
    Build with libvorbis support
--with-libvpx
    Build with libvpx support
--with-opencore-amr
    Enable Opencore AMR NR/WB audio format
--with-openh264
    Enable OpenH264 library
--with-openjpeg
    Enable JPEG 2000 image format
--with-openssl
    Enable SSL support
--with-opus
    Build with opus support
--with-rtmpdump
    Enable RTMP protocol
--with-rubberband
    Enable rubberband library
--with-sdl2
    Enable FFplay media player
--with-snappy
    Enable Snappy library
--with-speex
    Build with speex support
--with-srt
    Enable SRT library
--with-tesseract
    Enable the tesseract OCR engine
--with-theora
    Build with theora support
--with-tools
    Enable additional FFmpeg tools
--with-two-lame
    Build with two-lame support
--with-wavpack
    Build with wavpack support
--with-webp
    Enable using libwebp to encode WEBP images
--with-x265
    Enable x265 encoder
--with-xz
    Enable decoding of LZMA-compressed TIFF files
--with-zeromq
    Enable using libzeromq to receive commands sent through a libzeromq client
--with-zimg
    Enable z.lib zimg library
--without-gpl
    Disable building GPL licensed parts of FFmpeg
--without-lame
    Disable MP3 encoder
--without-qtkit
    Disable deprecated QuickTime framework
--without-securetransport
    Disable use of SecureTransport
--without-x264
    Disable H.264 encoder
--without-xvid
    Disable Xvid MPEG-4 video encoder

你可能感兴趣的:(Mac配置FFmpeg环境和编译IOS FFmpeg库)