How to build FFmpeg with h264 support

Viewed 999

i am following the instructions from this link.

https://gist.github.com/RangelReale/3e6392289d8ba1a52b6e70cdd7e10282

i have sucessfully built the h264 library.

while building the ffmpeg library from the following command

./configure --toolchain=msvc --arch=x86_64 --enable-yasm  --enable-asm --enable-shared --disable-static --disable-programs --enable-avresample --enable-libx264 --enable-gpl --prefix=./install

the program is not able to find the h264 lib i get this error.

 ERROR: libx264 not found

how can i point the h264 library to the path.

this is the current path of the library

D:\x264 // location of the h264 library

D:\ffmpeg // location of the ffmpeg source.

1 Answers

I think you need to add:

--extra-ldflags=L../libx264_unpacked_dir --extra-cflags=-I../libx264_unpacked_dir

to your FFmpeg configure line.

In your case, libx264_unpacked_dir = D:\x264

Source: https://trac.ffmpeg.org/wiki/CompilationGuide/MinGW , section x264.

Related