Thread: FFmpegSource
View Single Post
Old 4th April 2020, 20:16   #2573  |  Link
gpower2
gMKVExtractGUI author
 
gpower2's Avatar
 
Join Date: Aug 2003
Location: Greece / Thessaloniki
Posts: 283
FFMS2 latest x64 build

Hey people, since no one seems to have the time for providing a new build for our beloved FFMS2 lib, I decided to make the best out of the COVID quarantine and try to have a go for it.

It was not easy, especially for someone who doesn't compile C/C++ open source cross platform projects often, like me. :P
But at last I managed to have a fully working (and quite a speedy one) x64 build!

ffms2-0628fe6-win64-20200404.7z

I only needed a x64 one, if I manage to find the time I'll provide with a x86 one, but this is one time expensive process, so don't get your hopes up.

Enjoy people!


Build details for the next one who tries to do that:

FFMpeg

branch master, commit: a6e56d12a413013d3a4b39f670e5495805965a67
April 3, 2020

Build tools:
  • MSYS2 x86_64 20190524
  • Latest MSYS2 packages (pacman -S make pkg-config diffutils nasm)
  • VS 2019 16.5.2 Community Edition

Build instructions:
  1. Download latest MSYS2 from http://msys2.github.io/
  2. Open Visual C++ command prompt with environment set for 64-bit MSVC compilation. In my case it is called "x64 Native Tools Command Prompt for VS 2019".
  3. Now open MSYS console from within the MSVC command prompt:
    Code:
    C:\msys64\msys2_shell.cmd -use-full-path
    NOTE: You must specify "-use-full-path" in order for the MSYS2 console to know the PATH from the VS command prompt
  4. Use "pacman" in MSYS2 console to install the packages needed for building FFMpeg
    Code:
    pacman -S make pkg-config diffutils nasm
  5. Configure FFmpeg - run following command in MSYS console:
    Code:
    ./configure --arch=x86_64 --target-os=win64 --toolchain=msvc
  6. Build the binaries - run following command in MSYS console:
    Code:
    make
  7. Install the binaries - run following command in MSYS console:
    Code:
    make install
    NOTE: By default they should end up in C:\msys64\usr\local


ZLib

branch master, commit: cacf7f1d4e3d44d871b605da3b647f07d718623f
Jan 15, 2017 (zlib 1.2.11)

Build tools:
  • Build from contrib\vstudio\vc14\zlibvc.sln in VS 2019 16.5.2 Community Edition in Release x64 configuration
  • Used the contrib\vstudio\vc14\x64\ZlibStatRelease\zlibstat.lib


FFMS2

branch master, commit: 0628fe69f014c398d1c5d15d99934a88a4a65c3b
Mar 30, 2020

Build tools:
  • Build from build-msvc\ffms2.sln in VS 2019 16.5.2 Community Edition in Release x64 configuration

MSVC Project changes:
  • WindowsTargetPlatformVersion: 10.0.16299.0 => 10.0
  • PlatformToolset: v141 => v142
  • Added "../../zlib" in IncludePath
  • Added "../../zlib/contrib/vstudio/vc14/x64/ZlibStatRelease" in LibraryPath
  • Added "bcrypt.lib" in Linker AdditionalDependencies
  • Changed "zlib.lib" to "zlibstat.lib" in Linker AdditionalDependencies
  • Added "../../zlib/contrib/vstudio/vc14/x64/ZlibStatRelease;../../ffmpeg64/lib" in Linker AdditionalLibraryDirectories

Links that helped me fill the blanks:
http://ffmpeg.org/platform.html#Windows
https://ffmpeg.zeranoe.com/forum/vie...php?f=5&t=7497

Last edited by gpower2; 4th April 2020 at 23:41.
gpower2 is offline   Reply With Quote