ies
1
hi all
my Logitech BRIO cam can stream 2560x1440 30 fps with guvcview, but cant with opencv
code is simple:
VideoCapture cap;
cap.open(0);
cap.set(CAP_PROP_FRAME_WIDTH, 2560);
cap.set(CAP_PROP_FRAME_HEIGHT, 1440);
with only cap.open(0) - it opens fine with 1920x1080x30
how to open and set cam to work with 2560x1440x30 ?
ubuntu 20.04, opencv 4.2.0, g++ 9.4.0
set FOURCC
property to MJPG
1 Like
ies
3
thanks for answer !
then i tryed
cap.set(cv::CAP_PROP_FOURCC, VideoWriter::fourcc(‘M’, ‘J’, ‘P’, ‘G’))
i got
setProperty OpenCV | GStreamer warning: GStreamer: unhandled property
is it possible (may be some set in OS for gstreamer), so then calling cap.open(0) it will opens cam in 2560x1440x30 ?
then sidestep the gstreamer backend, set apiPreference to CAP_V4L and that should work.