A Straightforward method to build ffmpeg for OpenCV?

I have been working and doing research into how to build the opencv_ffmpegxxx.dll.

I’m working with OpenCV 4.5.5, the contrib modules and Visual Studio 2019. I AM able to compile OpenCV to dll’s and the world version but getting ffmpeg to build is beyond me.

I set the ffmpeg setting in CMake. Nothing, though I do see a number of mentions in the world dll. Perhaps it is being built but if so, I still can’t use that version with Darknet since it “appears” to need the opencv_ffmpegxxx.dll.

After scouring the web I’ve downloaded many versions of ffmpeg. I’ve tried to build them separately, which won’t work for my needs, but I tried. I tried replacing the code in the opencv-master version but still no dll build.

There surely must be a simple and straightforward way to do this. I’m working with Windows 10, Visual Studio 2019, C++, and OpenCV 4.5.5 with the extra modules.

Any ideas out there? I don’t mind if it’s so simple that I completely overlooked it. I would simply like to build the complete version of OpenCV with the ffmpeg dll.

Here you go

Or if you have the ffmpeg libs you could modify the cmake script to link against that instead of using the dll.

1 Like