日本語版はREADME_JP.mdにあります。
Here is the code to build the plugin file used in FFmpeg for Unity. It's attached to that asset, so you don't usually need it.
Both Windows and Linux (Ubuntu20.04 LTS) are required.
On Windows, "MSYS2 MinGW" is required, so please install it in advance.
- Run the following in THIS repository on Linux.
./cross_compile_ffmpeg.sh --build-ffmpeg-static=n --build-ffmpeg-shared=y --enable-gpl=n --ffmpeg-git-checkout-version=n5.1.3
-
Clone this repository on Windows.
-
Replace the files as below.
win/*.lib
,win/*.dll
-> File with the same name insandbox/redist/ffmpeg-N-***-***-win64-shared.7z
win/include/config.h
->sandbox/win64/ffmpeg_git_lgpl_n5.1.1_shared/config.h
win/include/config_components.h
->sandbox/win64/ffmpeg_git_lgpl_n5.1.1_shared/config_components.h
- Edit
win/include/config.h
as follows.
#define HAVE_COMMANDLINETOARGVW 1
->0
#define HAVE_GETPROCESSMEMORYINFO 1
->0
- Run the following in "MSYS2 MinGW".
mkdir build
cd build
cmake .. -G "MSYS Makefiles"
make
- Replace the dll files from
Assets/FfmpegUnity/Plugins/Windows/x64
of the Unity project tolibffmpegDll.dll
and file with the same name insandbox/redist/ffmpeg-N-***-***-win64-shared.7z
.