编译ffmpeg库
win10下用WSL编译
环境
- win10安装WSL
- 安装Ubuntu 20.04 LTS
sudo apt-get install yasm make
编译
"D:\Program Files (x86)\Microsoft Visual Studio\2019\Community\VC\Auxiliary\Build\vcvars32.bat"
bash
./configure --toolchain=msvc --arch=x86_32 --enable-x86asm --enable-shared --enable-w32threads --disable-doc --disable-static --enable-optimizations --disable-debug --prefix=output
make install
Mac 编译
m1机器编译arm64
./configure --arch=arm64 --disable-shared --enable-pthreads --disable-doc --enable-static --enable-optimizations --disable-debug --prefix=output_arm64
make install
intel机器编译x86_64
./configure --arch=x86_64 --disable-shared --enable-pthreads --disable-doc --enable-static --enable-optimizations --disable-debug --prefix=output_x86_64
make install
合并
lipo -create output_arm64/lib/libavcodec.a output_x86_64/lib/libavcodec.a -output /prebuilt/mac/libavcodec.a
strip -S /prebuilt/mac/libavcodec.a