Please make opencv-python-headless support FFmpeg 9.0
Nobody has claimed this yet.
Assessment
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Newbie friendliness
- 48/100
- Issue type
- Bug
- Clarity
- Mostly clear
- Activity status
- Quiet
- Tech stack
- python
- Domain
- audio-video-rtc, build-system
Research direction
Start by inspecting opencv/modules/videoio/src/cap_ffmpeg_hw.hpp around line 760 and cap_ffmpeg_impl.hpp around line 2586, then reproduce the headless build against FFmpeg 9.0. Check the relevant FFmpeg API changes and verify that the build completes without the reported AVCodec member errors.
Written by the indexing model from the issue text.
Description
Errors:
[ 80%] Building CXX object modules/videoio/CMakeFiles/opencv_videoio.dir/src/cap_ffmpeg.cpp.o
In file included from /wrkdirs/usr/ports/graphics/py-opencv-python-headless/work-py312/opencv-python-92/opencv/modules/videoio/src/cap_ffmpeg.cpp:50:
In file included from /wrkdirs/usr/ports/graphics/py-opencv-python-headless/work-py312/opencv-python-92/opencv/modules/videoio/src/cap_ffmpeg_impl.hpp:175:
/wrkdirs/usr/ports/graphics/py-opencv-python-headless/work-py312/opencv-python-92/opencv/modules/videoio/src/cap_ffmpeg_hw.hpp:760:82: error: no member named 'pix_fmts' in 'AVCodec'
760 | if (av_codec_is_encoder(c) && hw_native_fmt != AV_PIX_FMT_NONE && c->pix_fmts) {
| ~ ^
/wrkdirs/usr/ports/graphics/py-opencv-python-headless/work-py312/opencv-python-92/opencv/modules/videoio/src/cap_ffmpeg_hw.hpp:761:36: error: no member named 'pix_fmts' in 'AVCodec'
761 | for (int i = 0; c->pix_fmts[i] != AV_PIX_FMT_NONE; i++) {
| ~ ^
/wrkdirs/usr/ports/graphics/py-opencv-python-headless/work-py312/opencv-python-92/opencv/modules/videoio/src/cap_ffmpeg_hw.hpp:762:28: error: no member named 'pix_fmts' in 'AVCodec'
762 | if (c->pix_fmts[i] == hw_native_fmt) {
| ~ ^
In file included from /wrkdirs/usr/ports/graphics/py-opencv-python-headless/work-py312/opencv-python-92/opencv/modules/videoio/src/cap_ffmpeg.cpp:50:
/wrkdirs/usr/ports/graphics/py-opencv-python-headless/work-py312/opencv-python-92/opencv/modules/videoio/src/cap_ffmpeg_impl.hpp:2586:24: error: no member named 'supported_framerates' in 'AVCodec'
2586 | if(codec && codec->supported_framerates){
| ~~~~~ ^
/wrkdirs/usr/ports/graphics/py-opencv-python-headless/work-py312/opencv-python-92/opencv/modules/videoio/src/cap_ffmpeg_impl.hpp:2587:37: error: no member named 'supported_framerates' in 'AVCodec'
2587 | const AVRational *p= codec->supported_framerates;
| ~~~~~ ^
5 errors generated.
*** Error code 1
Downstream bug report: https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=297370
- Dominant language
- Python
- Stars
- 5.4k
- Forks
- 1k
- Avg merge
- 22h 17m
- Merged PRs (30d)
- 3
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
More from opencv/opencv-python
-
[DOC] README file Open
Difficulty 1/5 Under an hour Newbie friendliness 85/100
opencv/opencv-python#1217 · 3 comments ·
-
Difficulty 2/5 1-3 hours Newbie friendliness 72/100
opencv/opencv-python#1165 · 2 comments · 1 reaction ·
-
Difficulty 5/5 Over a week Newbie friendliness 25/100
opencv/opencv-python#1273 · 1 comment ·
-
Difficulty 4/5 3-5 days Newbie friendliness 45/100
opencv/opencv-python#1272 · 1 comment ·
-
Difficulty 3/5 1-2 days Newbie friendliness 70/100
opencv/opencv-python#1268 · 1 comment ·
All issues in opencv/opencv-python
Similar issues
-
sponsored
Difficulty 2/5 1-3 hours Newbie friendliness 65/100
-
Difficulty 2/5 1-3 hours Newbie friendliness 86/100
Diaoul/subliminal#1382 ·
-
Difficulty 1/5 Under an hour Newbie friendliness 92/100
-
triage/confirmed
Difficulty 2/5 1-3 hours Newbie friendliness 88/100
agentscope-ai/agentscope#2775 ·
-
Difficulty 2/5 1-3 hours Newbie friendliness 84/100