#1144031 opencv: FTBFS with ffmpeg 9.0

Package:
src:opencv
Source:
src:opencv
Submitter:
Sebastian Ramacher
Date:
2026-09-20 20:39:02 UTC
Severity:
normal
Tags:
#1144031#5
Date:
2026-08-09 22:34:34 UTC
From:
To:
Source: opencv
Version: 4.10.0+dfsg-8
Severity: important
Tags: ftbfs sid forky
X-Debbugs-Cc: sramacher@debian.org
Usertags: ffmpeg-9.0

Dear maintainer,

opencv FTBFS with ffmpeg 9.0 (available in experimental).

FAILED: [code=1] modules/videoio/CMakeFiles/opencv_videoio.dir/src/cap_ffmpeg.cpp.o
/usr/bin/aarch64-linux-gnu-g++ -DCVAPI_EXPORTS -DENABLE_PLUGINS -DHAVE_CAMV4L2 -DHAVE_DC1394_2 -DHAVE_FFMPEG -DHAVE_GPHOTO2 -DHAVE_GSTREAMER -DHAVE_OBSENSOR -DHAVE_OBSENSOR_V4L2 -D_USE_MATH_DEFINES -D__OPENCV_BUILD=1 -D__STDC_CONSTANT_MACROS -D__STDC_FORMAT_MACROS -D__STDC_LIMIT_MACROS -I/build/reproducible-path/opencv-4.10.0+dfsg/obj-aarch64-linux-gnu -I/build/reproducible-path/opencv-4.10.0+dfsg/modules/videoio/include -I/build/reproducible-path/opencv-4.10.0+dfsg/obj-aarch64-linux-gnu/modules/videoio -I/build/reproducible-path/opencv-4.10.0+dfsg/modules/core/include -I/build/reproducible-path/opencv-4.10.0+dfsg/modules/imgproc/include -I/build/reproducible-path/opencv-4.10.0+dfsg/modules/imgcodecs/include -isystem /usr/include/gdal -isystem /usr/include/eigen3 -isystem /usr/include/gstreamer-1.0 -isystem /usr/include/glib-2.0 -isystem /usr/lib/aarch64-linux-gnu/glib-2.0/include -isystem /usr/include/sysprof-6 -isystem /usr/include/orc-0.4 -isystem /usr/include/libdrm -isystem /usr/include/CL -isystem /usr/include/gphoto2 -g -O2 -ffile-prefix-map=/build/reproducible-path/opencv-4.10.0+dfsg=. -fstack-protector-strong -fstack-clash-protection -Wformat -Werror=format-security -mbranch-protection=standard -Wdate-time -D_FORTIFY_SOURCE=2   -fsigned-char -W -Wall -Wreturn-type -Wnon-virtual-dtor -Waddress -Wsequence-point -Wformat -Wformat-security -Wmissing-declarations -Wundef -Winit-self -Wpointer-arith -Wshadow -Wsign-promo -Wuninitialized -Wsuggest-override -Wno-delete-non-virtual-dtor -Wno-comment -Wimplicit-fallthrough=3 -Wno-strict-overflow -fdiagnostics-show-option -pthread -fomit-frame-pointer -ffunction-sections -fdata-sections    -fvisibility=hidden -fvisibility-inlines-hidden -g -O2 -ffile-prefix-map=/build/reproducible-path/opencv-4.10.0+dfsg=. -fstack-protector-strong -fstack-clash-protection -Wformat -Werror=format-security -mbranch-protection=standard  -DNDEBUG -std=c++11 -fPIC -MD -MT modules/videoio/CMakeFiles/opencv_videoio.dir/src/cap_ffmpeg.cpp.o -MF modules/videoio/CMakeFiles/opencv_videoio.dir/src/cap_ffmpeg.cpp.o.d -o modules/videoio/CMakeFiles/opencv_videoio.dir/src/cap_ffmpeg.cpp.o -c /build/reproducible-path/opencv-4.10.0+dfsg/modules/videoio/src/cap_ffmpeg.cpp
In file included from /build/reproducible-path/opencv-4.10.0+dfsg/modules/videoio/src/cap_ffmpeg_impl.hpp:175,
                 from /build/reproducible-path/opencv-4.10.0+dfsg/modules/videoio/src/cap_ffmpeg.cpp:50:
/build/reproducible-path/opencv-4.10.0+dfsg/modules/videoio/src/cap_ffmpeg_hw.hpp: In function ‘AVCodec* hw_find_codec(AVCodecID, AVHWDeviceType, int (*)(const AVCodec*), const char*, AVPixelFormat*)’:
/build/reproducible-path/opencv-4.10.0+dfsg/modules/videoio/src/cap_ffmpeg_hw.hpp:741:82: error: ‘AVCodec’ {aka ‘struct AVCodec’} has no member named ‘pix_fmts’
  741 |             if (av_codec_is_encoder(c) && hw_native_fmt != AV_PIX_FMT_NONE && c->pix_fmts) {
      |                                                                                  ^~~~~~~~
/build/reproducible-path/opencv-4.10.0+dfsg/modules/videoio/src/cap_ffmpeg_hw.hpp:742:36: error: ‘AVCodec’ {aka ‘struct AVCodec’} has no member named ‘pix_fmts’
  742 |                 for (int i = 0; c->pix_fmts[i] != AV_PIX_FMT_NONE; i++) {
      |                                    ^~~~~~~~
/build/reproducible-path/opencv-4.10.0+dfsg/modules/videoio/src/cap_ffmpeg_hw.hpp:743:28: error: ‘AVCodec’ {aka ‘struct AVCodec’} has no member named ‘pix_fmts’
  743 |                     if (c->pix_fmts[i] == hw_native_fmt) {
      |                            ^~~~~~~~
/build/reproducible-path/opencv-4.10.0+dfsg/modules/videoio/src/cap_ffmpeg_impl.hpp: In function ‘AVCodecContext* icv_configure_video_stream_FFMPEG(AVFormatContext*, AVStream*, const AVCodec*, int, int, int, double, AVPixelFormat, int, AVCodecID)’:
/build/reproducible-path/opencv-4.10.0+dfsg/modules/videoio/src/cap_ffmpeg_impl.hpp:2295:24: error: ‘const AVCodec’ {aka ‘const struct AVCodec’} has no member named ‘supported_framerates’
 2295 |     if(codec && codec->supported_framerates){
      |                        ^~~~~~~~~~~~~~~~~~~~
/build/reproducible-path/opencv-4.10.0+dfsg/modules/videoio/src/cap_ffmpeg_impl.hpp:2296:37: error: ‘const AVCodec’ {aka ‘const struct AVCodec’} has no member named ‘supported_framerates’
 2296 |         const AVRational *p= codec->supported_framerates;
      |                                     ^~~~~~~~~~~~~~~~~~~~

See the attached build log for more details.

Cheers

#1144031#12
Date:
2026-09-19 10:34:30 UTC
From:
To:
We believe that the bug you reported is fixed in the latest version of
opencv, which is due to be installed in the Debian FTP archive.

A summary of the changes between this version and the previous one is
attached.

Thank you for reporting the bug, which will now be closed.  If you
have further comments please address them to 1144031@bugs.debian.org,
and the maintainer will reopen the bug report if appropriate.

Debian distribution maintenance software
pp.
Aron Xu <aron@debian.org> (supplier of updated opencv package)

(This message was generated automatically at their request; if you
believe that there is a problem with it please contact the archive
administrators by mailing ftpmaster@ftp-master.debian.org)
Format: 1.8
Date: Sat, 19 Sep 2026 17:07:54 +0800
Source: opencv
Architecture: source
Version: 4.10.0+dfsg-9
Distribution: unstable
Urgency: medium
Maintainer: Debian Science Team <debian-science-maintainers@lists.alioth.debian.org>
Changed-By: Aron Xu <aron@debian.org>
Closes: 1144031
Changes:
 opencv (4.10.0+dfsg-9) unstable; urgency=medium
 .
   * Team upload.
   * Fix FTBFS with FFmpeg 9.0 (Closes: #1144031): add
     ffmpeg-9.0-compat.patch, a backport of upstream PR #29533 that replaces
     the removed AVCodec::pix_fmts and AVCodec::supported_framerates fields
     with avcodec_get_supported_config().
Checksums-Sha1:
 f271835e65d7cd1dc7fc04c911f4b1bd8ba9d86d 6466 opencv_4.10.0+dfsg-9.dsc
 34fe64f02c3cd15ebd07c2d7220101ac21f75797 50936 opencv_4.10.0+dfsg-9.debian.tar.xz
 639359aca1b7367d3a99782ed393b7856ac65021 13573 opencv_4.10.0+dfsg-9_source.buildinfo
Checksums-Sha256:
 3e98ba0021d748a8c8b164f94bd579616222e96645ff38b49abc4fa038882332 6466 opencv_4.10.0+dfsg-9.dsc
 4aff1e822b34dd1c045930cdf9cb5e77063cbb7e88a1ad692c8807e3b6c07290 50936 opencv_4.10.0+dfsg-9.debian.tar.xz
 79729f08c63337d4378ba6fa0feaa152e98595ceeaf0f9e07f2fdf249c65543f 13573 opencv_4.10.0+dfsg-9_source.buildinfo
Files:
 293362fe816a4e602014e4f91e407843 6466 devel optional opencv_4.10.0+dfsg-9.dsc
 e73f2610e39b6d5c66c9cc7571850b27 50936 devel optional opencv_4.10.0+dfsg-9.debian.tar.xz
 61badee18b5c7e2ee0265f07675fe1ff 13573 devel optional opencv_4.10.0+dfsg-9_source.buildinfo
-----BEGIN PGP SIGNATURE-----

iQEzBAEBCgAdFiEExq6D0hxncEPaPayX+GQ1dHE8m64FAmquX8gACgkQ+GQ1dHE8
m65oZgf/WtKvU6Wov4Ky3NugWU6nsnuqULDmrlmuoD7MkCJiylnOnpoGoGfkzfpf
sELFCwMHN4i1gjBWqDG6Ysmh6zAtjJ83Ow8bZBsZUX7agSEejlfI09r44kPVyjIj
ZURvL+2kRgh7Rw5cBZBHuvRyxXY+Yv5pHPUiwKHraJ5pEhmboxJ9dBNDqUKpmO4z
CiyfYKUgGrD++qTYSqm/2+/8cT0rRi4ZGNQiyu0qmHPkT6Iz1tGWNHnVzkf/CDln
jXYSMB3SOXauv6WkGtnZDees0k7rUDkUb7ZkNHU4d6cOEQad6aaEr40FZlX8VZHs
uGR8jU1p2PjoqNFlKBsDzbuRjMm+1A==
=vu9f
-----END PGP SIGNATURE-----