・ Build Confirmed 2023/10/21
Windows 11 22H2 WSL Ubuntu 22.04
Windows 10 22H2 WSL Ubuntu 20.04
# You can build each FFmpeg verisons following
# The build time from the 2nd time onwards is about 10 minutes
./extra/make.sh
./extra/make.sh n5.0.3
./extra/make.sh n5.1.3
./extra/make.sh n6.0
./extra/make.sh master
● 2023/10/21 decklink-headers NotABug.org Git server is downの回避パッチ
・ Update items
* Updated from FFmpeg 4.4.3 to 4.4.4
* fix no member named 'compressed_ten_bit_format'
libavcodec/libsvtav1.c:124:51: error: 'EbSvtAv1EncConfiguration' has no member named 'compressed_ten_bit_format'
change fix method to cherry pick
* Disable libaribcaption --enable-libaribcaption
Because FFmpeg 4.4.x doesn't have this option
* fix ERROR: nvenc requested but not found
specify version nv-codec-headers n12.0.16.1
・ Build Confirmed 2023/10/16
* Windows 11 22H2 WSL Ubuntu 22.04
* Windows 10 22H2 WSL Ubuntu 20.04
ERROR: nvenc requested but not found
n12.1.14.x系は上記のエラーが出るので
nv-codec-headers n12.0.16.1
を使用する。
sed -i -e "s/nv-codec-headers\.git$/nv-codec-headers.git nv-codec-headers_git n12.0.16.1/g" cross_compile_ffmpeg.sh
● FFmpegの実行ファイルを Windowsの C:\ffmpeg_tmpディレクトリにコピー
ls -l ./sandbox/win64/ffmpeg_git_with_fdk_aac_n4.4.4/ff*.exe
ls -l ./sandbox/win64/x264/x*.exe
ls -l ./sandbox/win64/x265/8bit/x*.exe
mkdir /mnt/c/ffmpeg_tmp/
cp ./sandbox/win64/ffmpeg_git_with_fdk_aac_n4.4.4/ff*.exe /mnt/c/ffmpeg_tmp/
cp ./sandbox/win64/x264/x*.exe /mnt/c/ffmpeg_tmp/
cp ./sandbox/win64/x265/8bit/x*.exe /mnt/c/ffmpeg_tmp/
rm /mnt/c/ffmpeg_tmp/ff*_g.exe
ls -l /mnt/c/ffmpeg_tmp/
$ ls -l /mnt/c/ffmpeg_tmp/
-rwxrwxrwx 1 user user 107770368 Oct 16 14:41 ffmpeg.exe
-rwxrwxrwx 1 user user 107632128 Oct 16 14:41 ffplay.exe
-rwxrwxrwx 1 user user 107668480 Oct 16 14:41 ffprobe.exe
-rwxrwxrwx 1 user user 2503168 Oct 16 14:41 x264.exe
-rwxrwxrwx 1 user user 25500368 Oct 16 14:41 x265.exe
● 2023/05/05現在、下記のエラーが出ます
「compressed_ten_bit_formatが無え!」のエラー
libavcodec/libsvtav1.c: In function 'alloc_buffer':
libavcodec/libsvtav1.c:124:51: error: 'EbSvtAv1EncConfiguration' has no member named 'compressed_ten_bit_format'
124 | (config->encoder_bit_depth > 8) && (config->compressed_ten_bit_format == 0) ? 1 : 0;
| ^~
CC libavcodec/libvo-amrwbenc.o
make: *** [ffbuild/common.mak:67: libavcodec/libsvtav1.o] Error 1
make: *** Waiting for unfinished jobs....
# ffmpeg-windows-build-helpers FREE WING改造版をダウンロードする
cd
git clone https://github.com/FREEWING-JP/ffmpeg-windows-build-helpers
cd ffmpeg-windows-build-helpers
# オリジナル版に必要なパッチや各種初期設定を行ない FDK-AACを有効にした FFmpeg 4.4.3をビルドします
※ 2023年 1月現在 4.4.x系は 4.4.3が最新
Win64 (64-bit only)を全自動でビルドします。
(32-bit版が必要な場合は ./extra/build.shを編集します)
# Windows 11の場合は下記を実行します
./extra/make.sh
# Windows 10の場合は下記を実行します
./extra/make_win10.sh
# ビルドが完了するまで数時間待つ
(マシンスペックに依存で1~数時間掛かります)
CPU
WSL Linux
Build Time
Ryzen 5 PRO 3400GE
Windows 11 WSL Ubuntu 22.04
90 min
Ryzen 5 PRO 3400GE
Windows 11 WSL Ubuntu 20.04
75 min
Ryzen 7 PRO 4750G
Windows 10 WSL Ubuntu 20.04
111 min
Core i5-8259U
Windows 10 WSL Ubuntu 20.04
172 min
●下記のビルドの種類の選択は無くしました
必要な場合は ./extra/build.shを編集します。
# 10~20分程度で下記の表示が出る
##################### Welcome ######################
Welcome to the ffmpeg cross-compile builder-helper script.
...
What version of MinGW-w64 would you like to build or update?
1. Both Win32 and Win64
2. Win32 (32-bit only)
3. Win64 (64-bit only)
4. Local native
5. Exit
{2]Input your choice [1-5]: 3
# Win64 (64-bit only)の場合は 3を入力する。
●ビルドが成功!
--enable-libfdk-aacが正しく存在している!
Done! You will find 64-bit static non-redistributable binaries in /home/user/ffmpeg-windows-build-helpers/sandbox/win64/ffmpeg_git_with_fdk_aac_n4.4.3
Thu Jan 19 14:17:28 JST 2023
searching for all local exe's (some may not have been built this round, NB)...
built /home/user/ffmpeg-windows-build-helpers/sandbox/cross_compilers/mingw-w64-x86_64/x86_64-w64-mingw32/bin/ffmpeg.exe
built /home/user/ffmpeg-windows-build-helpers/sandbox/win64/ffmpeg_git_n4.2.8/ffmpeg.exe
built /home/user/ffmpeg-windows-build-helpers/sandbox/win64/ffmpeg_git_with_fdk_aac_n4.4.3/ffmpeg.exe
built /home/user/ffmpeg-windows-build-helpers/sandbox/win64/ffmpeg_git_n4.2.8/ffmpeg_g.exe
built /home/user/ffmpeg-windows-build-helpers/sandbox/win64/ffmpeg_git_with_fdk_aac_n4.4.3/ffmpeg_g.exe
built /home/user/ffmpeg-windows-build-helpers/sandbox/cross_compilers/mingw-w64-x86_64/x86_64-w64-mingw32/bin/ffplay.exe
built /home/user/ffmpeg-windows-build-helpers/sandbox/win64/ffmpeg_git_n4.2.8/ffplay.exe
built /home/user/ffmpeg-windows-build-helpers/sandbox/win64/ffmpeg_git_with_fdk_aac_n4.4.3/ffplay.exe
built /home/user/ffmpeg-windows-build-helpers/sandbox/cross_compilers/mingw-w64-x86_64/x86_64-w64-mingw32/share/doc/ffmpeg
built /home/user/ffmpeg-windows-build-helpers/sandbox/cross_compilers/mingw-w64-x86_64/x86_64-w64-mingw32/share/ffmpeg
built /home/user/ffmpeg-windows-build-helpers/sandbox/cross_compilers/mingw-w64-x86_64/x86_64-w64-mingw32/bin/x264.exe
built /home/user/ffmpeg-windows-build-helpers/sandbox/win64/x264_all_bitdepth/x264.exe
built /home/user/ffmpeg-windows-build-helpers/sandbox/cross_compilers/mingw-w64-x86_64/x86_64-w64-mingw32/bin/x265.exe
built /home/user/ffmpeg-windows-build-helpers/sandbox/win64/x265_all_bitdepth/8bit/x265.exe
$ ls -l ./sandbox/win64/ffmpeg_git_with_fdk_aac_n4.4.3/ffmpeg_g.exe
-rwxr-xr-x 1 user user 256545438 Jan 19 14:17 ./sandbox/win64/ffmpeg_git_with_fdk_aac_n4.4.3/ffmpeg_g.exe
./ffmpeg-windows-build-helpers/sandbox/cross_compilers/mingw-w64-x86_64/x86_64-w64-mingw32/bin/
# ffmpeg-windows-build-helpersをダウンロードする
cd
git clone https://github.com/rdp/ffmpeg-windows-build-helpers
cd ffmpeg-windows-build-helpers
# Ubuntu/ Debianで下記のエラーが出るので OCR機能を無効にする
# ERROR: tesseract not found using pkg-config
# OCR機能は使用しないので無効にする
sed -i -e "s/ build_libtesseract/ # build_libtesseract/g" cross_compile_ffmpeg.sh
sed -i -e "s/--enable-libtesseract//g" cross_compile_ffmpeg.sh
# FFmpeg 4.4.3 for Windows
./cross_compile_ffmpeg.sh --build-ffmpeg-static=y --build-intel-qsv=y --build-amd-amf=y --disable-nonfree=n --ffmpeg-git-checkout-version=n4.4.3
● Could not find the following execs
不足しているパッケージをインストールする。
Could not find the following execs: nasm x86_64-w64-mingw32-g++ i686-w64-mingw32-g++ i686-w64-mingw32-gcc
on ubuntu: sudo apt-get install gcc-mingw-w64-i686 g++-mingw-w64-i686 yasm make automake autoconf git pkg-config libtool-bin nasm gcc-mingw-w64-x86-64 g++-mingw-w64-x86-64 -y
Install the missing packages before running this script.
# 下記を実行する
sudo apt-get install gcc-mingw-w64-i686 g++-mingw-w64-i686 yasm make automake autoconf git pkg-config libtool-bin nasm gcc-mingw-w64-x86-64 g++-mingw-w64-x86-64 -y
● windows WSL detected: you must first disable 'binfmt' by running this
WSLで Windowsのバイナリを実行できる機能を無効にする。
windows WSL detected: you must first disable 'binfmt' by running this
# 下記を実行する
sudo bash -c 'echo 0 > /proc/sys/fs/binfmt_misc/WSLInterop'
● Welcome to the ffmpeg cross-compile builder-helper script.
下記の画面が出たら 1~5の数字を入力する。
Win64 (64-bit only)の場合は 3を入力する。
##################### Welcome ######################
Welcome to the ffmpeg cross-compile builder-helper script.
Downloads and builds will be installed to directories within /home/user/ffmpeg-windows-build-helpers/sandbox
If this is not ok, then exit now, and cd to the directory where you'd
like them installed, then run this script again from there.
NB that once you build your compilers, you can no longer rename/move
the sandbox directory, since it will have some hard coded paths in there.
You can, of course, rebuild ffmpeg from within it, etc.
Wed Jan 18 20:44:35 JST 2023
Building in /home/user/ffmpeg-windows-build-helpers/sandbox, will use ~ 12GB space!
sit back, this may take awhile...
What version of MinGW-w64 would you like to build or update?
1. Both Win32 and Win64
2. Win32 (32-bit only)
3. Win64 (64-bit only)
4. Local native
5. Exit
Input your choice [1-5]: 3
# Win64 (64-bit only)で 3を入力する
ビルドが完了するまで 1時間くらい待つ。
ERROR: tesseract not found using pkg-config
OCR機能は使用しないので無効にする
sed -i -e "s/ build_libtesseract/ # build_libtesseract/g" cross_compile_ffmpeg.sh
sed -i -e "s/--enable-libtesseract//g" cross_compile_ffmpeg.sh
● server certificate verification failed. CAfile: none CRLfile: none
sudo dpkg -r --force-depends "libgc1c2" # remove old libgc
# Removing libgc1c2:amd64 (1:7.6.4-0.4ubuntu1) ...
cd
git clone https://github.com/ivmai/bdwgc --depth 1
cd bdwgc
./autogen.sh
./configure --prefix=/usr && make -j # its default is the wrong directory? huh?
sudo make install
cd ..
● ERROR: The certificate of ‘downloads.sourceforge.net’ is not trusted.
Windows 10 WSL Debian 9.5
make[1]: Leaving directory './ffmpeg-windows-build-helpers/sandbox/cross_compilers/pkgs/mpc/build'
ERROR: The certificate of ‘downloads.sourceforge.net’ is not trusted.
ERROR: The certificate of ‘downloads.sourceforge.net’ has expired.
Failure building 64 bit gcc? Recommend nuke sandbox (rm -rf sandbox) and start over...
sudo apt-get install ca-certificates
sudo update-ca-certificates
sudo dpkg-reconfigure ca-certificates
上記では解決できない。
証明書を無視する方法でも良いが、Debian 9.5は捨てる。
● error: no matching function for call to 'IDeckLinkInput::DoesSupportVideoMode
$ ./cross_compile_ffmpeg.sh --build-ffmpeg-static=y --build-intel-qsv=y --disable-nonfree=n
$ ls -l ./sandbox_quick/win64/quick_install/install_root/ffmpeg_simple_installed/bin/
-rwxr-xr-x 1 user user 31078400 Jan 18 16:46 ffmpeg.exe
-rwxr-xr-x 1 user user 30913024 Jan 18 16:46 ffprobe.exe
$ ls -l ./sandbox_quick/win64/quick_install/install_root/bin/
-rwxr-xr-x 1 user user 3669380 Jan 18 16:36 x264.exe
Everything is Ok
You will find redistributable archive .7z file in /home/user/ffmpeg-windows-build-helpers/sandbox/redist
Thu Jan 19 00:16:11 JST 2023
searching for all local exe's (some may not have been built this round, NB)...
built /home/user/ffmpeg-windows-build-helpers/sandbox/cross_compilers/mingw-w64-x86_64/x86_64-w64-mingw32/bin/ffmpeg.exe
built /home/user/ffmpeg-windows-build-helpers/sandbox/win64/ffmpeg_git_n4.2.8/ffmpeg.exe
built /home/user/ffmpeg-windows-build-helpers/sandbox/win64/ffmpeg_git_n4.2.8/ffmpeg_g.exe
built /home/user/ffmpeg-windows-build-helpers/sandbox/cross_compilers/mingw-w64-x86_64/x86_64-w64-mingw32/bin/ffplay.exe
built /home/user/ffmpeg-windows-build-helpers/sandbox/win64/ffmpeg_git_n4.2.8/ffplay.exe
built /home/user/ffmpeg-windows-build-helpers/sandbox/cross_compilers/mingw-w64-x86_64/x86_64-w64-mingw32/share/doc/ffmpeg
built /home/user/ffmpeg-windows-build-helpers/sandbox/cross_compilers/mingw-w64-x86_64/x86_64-w64-mingw32/share/ffmpeg
built /home/user/ffmpeg-windows-build-helpers/sandbox/cross_compilers/mingw-w64-x86_64/x86_64-w64-mingw32/bin/x264.exe
built /home/user/ffmpeg-windows-build-helpers/sandbox/win64/x264_all_bitdepth/x264.exe
built /home/user/ffmpeg-windows-build-helpers/sandbox/cross_compilers/mingw-w64-x86_64/x86_64-w64-mingw32/bin/x265.exe
built /home/user/ffmpeg-windows-build-helpers/sandbox/win64/x265_all_bitdepth/8bit/x265.exe
> ffmpeg -version
ffmpeg version n4.2.8-ffmpeg-windows-build-helpers Copyright (c) 2000-2022 the FFmpeg developers
built with gcc 10.2.0 (GCC)
configuration: --pkg-config=pkg-config --pkg-config-flags=--static --extra-version=ffmpeg-windows-build-helpers --enable-version3 --disable-debug --disable-w32threads --arch=x86_64 --target-os=mingw32 --cross-prefix=/home/user/ffmpeg-windows-build-helpers/sandbox/cross_compilers/mingw-w64-x86_64/bin/x86_64-w64-mingw32- --enable-libcaca --enable-gray --enable-libtesseract --enable-fontconfig --enable-gmp --enable-libass --enable-libbluray --enable-libbs2b --enable-libflite --enable-libfreetype --enable-libfribidi --enable-libgme --enable-libgsm --enable-libilbc --enable-libmodplug --enable-libmp3lame --enable-libopencore-amrnb --enable-libopencore-amrwb --enable-libopus --enable-libsnappy --enable-libsoxr --enable-libspeex --enable-libtheora --enable-libtwolame --enable-libvo-amrwbenc --enable-libvorbis --enable-libwebp --enable-libzimg --enable-libzvbi --enable-libmysofa --enable-libopenjpeg --enable-libopenh264 --enable-libvmaf --enable-libsrt --enable-libxml2 --enable-opengl --enable-libdav1d --enable-cuda-llvm --enable-gnutls --enable-libaom --enable-nvenc --enable-nvdec --extra-libs=-lharfbuzz --extra-libs=-lm --extra-libs=-lshlwapi --extra-libs=-lmpg123 --extra-libs=-lpthread --extra-cflags=-DLIBTWOLAME_STATIC --extra-cflags=-DMODPLUG_STATIC --extra-cflags=-DCACA_STATIC --enable-amf --enable-libmfx --enable-gpl --enable-frei0r --enable-librubberband --enable-libvidstab --enable-libx264 --enable-libx265 --enable-avisynth --enable-libaribb24 --enable-libxvid --enable-libdavs2 --enable-libxavs2 --enable-libxavs --extra-cflags='-mtune=generic' --extra-cflags=-O3 --enable-static --disable-shared --prefix=/home/user/ffmpeg-windows-build-helpers/sandbox/cross_compilers/mingw-w64-x86_64/x86_64-w64-mingw32 --disable-libdav1d
libavutil 56. 31.100 / 56. 31.100
libavcodec 58. 54.100 / 58. 54.100
libavformat 58. 29.100 / 58. 29.100
libavdevice 58. 8.100 / 58. 8.100
libavfilter 7. 57.100 / 7. 57.100
libswscale 5. 5.100 / 5. 5.100
libswresample 3. 5.100 / 3. 5.100
libpostproc 55. 5.100 / 55. 5.100
● Debian
# Windows 10 22H2 Debian
cat /etc/debian_version
# 9.5
# Windows 11 22H2 Debian
cat /etc/debian_version
# 11.6