1 | initial version |
on windows, webcams are handled exclusively from DirectShow(or outdated vfw), not ffmpeg, which is used to read/write video files.
so, you won't be able to set a codec for the webcam images, they will get converted to bgr by default.
the only thing you can try there, is to disable the bgr conversion, and receive, whatever it has natively (yuv422, i guess) by setting CAP_PROP_CONVERT_RGB to 0
also, setting the fps might or might not work, it all depends onyour camera model / driver.
if you run the prog in debug mode, you'll see some (hopefully) helpful output, how the dshow pipeline is built.