I need to read video in MJPG format. I tried the following - cap2.set(CV_FOURCC('M', 'J', 'P', 'G') ) It threw an error.
How do I achieve this?
1 | initial version |
I need to read video in MJPG format. I tried the following - cap2.set(CV_FOURCC('M', 'J', 'P', 'G') ) It threw an error.
How do I achieve this?
2 | No.2 Revision |
I need to read video in MJPG format. I tried the following -
import cv2
cap1 = cv2.VideoCapture(0)
cap1.set(CV_CAP_PROP_FOURCC, ('M',
'J', 'P', After which I tried -
cap1.set(6, ('M', 'J', 'P', 'G'))
Now, the error is - TypeError: a float is required
How do I achieve this?capture a video in MJPEG format from the webcam?