-
-
Notifications
You must be signed in to change notification settings - Fork 56.5k
Errors build cap_ffmpeg_impl.hpp #16634
Copy link
Copy link
Closed
Description
System information (version)
- OpenCV => 4.2
- Operating System / Platform => Ubuntu 18.04 x86_64
Detailed description
Build error with : opencv/modules/videoio/src/cap_ffmpeg_impl.hpp
AVCodecID not declared (Same that issue #5131 but the line numbers are changed)
AV_PIX_FMT_BGRA not declared
AV_PIX_FMT_RGBA not declared
Steps to reproduce
Follow the official installation instructions to make command (https://docs.opencv.org/trunk/d7/d9f/tutorial_linux_install.html)
Solution found
In opencv/modules/videoio/src/cap_ffmpeg_impl.hpp
Replace AVCodecID by CV_CODEC_ID line 364, 1077, 1079, 1081 and 1366
Add after line 151 :
#define AV_PIX_FMT_BGRA PIX_FMT_BGRA
#define AV_PIX_FMT_RGBA PIX_FMT_RGBA
I don't know if this solution is correct but the make command run correctly after this. I don't know how to test to verify.
Best regards.
Reactions are currently unavailable