You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I am compiling the 4.8.1 version of opencv, it complains about missing function avcodec_get_context_defaults3 from ffmpeg. I found that ffmpeg has already removed this function since 2021 commit. So should the using of this function be removed in opencv source?
Detailed description
in function `CvVideoWriter_FFMPEG::open(char const*, int, double, int, int, cv::VideoWriterParameters const&)':
cap_ffmpeg.cpp:(.text._ZN20CvVideoWriter_FFMPEG4openEPKcidiiRKN2cv21VideoWriterParametersE+0xcec): undefined reference to `avcodec_get_context_defaults3'
Steps to reproduce
1, compile ffmpeg from source (because I need a third-party hardware encoder/decoder)
2, compile opencv 4.8.1 with ffmpet support
Issue submission checklist
I report the issue, it's not a question
I checked the problem with documentation, FAQ, open issues, forum.opencv.org, Stack Overflow, etc and have not found any solution
I updated to the latest OpenCV version and the issue is still there
There is reproducer code and related data files (videos, images, onnx, etc)
The text was updated successfully, but these errors were encountered:
This because avcodec_get_context_defaults3 was removed in ffmpeg.
https://github.com/FFmpeg/FFmpeg/commit/ff8f9fcbe558db69f804417d4e9aa2ef9445f304
Reference:
Deprecated:
This function should not be used, as closing and opening a codec context multiple time is not supported.
A new codec context should be allocated for each new use.
in function CvVideoWriter_FFMPEG::open(char const*, int, double, int, int, cv::VideoWriterParameters const&)': cap_ffmpeg.cpp:(.text._ZN20CvVideoWriter_FFMPEG4openEPKcidiiRKN2cv21VideoWriterParametersE+0xcec): undefined reference to avcodec_get_context_defaults3'
in function `CvVideoWriter_FFMPEG::open(char const*, int, double, int, int, cv::VideoWriterParameters const&)':
cap_ffmpeg.cpp:(.text._ZN20CvVideoWriter_FFMPEG4openEPKcidiiRKN2cv21VideoWriterParametersE+0xcec): undefined reference to `avcodec_get_context_defaults3'
Steps to reproduce
1, compile ffmpeg from source (because I need a third-party hardware encoder/decoder)
2, compile opencv 4.8.1 with ffmpet support
Issue submission checklist
I report the issue, it's not a question
I checked the problem with documentation, FAQ, open issues, forum.opencv.org, Stack Overflow, etc and have not found any solution
I updated to the latest OpenCV version and the issue is still there
There is reproducer code and related data files (videos, images, onnx, etc) [Done]
System Information
I am compiling the 4.8.1 version of opencv, it complains about missing function avcodec_get_context_defaults3 from ffmpeg. I found that ffmpeg has already removed this function since 2021 commit. So should the using of this function be removed in opencv source?
Detailed description
Steps to reproduce
1, compile ffmpeg from source (because I need a third-party hardware encoder/decoder)
2, compile opencv 4.8.1 with ffmpet support
Issue submission checklist
The text was updated successfully, but these errors were encountered: