compiling ffmpeg libs with libvpx on windows with msys2

Questions that occur when trying to compile FFmpeg.
Post Reply
Satishsuman
Posts: 1
Joined: Sun Oct 06, 2019 1:14 pm

compiling ffmpeg libs with libvpx on windows with msys2

Post by Satishsuman » Sun Oct 06, 2019 3:14 pm

Hi Zeranoe,
Need some regarding compiling ffmpeg with libvpx enabled on windows. Here is the steps i followed and error i got
1. installed msys2 on windows and installed required packages(git,pkg-config,gcc compiler etc)
2. cloned libvpx from "https://github.com/webmproject/libvpx.git" and created a vs15 solution(command : ./configure --disable-vp8 --disable-vp9-encoder --target=x86_64-win64-vs15)
3. open vpx.sln and compiled vpxmd.lib sucessfully(created a vpx.pc file and kept include and libs at proper place)
4. cloned ffmpeg from https://github.com/FFmpeg/FFmpeg.git and from msys2 i tried building it(command : ./configure --enable-asm --enable-yasm --arch=x86_64 --target-os=win64 --disable-encoders --disable-muxers --enable-libvpx --disable-doc --disable-ffplay --disable-ffprobe --disable-ffmpeg --enable-shared --disable-static --disable-bzlib --disable-libopenjpeg --disable-iconv --disable-zlib --prefix=/d/Stadia/FFmpeg --toolchain=msvc --disable-debug)

ffmpeg libs a building fine but it doesn't include libvpx.
config.log is below:

./ffconf.NEscC1Fm/test.c(4): warning C4311: 'type cast': pointer truncation from 'vpx_codec_iface_t *(__cdecl *)(void)' to 'long'
./compat/windows/mslink /usr/local/lib -nologo -I/usr/local/include -libpath:/usr/local/lib -out:./ffconf.NEscC1Fm/test.exe ./ffconf.NEscC1Fm/test.o vpx.lib
LINK : warning LNK4044: unrecognized option '/IC:/msys64/usr/local/include'; ignored
lib.obj(vp8_vp8_dx_iface.obj) : MSIL .netmodule or module compiled with /GL found; restarting link with /LTCG; add /LTCG to the link command line to improve linker performance
LINK : warning LNK4044: unrecognized option '/IC:/msys64/usr/local/include'; ignored
LINK : warning LNK4098: defaultlib 'MSVCRT' conflicts with use of other libs; use /NODEFAULTLIB:library
lib.obj(vpx_mem_vpx_mem.obj) : error LNK2001: unresolved external symbol __imp_malloc
lib.obj(vp8_decoder_threading.obj) : error LNK2001: unresolved external symbol __imp__beginthreadex
lib.obj(vp8_decoder_decodeframe.obj) : error LNK2001: unresolved external symbol __imp_fopen
./ffconf.NEscC1Fm/test.exe : fatal error LNK1120: 3 unresolved externals

my msys2 is installed at C:/msys2/ and /home/ correspond to C/msys2/home
if i use --extra-ldflags="-L/home/usr/local/lib" , linker treates it as /LC:/msys2/usr/local/lib and hence fails.

A step by step guide would be very much appreciated here

Thanks and regards,
Satish

Post Reply
'