Does OpenCV support ffmpeg 6.x versions?

I’m working on a CPP project, and I need to build opencv (working version 4.10) with ffmpeg. I work on Linux (Ubuntu 22.04). The ffmpeg binaries available through apt are for ffmpeg-4.4 and are CPU-only binaries. I need ffmpeg to be built with hardware acceleration as well, so I compiled ffmpeg-6.x from source.

The issue I seem to have is, there are plenty of deprecated calls in opencv for ffmpeg. The version I am on, 4.10, is reliant on ffmpeg functions only available in 4.x version of ffmpeg. Why is this? Does the latest version of opencv (4.11) not provide support for the latest versions of ffmpeg?

not long ago, opencv’s support for ffmpeg was raised from 4.x to 5.x. that alone was a drag and took willpower. try ffmpeg 5.x. opencv should check ffmpeg library versions during compilation and warn about version mismatches.

generally, ffmpeg should refrain from bumping their ABI so often. nobody’s got time to chase a moving target.

@crackwitz

Thanks for helping me understand. I hadn’t quite realised how confusing ffmpeg’s release schedules are. At any given point, they have parallel support for 3+ release versions, which gets incredibly confusing when I also have to deal with their compatibility to different CUDA versions.

More broadly, I am on a video-processing project, where I am using OpenCV matrices. I need a way to stream it over network, say SRT, which is why I needed to compile ffmpeg with OpenCV. So far, so good. I needed hardware acceleration to address CPU throttling, which is when I started running into version mismatches and incompatibilities between ffmpeg, opencv and cuda.