Allow Windows to link directly to FFMpeg

Would it be useful to windows users if they could choose to link directly to the FFmpeg libs instead of using the precompiled opencv_videoio_ffmpegxxx_xx.dll?

For me its useful for development if I want to modify VideoCapture() however it is also useful for other things for example if you want to use Nvidia hardware decoder with VideoCapture() you can simply
set "OPENCV_FFMPEG_CAPTURE_OPTIONS=video_codec;h264_cuvid"
if you build against a version of FFmpeg with this enabled.

1 Like

As a heavy windows developer I would appreciate it. Avoiding “dll hell” is always a time saver and as you mention, there are many times a specific compile switch or flag is needed to get adequate runtime performance.

I believe it should be possible, but you have to use cmake package for FFmpeg which you should create by yourself because it is not part of the library.

Maybe pkg-config can be used too, but to try this you should disable automatic downloading: OPENCV_FFMPEG_SKIP_DOWNLOAD=OFF

1 Like