0
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?

MSYS2 を用いて ffmpeg+libfdk-aac のコンパイルする

Posted at

注意
この記事は二年ほど前に下書きで書き留めていた記事で、勿体ないので公開してみるが、公開時点での追試は行っておらず聊か本筋とは別の不具合が有ったのかもしれないが、何かの参考になればと思い公開してみるので、疑問点はコメントでおねしゃすm(__)m

私的ビルドなメモ👏

巷のビルドメモが溢れちょるけ、ワシが google せんせーの教えを参考に、私的ビルドで aac-he なコーデックと https プロトコルの解釈出来よる ffmpeg ビルドメモじゃけ、ちんまいコトに矛盾点が有るかもしれんけ、何かの参考程度に公開しよる。

大前提

MSYS2 が既にインスコされているものとして記述しよるけ、未インスコの場合は先に MSYS2 をインスコしてから進めんさい。
MSYS2 の取得先
注:ix86 の開発環境インストーラーが 2020 年から更新されちょらんけMSYS2 ix86 インストーラー 2020/5/17版で最終版が公開されちょる。

MSYS2 更新

% pacman -Syu

必要に応じて、数回更新する必要があるけ(大体三回)全ての更新を完了させておく。

次にビルドで必要とするパッケージをインスコする。

ix64版
% pacman -S --needed base-devel mingw-w64-x86_64-toolchain mingw-w64-x86_64-glib-networking gcc
ix86版
% pacman -S --needed base-devel mingw-w64-i686-toolchain mingw-w64-i686-glib-networking gcc

次に、.bash_profileを編集し、次の行を追加します。

export PATH="$PREFIX/bin:$PATH"
export PKG_CONFIG_PATH="$PREFIX/lib/pkgconfig:$PKG_CONFIG_PATH"
export LD_LIBRARY_PATH="$PREFIX/lib:$LD_LIBRARY_PATH"

書き換えが終わりよったら .bash_profileをリロードしんさいよ~

% . .bash_profile

これで、MinGW の環境設定は完了。

gmp のダウンロードとビルド並びにインスコ

% wget -O- ftp://ftp.gnu.org/gnu/gmp/gmp-6.2.1.tar.xz | bsdtar xf -
% cd gmp-6.2.1/
% ./configure
% make install
% cd ../

libfdk-aac のダウンロードとビルド並びにインスコ

% wget -O- https://github.com/mstorsjo/fdk-aac/archive/refs/tags/v2.0.2.tar.gz | bsdtar xf -
% cd fdk-aac-2.0.2/
% ./autogen.sh
% ./configure
% make install
% cd ../

ffmpeg のダウンロードとビルド並びにインスコ

% wget -O- https://ffmpeg.org/releases/ffmpeg-4.4.1.tar.xz | bsdtar xf -
% cd ffmpeg-4.4.1/
% ./configure --enable-gmp --enable-version3 --disable-ffplay --disable-ffprobe --disable-doc --disable-htmlpages --disable-podpages --disable-txtpages --disable-manpages --enable-small --enable-openssl --enable-libfdk-aac
% make install
% cd ../

一応お終い。

gmp のビルドとインスコは不要鴨😉

おまけ libx264 のダウンロードとビルド並びにインスコ

% wget -O- https://code.videolan.org/videolan/x264/-/archive/master/x264-master.tar.bz2 | bsdtar xf -
% cd x264-master/
% env CC=/mingw64/bin/gcc ./configure --enable-shared --enable-static --disable-asm
% make install
0
0
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
0
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?