Closed guyfawcus closed 4 years ago
Thanks! Can you show me the output of v4l2-ctl --list-formats-ext
?
Sure thing!
I tried the other options after looking at the results:
'Y', 'U', 'U', 'V'
= A bit slow but works
'H', '2', '6', '4'
= Garbled mess of random pixels
'M', 'J', 'P', 'G'
= Less laggy than YUUV, the best option I think
Also, here's the output of lsusb -v -d 046d:082d
if it's of use:
Also just noticed - presumably the value is used for this drop-down as well?
All of them are the same, nothing before the -
Thanks, as I thought the output is formatted differently for you for some reason (v4l2-ctl version perhaps), and the pixelformat options should appear in the drop-down. I will work on this as soon as I get some time!
Let me know if this works, I've pushed it to pip as 0.0.7
That did the trick! The formats appear in the dropdown and the video works out of the box. Thanks!
The issue
I'm using a Logitech C920. After running camset, or when trying to view the video feed, I get this error:
The cause
When camset tries to get the resolution (the first step in displaying the feed), it doesn't get a fourcc code.
https://github.com/azeam/camset/blob/ac8140a4baa8b4101f04d4840ecf0c1010122867/camset/camset.py#L62-L71
After getting the model:
pixelformat = ''
(an empty string) because:text[0].split(" - ", 1) = ['', '1920x1080']
The "fix"
Manually set the fourcode to:
fourcode = cv2.VideoWriter_fourcc('M','J','P','G')