Skip to content

Instantly share code, notes, and snippets.

@sailfish009
Last active June 22, 2018 01:44
Show Gist options
  • Save sailfish009/8d6761474f87c074703e187a2bc90bbc to your computer and use it in GitHub Desktop.
Save sailfish009/8d6761474f87c074703e187a2bc90bbc to your computer and use it in GitHub Desktop.
build ffmpeg static with visual studio 2015
0.visual studio 2015 update 2 ( 7 GB)
http://download.microsoft.com/download/1/2/1/1211d9dd-b504-47f2-90f2-20cb8b44e096/vs2015.2.ent_enu.iso
1. download ffmpeg source file
http://ffmpeg.org/releases/ffmpeg-3.0.2.tar.bz2
2. download msys2
http://repo.msys2.org/distrib/x86_64/msys2-x86_64-20160205.exe
3. download yasm 64bit and copy it to /usr/bin/yasm.exe
http://www.tortall.net/projects/yasm/releases/yasm-1.3.0-win64.exe
4. pacman -S pkg-config diffutils make
5. run "VS2015 x64 Native Tools Command Promp"
6. cd /msys64 and run mingw64_shell.bat
7. mv /bin/link.exe /bin/link_backup.exe
8. type cl and type link
9. cd /c/ffmpeg
10. export PKG_CONFIG_PATH=/c/ffmpeg
11. run configure
./configure --enable-asm --enable-yasm --arch=amd64 --disable-ffserver --disable-doc --disable-shared --enable-static --disable-bzlib
--disable-libopenjpeg --disable-iconv --disable-zlib --prefix=/c/ffmpeg --toolchain=msvc
12. make && make install
*note: latest openh264 need patch:
http://ffmpeg.org/pipermail/ffmpeg-devel/2016-March/190980.html
export PATH="C:\Program Files (x86)\Microsoft Visual Studio 14.0\VC\bin":$PATH
mkdir build_ffmpeg
../ffmpeg/configure --toolchain=msvc --arch=i386 --enable-version3 --enable-x86asm --enable-asm --disable-static --enable-shared --disable-programs --disable-doc
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment