win10下用WSL编译

环境

  1. win10安装WSL
  2. 安装Ubuntu 20.04 LTS
  3. sudo apt-get install yasm make

编译

  1. "D:\Program Files (x86)\Microsoft Visual Studio\2019\Community\VC\Auxiliary\Build\vcvars32.bat"
  2. bash
  3. ./configure --toolchain=msvc --arch=x86_32 --enable-x86asm --enable-shared --enable-w32threads --disable-doc --disable-static --enable-optimizations --disable-debug --prefix=output
  4. 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

标签: ffmpeg

添加新评论