Reputation: 3228
I have a webcam which supports YUYV (raw) and MJPEG (compressed) formats. When I capture video stream - cap = cv2.VideoCapture(0)
, openCV takes YUYV as default.
I want to use MJPEG (MJPG). I found here that it is possible. I try to set it by command: cap.set(7, ('M', 'J', 'P', 'G'))
, but it doesn't work. How can I choose which video format I want to get in OpenCV?
Upvotes: 3
Views: 3190