-
Attempting to change the format of the FrameGrabber, as it defaults to YUV2. Cheap capture cards do not usually support YUV2 at Full HD resolutions, so MJPEG is the way to go. However, the setFormat() method doesn't seem to do anything. Here is my attempt at doing so:
I attempted to set the grabber's resolution outside the range of the supported ones, and I can clearly see that there are different formats:
I have seen a GitHub post regarding this, but it eventually swayed away to using the OpenCV implementation. Is there anyway to change the format of the VideoInput? Thanks! |
Beta Was this translation helpful? Give feedback.
Replies: 2 comments 3 replies
-
I'm sure videoInput has a setting for that somewhere, we'd just need to add it in here somewhere: |
Beta Was this translation helpful? Give feedback.
-
Okay I have found a solution for this. I created a custom This is how I implemented my solution (if you have a better solution, please comment it here!)
|
Beta Was this translation helpful? Give feedback.
Okay I have found a solution for this. I created a custom
VideoInputFrameGrabber
class that checks if the parameter ofsetFormat()
is formats (VI_NTSC_M, VI_PAL_B, etc) or media subtypes (RGB24, RGB32, RGB555, etc.). I also think that the FrameGrabber class has to be modified as well, since thesetFormat()
method returns a boolean, whereas thesetRequestedMediaSubType()
method does not. That must return a boolean so that the customVideoInputFrameGrabber
class that I modified also throws an exception.This is how I implemented my solution (if you have a better solution, please comment it here!)