Document Windows FFmpeg build, etc.

Statically link FFmpeg on Windows. This requires building a slimmed-down
version of FFmpeg from source. The build process is documented in the
README.

Also add ffmpeg dependency to the nix flake.
This commit is contained in:
Nunuhara Cabbage
2023-04-02 19:34:45 -07:00
parent 8437a87b54
commit baae8f5237
4 changed files with 41 additions and 5 deletions
+34
View File
@@ -64,6 +64,40 @@ First install MSYS2, and then open the MINGW64 shell and run the following comma
mingw-w64-x86_64-libsndfile \
mingw-w64-x86_64-glew
To build with FFmpeg support, you must compile FFmpeg as a static library:
git clone https://github.com/FFmpeg/FFmpeg.git
cd FFmpeg
git checkout n6.0
./configure --disable-everything \
--enable-decoder=mpegvideo \
--enable-decoder=mpeg1video \
--enable-decoder=mpeg2video \
--enable-decoder=mp2 \
--enable-parser=mpegaudio \
--enable-parser=mpegvideo \
--enable-demuxer=mpegps \
--enable-demuxer=mpegts \
--enable-demuxer=mpegtsraw \
--enable-demuxer=mpegvideo \
--enable-decoder=vc1 \
--enable-decoder=wmapro \
--enable-parser=vc1 \
--enable-hwaccel=vc1_d3d11va \
--enable-hwaccel=vc1_d3d11va2 \
--enable-hwaccel=vc1_dxva2 \
--enable-demuxer=asf \
--enable-protocol=file \
--enable-filter=scale \
--enable-static \
--disable-shared \
--extra-libs=-static \
--extra-cflags=--static
make
make install
cd ..
export PKG_CONFIG_PATH="/usr/local/lib/pkgconfig:$PKG_CONFIG_PATH"
Then build the xsystem4 executable with meson,
mkdir build
+2
View File
@@ -36,6 +36,7 @@
chibi
flex
bison
ffmpeg
];
}
);
@@ -65,6 +66,7 @@
chibi
flex
bison
ffmpeg
];
};
}
+4 -4
View File
@@ -20,10 +20,10 @@ png = dependency('libpng', static : static_libs)
cglm = dependency('cglm', version : '>=0.8.3', fallback : ['cglm', 'cglm_dep'])
sndfile = dependency('sndfile', static : static_libs)
avcodec = dependency('libavcodec', required: false)
avformat = dependency('libavformat', required: false)
avutil = dependency('libavutil', required: false)
swscale = dependency('libswscale', required: false)
avcodec = dependency('libavcodec', required: false, static : static_libs)
avformat = dependency('libavformat', required: false, static : static_libs)
avutil = dependency('libavutil', required: false, static : static_libs)
swscale = dependency('libswscale', required: false, static : static_libs)
gles = dependency('glesv2', version : '>=3', required: get_option('opengles'))
if gles.found()