FFmpegをLGPLでビルドする

そういえばLGPLでビルドする方法を紹介すると昔の記事に書いていましたね。

すっかり忘れてました。


1. MinGWのインストール
 http://sourceforge.net/projects/mingw/files/Installer/mingw-get-inst/
 からダウンロードしましょう。
download_mingw.jpg

 ダウンロードできたらインストールしましょう。
 mingw_install.jpg
C++ Compiler,MSYS Basic System,MinGW Developer Toolkitにチェックを入れるのを忘れずに。

2. NASMのインストール
 http://www.nasm.us/pub/nasm/releasebuilds/2.10.07/ からダウンロードしましょう。
download_nasm.jpg

Visual Studioのコマンドプロンプトを開いて
> C:\MinGW\msys\1.0\msys.bat
MinGWが開いたら
$ cd nasm-2.10.07
$ ./configure –prefix=/mingw
$ make
$ make install

3. FFmpegのインストール
 http://www.ffmpeg.org/download.html からダウンロードしましょう。
download_ffmpeg.jpg

Visual Studioのコマンドプロンプトを開いて
> C:\MinGW\msys\1.0\msys.bat
MinGWが開いたら
$ cd ffmpeg-1.2
$ ./configure --enable-shared --disable-gpl
$ make
$ make install
これで完了です。

ビルドしたファイルは「C:\MinGW\msys\1.0\local」に入っています。
関連記事

コメントの投稿

非公開コメント

makeエラー

上記説明に沿って実行しました。

$ ./configure --enable-shared --disable-gpl

:
:
Enabled outdevs:

License: LGPL version 2.1 or later
libavutil/avconfig.h is unchanged
libavfilter/filter_list.c is unchanged
libavcodec/codec_list.c is unchanged
libavcodec/parser_list.c is unchanged
libavcodec/bsf_list.c is unchanged
libavformat/demuxer_list.c is unchanged
libavformat/muxer_list.c is unchanged
libavdevice/indev_list.c is unchanged
libavdevice/outdev_list.c is unchanged
libavformat/protocol_list.c is unchanged

となり、終了します。次に makeを実行すると、

$ make
:
:
CC libavformat/os_support.o
In file included from libavformat/os_support.h:112:0,
from libavformat/os_support.c:29:
libavformat/os_support.c: In function 'ff_gai_strerror':
libavformat/os_support.c:194:10: error: 'ERROR_NOT_ENOUGH_MEMORY' undeclared (first use in this function)
case EAI_MEMORY:
^
libavformat/os_support.c:194:10: note: each undeclared identifier is reported only once for each function it appears in
At top level:
libavformat/os_support.c:49:12: warning: 'inet_aton' defined but not used [-Wunused-function]
static int inet_aton(const char *str, struct in_addr *add)
^~~~~~~~~
make: *** [libavformat/os_support.o] Error 1

となりエラーが発生します。
どうすればビルドが通るかをアドバイス頂けないでしょうか?

makeエラーの解決方法

私も同じ事象になりましたが、ソースコードを展開した「libavformat」にある「os_support.c」の194~195行目を下記のようにコメントアウトするとmakeできましたよ。

/* case EAI_MEMORY:
return "Memory allocation failure"; */

なおこの部分はネットワーク系エラーの返り値の文字列変換をやっているところの様で、上記改変は動画を扱うffmpegの本業には影響しないとは思います。
が、何卒自己責任でお願いします。(^_^;
プロフィール

puku

Author:puku
暇な時はゲームかプログラミングしてる人だよ。
だいたい月1更新。
CV Drone はこちら(GitHub)

最近はQiitaでOnsenUI2で遊んでいる。

最新記事
最新コメント
最新トラックバック
検索フォーム
カレンダー
02 | 2023/03 | 04
- - - 1 2 3 4
5 6 7 8 9 10 11
12 13 14 15 16 17 18
19 20 21 22 23 24 25
26 27 28 29 30 31 -
月別アーカイブ
カテゴリ
スポンサードリンク
RSSリンクの表示
FC2カウンター
リンク
ブロとも申請フォーム

この人とブロともになる

アクセスランキング
[ジャンルランキング]
コンピュータ
754位
アクセスランキングを見る>>

[サブジャンルランキング]
プログラミング
158位
アクセスランキングを見る>>
FC2ブログランキング

FC2Blog Ranking

QRコード
QR