2017-03-08 07:48:36 -0600 | received badge | ● Good Question (source) |
2013-10-21 00:36:38 -0600 | received badge | ● Nice Question (source) |
2012-07-12 16:38:07 -0600 | received badge | ● Famous Question (source) |
2012-07-12 16:36:33 -0600 | commented answer | Selecting MJPG with a USB webcam How do you query support for it in code? What does that even mean? As stated in my question, all the cameras tested support MJPG and YUYV. I used v4l2-ctl to make sure. The first link from click.wetfish.net shows the complete output of vtl2-ctl --list-formats-ext from one of my cameras. It clearly supports all of these resolutions in both MJPG and YUYV, however I have no way to choose which format I'd like to use within an OpenCV application. |
2012-07-07 11:12:56 -0600 | received badge | ● Notable Question (source) |
2012-07-07 04:38:17 -0600 | received badge | ● Popular Question (source) |
2012-07-06 03:31:36 -0600 | received badge | ● Student (source) |
2012-07-05 22:44:14 -0600 | received badge | ● Editor (source) |
2012-07-05 22:43:21 -0600 | asked a question | Selecting MJPG with a USB webcam Recently switched distros from Debian 6 to Ubuntu 12.04. I use multiple USB webcams with OpenCV's python bindings and need to use compression to avoid USB bandwidth issues. In Debian, OpenCV would select the MJPG video mode by default and everything was wonderful. In Ubuntu the default is YUYV and I've found no way to change it. So far I've tried:
Unfortunately none of those made any difference. And if you're wondering, MJPG works when specified as an outfmt in mplayer, so it's definitely an OpenCV issue. Edit: Upon further investigation, I'm still confused. Very confused. Changing the resolution to 800x600 from 640x480 makes OpenCV select MJPG. I used v4l2-ctl --list-formats-ext to list all the video modes supported by my camera, then tested all the available resolutions using the basic webcam example (camera.py) modified to use SetCaptureProperty(). While the video modes appear to change randomly, they do so in a predictable way. The same video modes are selected even using webcams of different models from different manufacturers. I tested 3 HP cameras and 1 Logitech, all of which support MJPG and YUYV. If you'd like to see the complete output from v4l2-ctl, they are available here: |