I am using the low light HD usb camera with ubuntu.
When I do ls /dev/video*, I got:
/dev/video0 /dev/video1
However, if I connect the camera to mac or windows, only one device will present. And if I use the camera recording in windows, I can get high quality 1920*1080 data.
I have tried to record with VLC on both video0 and video1, both of them can do the record. Video0 will get 640480 with higher quality and larger file size. Video1 will get 19201080 but with compression and smaller file size.
I want to get 1920*1080 with high quality video (uncompressed or less compression) and read in opencv, which device should I use? Besides, why there are 2 device presented in Ubuntu 16 system?
1 device is mjpeg, 1 device is h.264. A single usb device may present multiple endpoints/interfaces.
You can check the available resolutions/formats with v4l2-ctl --list-formats-ext. Windows and VLC are just picking different settings that the device is capable of.
Refer to the opencv documentation to configure the device within it’s capabilities.
Does it mean if I want to get uncompressed data, the max resolution will be 640*480?
I tried both of these two device in opencv with VideoCapture. With /dev/video0, I can get the video, but the size is 640*480, even if I set the W and H to 1920 and 1080, and the set function return 1.
With /dev/video1, I got error message:
VIDEOIO ERROR: V4L2: Pixel format of incoming image is unsupported by OpenCV
It seems the OpenCV I installed didn’t support the image format, I googled and found some people reinstalled OpenCV with different configuration, do you know any faster way to enable me get the data from video1?