使用bash执行就可以了。

export OPENCV_LOG_LEVEL=DEBUG
export OPENCV_VIDEOIO_DEBUG=1

示例:

./opencv-demo
OpenCV4 Example.
OpenCV Version = 4.5.3
[DEBUG:0] global /home/const/opencv-4.5.3/modules/videoio/src/videoio_registry.cpp (191) VideoBackendRegistry VIDEOIO: Builtin backends(8): FFMPEG(1000); GSTREAMER(990); INTEL_MFX(980); V4L2(970); CV_IMAGES(960); CV_MJPEG(950); FIREWIRE(940); UEYE(930)
[DEBUG:0] global /home/const/opencv-4.5.3/modules/videoio/src/videoio_registry.cpp (215) VideoBackendRegistry VIDEOIO: Available backends(8): FFMPEG(1000); GSTREAMER(990); INTEL_MFX(980); V4L2(970); CV_IMAGES(960); CV_MJPEG(950); FIREWIRE(940); UEYE(930)
[ INFO:0] global /home/const/opencv-4.5.3/modules/videoio/src/videoio_registry.cpp (217) VideoBackendRegistry VIDEOIO: Enabled backends(8, sorted by priority): FFMPEG(1000); GSTREAMER(990); INTEL_MFX(980); V4L2(970); CV_IMAGES(960); CV_MJPEG(950); FIREWIRE(940); UEYE(930)
[ WARN:0] global /home/const/opencv-4.5.3/modules/videoio/src/cap.cpp (126) open VIDEOIO(FFMPEG): trying capture filename='1.mp4' ...
[DEBUG:0] global /home/const/opencv-4.5.3/modules/videoio/src/cap_ffmpeg_impl.hpp (1022) open FFMPEG: stream[0] is video stream with codecID=27 width=2560 height=1440
[DEBUG:0] global /home/const/opencv-4.5.3/modules/videoio/src/cap_ffmpeg_hw.hpp (929) HWAccelIterator FFMPEG: allowed acceleration types (vaapi): 'vaapi.iHD'
[DEBUG:0] global /home/const/opencv-4.5.3/modules/videoio/src/cap_ffmpeg_hw.hpp (947) HWAccelIterator FFMPEG: disabled codecs: 'av1.vaapi,av1_qsv,vp8.vaapi,vp8_qsv'
[DEBUG:0] global /home/const/opencv-4.5.3/modules/videoio/src/cap_ffmpeg_impl.hpp (1054) open FFMPEG: trying to configure H/W acceleration: 'vaapi.iHD'
[ INFO:0] global /home/const/opencv-4.5.3/modules/videoio/src/cap_ffmpeg_hw.hpp (265) hw_check_device FFMPEG: Skipping 'vaapi' video acceleration on the following device name as not matching substring 'iHD':
[DEBUG:0] global /home/const/opencv-4.5.3/modules/videoio/src/cap_ffmpeg_impl.hpp (1063) open FFMPEG: ... can't create H/W device: 'vaapi.iHD'
[ERROR:0] global /home/const/opencv-4.5.3/modules/videoio/src/cap_ffmpeg_impl.hpp (1109) open VIDEOIO/FFMPEG: Failed to initialize VideoCapture
[ WARN:0] global /home/const/opencv-4.5.3/modules/videoio/src/cap.cpp (149) open VIDEOIO(FFMPEG): can't create capture
ERROR! Unable to open camera

本文链接地址:https://const.net.cn/462.html

标签: none

添加新评论