compiling ffmpeg with libvpx, unable to find decoder

786 Views Asked by At

I am trying to compile ffmpeg with libvpx support on Windows with Visual Studio compiler.

I am using msys2 for building platform and running flowing commands for libvpx

cd libvpx
./configure --prefix="$HOME/ffmpeg_build" --target=x86_64-win64-vs16 --as=yasm
make
make install

then adding path file and compiling ffmpeg

cd ffmpeg
PATH="$HOME/bin:$PATH" 
PKG_CONFIG_PATH="$HOME/ffmpeg_build/lib/pkgconfig" 
./configure --toolchain=msvc --arch=x86_64 \
  --prefix="$HOME/ffmpeg_build" \
  --pkg-config-flags="--static" \
  --extra-cflags="-I$HOME/ffmpeg_build/include" \
  --extra-ldflags="-L$HOME/ffmpeg_build/lib" \
  --extra-libs=-lpthread \
  --extra-libs=-lm \
  --bindir="$HOME/bin" \
  --enable-libvpx 

When I run the command above, I get the errror :

libvpx enabled but no supported decoders found

how can I solve this problem ?

1

There are 1 best solutions below

0
On

You should check the configure log in ffbuild/config.log to see the exact reason why it fails.

My educated guess is that you're mixing-up the Visual Studio C runtime library.

By default libvpx uses the multithread, DLL-specific version of the runtime (/MD), while ffmpeg uses the multithreaded, static version (/MT).

Configure libvpx to use /MT:

./configure \
    --prefix="$HOME/ffmpeg_build"
    --target=x86_64-win64-vs17 \
    --enable-static-msvcrt \
    --disable-examples \
    --disable-unit-tests \
    --as=yasm