# Does OpenCV support ffmpeg 6.x versions?

**URL:** <https://forum.opencv.org/t/does-opencv-support-ffmpeg-6-x-versions/20957>\
**Category:** C++\
**Tags:** ffmpeg, build, cuda\
**Created:** [May 6, 2025, 11:30am UTC](https://forum.opencv.org/t/does-opencv-support-ffmpeg-6-x-versions/20957 "2025-05-06T11:30:43Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![vishalt](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.opencv.org/vishalt/32/12456_2.png) [@vishalt](https://forum.opencv.org/u/vishalt)\
**Post date:** [May 6, 2025, 11:30am UTC](https://forum.opencv.org/t/does-opencv-support-ffmpeg-6-x-versions/20957/1 "2025-05-06T11:30:43Z")

</div>

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?

---

<div class="post-metadata">

**Author:** ![crackwitz](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.opencv.org/crackwitz/32/14_2.png) [@crackwitz](https://forum.opencv.org/u/crackwitz)\
**Post date:** [May 6, 2025, 3:57pm UTC](https://forum.opencv.org/t/does-opencv-support-ffmpeg-6-x-versions/20957/2 "2025-05-06T15:57:38Z")

</div>

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.

---

<div class="post-metadata">

**Author:** ![vishalt](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.opencv.org/vishalt/32/12456_2.png) [@vishalt](https://forum.opencv.org/u/vishalt)\
**Post date:** [May 6, 2025, 4:20pm UTC](https://forum.opencv.org/t/does-opencv-support-ffmpeg-6-x-versions/20957/3 "2025-05-06T16:20:31Z")

</div>

@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.
