FFmpegコンパイル


FFmpegコンパイル


ダウンロード先:https://github.com/FFmpeg/FFmpeg
ディレクトリ準備:FFmpegというディレクトリを作成し、build(コンパイル関連情報の格納)とFFmpeg-master(ソースコード)の2つのディレクトリを作成します.buildパスに@executable_という名前を付けます.pathのディレクトリで、コンパイル結果を格納します.
コンパイル:1コンパイルパスcd*/Fmpeg/buildに入る
2コンパイルパラメータを表示.../FFmpeg-master/configure -h
--disable-securetransport  disable Secure Transport, needed for TLS support on OSX if openssl and gnutls are not used
Found private symbol usage. Symbol: _SecIdentityCreate From framework:/System/Library/Frameworks/Security.framework/Versions/A/Security In binary: Contents/MacOS/lib/libavformat.58.dylib
3コンパイルコマンド
../FFmpeg-master/configure --prefix=@executable_path --libdir=@executable_path --arch=x86 --enable-shared --disable-static --disable-doc --enable-gpl --enable-version3 --enable-libmp3lame --enable-libtheora --enable-libx264  --enable-libx265 --enable-zlib --enable-libvorbis --enable-libopus --disable-securetransport

../FFmpeg-master/configure --prefix=@executable_path --libdir=@executable_path --arch=x86 --enable-shared --disable-static --disable-doc --enable-gpl --enable-version3 --enable-libmp3lame --enable-libtheora --enable-libx264  --enable-libx265 --enable-zlib --enable-libvorbis --enable-libopus --disable-securetransport
ERROR: opus not found using pkg-config ERROR: vorbis not found using pkg-config
export PKG_CONFIG_PATH=/usr/local/pkgconfig:/usr/local/lib/pkgconfig:/usr/share/pkgconfig:/usr/local/lib 64/pkgconfig:/usr/lib 64/pkgconfig libx 264などのライブラリがない場合はbrew installを使用してインストールします.    
4 makeのコンパイルとインストール
make install
5各ライブラリのデフォルト検索パスの変更
libavformat.dylib
install_name_tool -change @executable_path/libavcodec.58.dylib @executable_path/lib/libavcodec.58.dylib "/Volumes/860_500/ /FFmpeg/build/@executable_path/libavformat.58.dylib"

install_name_tool -change @executable_path/libavcodec.58.dylib @executable_path/lib/libavcodec.58.dylib"/Volumes/860_500/学習/Fmpeg/build/@executable_path/libavformat.58.dylib"..