MNT webcam only showing low resolution

Hey everyone :wave:

My MNT camera arrived today and wow is the fish eye lens cool!

Like every other MNT product I’ve received so far, the build quality is superb and I’m super satisfied.

That being said, I’m only getting 640x480 resolution although the product page says the resolution should be 2592x1994.

I tried to change the resolution of the camera using this command:
v4l2-ctl --device=/dev/video1 --set-fmt-video=width=2592,height=1994.

When I run lsusb and inspect the device it’s only showing it’s capable of 640x480 as well, so it makes sense that the above command wouldn’t work.

FWIW I did use the USB cable the camera came with, and tried on a CM4 reform, LS1028A reform, and standard intel workstation also running debian.

I realize that with USB 2.0 the resolution may be lower, but I’d still expect to get something greater than 640x480. I did try with both 3.0 & 2.0 ports. Assuming the cable it came with is 3.0.

If anyone has encountered this as well / has suggestion please let me know. Once again, super cool product, and can’t wait to use it during work calls.

Furthermore, I’m curious about the pixel format / how to rotate the image. I had to flip the webcam upside down as the mount it comes on doesn’t expect the camera to be tilted much. This is fine on the reform, but when using it on my main monitor I need a more aggressive tilt.

I’ve run the following:

  1. List the video devices
  • v4l2-ctl --list-formats-ext -d /dev/video0
  1. Then rotate the video using ffmpeg
  • ffmpeg -f v4l2 -i /de/video0 -vf "transpose=2,transpose=2" -f v4l2 /dev/video1

However, I keep getting:

Unknown V4L2 pixel format equivalent for yuv444p
Could not write header for output file #0 (incorrect codec parameters ?): Invalid argument
Error initializing output stream 0:0 --
Conversion failed!

Another bit of feedback / question is why does the camera light stay on even when I’m not using it? It’s fine, but a bit distracting. I don’t want to have to go an unplug it each time I don’t want the light on.

Alright, was able to flip the image with this command. :tada:

Surprisingly google meets picks up the dummy device and it can be selected. Seems like it will be app specific, but for now that is good enough for my use-case.

ffmpeg -f v4l2 -input_format yuyv422 -i /dev/video0 -vf "vflip" -f v4l2 /dev/video2

Video 2 is a device created by running sudo modprobe v4l2loopback.

So it seems resolution is the last thing to resolve.

Led would be nice to have, but it’s probably firmware related? :thinking:

1 Like

Hi,

cool solution with the flipping trick!

About the low resolution, this normally happens if a USB3 connection cannot be established and it falls back to USB2. Do other USB3 devices work on this machine and are recognized as SuperSpeed devices (you can see that in dmesg or with lsusb -v)? Please note that RCM4 is USB2 only.

About the LED, it is hardwired to the power of the camera for security reasons. That way you know when the camera is powered and it cannot be masked in software.

1 Like

Addendum: this may sound strange, but have you tried flipping the USB-C side of the cable around?

Thank you for the reply!

Yes I have tried flipping the USB-C side of the cable.

It must be related to the USB 2.0 fallback.

I currently have a lot of nested USB extenders plugged in.

However, during initial testing I did plug directly into a USB 3.0 port on my main workstation to rule that out.

I’ll play around with it more later this week and report back.

Edit: Here is the result of lsusb for the camera. For this reading I wouldn’t be surprised if I have a USB 2.0 extender in the chain of cables.

Device Descriptor:
  bLength                18
  bDescriptorType         1
  bcdUSB               2.10
  bDeviceClass          239 Miscellaneous Device
  bDeviceSubClass         2 
  bDeviceProtocol         1 Interface Association
  bMaxPacketSize0        64
  idVendor           0x04b4 Cypress Semiconductor Corp.
  idProduct          0x00c3 
  bcdDevice            0.00
  iManufacturer           1 Cypress
  iProduct                2 CX3-UVC
  iSerial                 0 
  bNumConfigurations      1
  Configuration Descriptor:
    bLength                 9
    bDescriptorType         2
    wTotalLength       0x00fd
    bNumInterfaces          2
    bConfigurationValue     1
    iConfiguration          4 
    bmAttributes         0xc0
      Self Powered
    MaxPower              100mA
    Interface Association:
      bLength                 8
      bDescriptorType        11
      bFirstInterface         0
      bInterfaceCount         2
      bFunctionClass         14 Video
      bFunctionSubClass       3 Video Interface Collection
      bFunctionProtocol       0 
      iFunction               0 
    Interface Descriptor:
      bLength                 9
      bDescriptorType         4
      bInterfaceNumber        0
      bAlternateSetting       0
      bNumEndpoints           1
      bInterfaceClass        14 Video
      bInterfaceSubClass      1 Video Control
      bInterfaceProtocol      0 
      iInterface              0 
      VideoControl Interface Descriptor:
        bLength                13
        bDescriptorType        36
        bDescriptorSubtype      1 (HEADER)
        bcdUVC               1.10
        wTotalLength       0x0051
        dwClockFrequency       48.000000MHz
        bInCollection           1
        baInterfaceNr( 0)       1
      VideoControl Interface Descriptor:
        bLength                18
        bDescriptorType        36
        bDescriptorSubtype      2 (INPUT_TERMINAL)
        bTerminalID             1
        wTerminalType      0x0201 Camera Sensor
        bAssocTerminal          0
        iTerminal               0 
        wObjectiveFocalLengthMin      0
        wObjectiveFocalLengthMax      0
        wOcularFocalLength            0
        bControlSize                  3
        bmControls           0x00000000
      VideoControl Interface Descriptor:
        bLength                13
        bDescriptorType        36
        bDescriptorSubtype      5 (PROCESSING_UNIT)
        bUnitID                 2
        bSourceID               1
        wMaxMultiplier      16384
        bControlSize            3
        bmControls     0x00000000
        iProcessing             0 
        bmVideoStandards     0x00
      VideoControl Interface Descriptor:
        bLength                28
        bDescriptorType        36
        bDescriptorSubtype      6 (EXTENSION_UNIT)
        bUnitID                 3
        guidExtensionCode         {ffffffff-ffff-ffff-ffff-ffffffffffff}
        bNumControls            0
        bNrInPins               1
        baSourceID( 0)          2
        bControlSize            3
        bmControls( 0)       0x00
        bmControls( 1)       0x00
        bmControls( 2)       0x00
        iExtension              0 
      VideoControl Interface Descriptor:
        bLength                 9
        bDescriptorType        36
        bDescriptorSubtype      3 (OUTPUT_TERMINAL)
        bTerminalID             4
        wTerminalType      0x0101 USB Streaming
        bAssocTerminal          0
        bSourceID               3
        iTerminal               0 
      Endpoint Descriptor:
        bLength                 7
        bDescriptorType         5
        bEndpointAddress     0x82  EP 2 IN
        bmAttributes            3
          Transfer Type            Interrupt
          Synch Type               None
          Usage Type               Data
        wMaxPacketSize     0x0040  1x 64 bytes
        bInterval               1
    Interface Descriptor:
      bLength                 9
      bDescriptorType         4
      bInterfaceNumber        1
      bAlternateSetting       0
      bNumEndpoints           1
      bInterfaceClass        14 Video
      bInterfaceSubClass      2 Video Streaming
      bInterfaceProtocol      0 
      iInterface              0 
      VideoStreaming Interface Descriptor:
        bLength                            14
        bDescriptorType                    36
        bDescriptorSubtype                  1 (INPUT_HEADER)
        bNumFormats                         1
        wTotalLength                   0x0076
        bEndpointAddress                 0x83  EP 3 IN
        bmInfo                              0
        bTerminalLink                       4
        bStillCaptureMethod                 2
        bTriggerSupport                     0
        bTriggerUsage                       0
        bControlSize                        1
        bmaControls( 0)                     0
      VideoStreaming Interface Descriptor:
        bLength                            27
        bDescriptorType                    36
        bDescriptorSubtype                  4 (FORMAT_UNCOMPRESSED)
        bFormatIndex                        1
        bNumFrameDescriptors                2
        guidFormat                            {32595559-0000-0010-8000-00aa00389b71}
        bBitsPerPixel                      16
        bDefaultFrameIndex                  1
        bAspectRatioX                       0
        bAspectRatioY                       0
        bmInterlaceFlags                 0x00
          Interlaced stream or variable: No
          Fields per frame: 2 fields
          Field 1 first: No
          Field pattern: Field 1 only
        bCopyProtect                        0
      VideoStreaming Interface Descriptor:
        bLength                            30
        bDescriptorType                    36
        bDescriptorSubtype                  5 (FRAME_UNCOMPRESSED)
        bFrameIndex                         1
        bmCapabilities                   0x00
          Still image unsupported
        wWidth                            640
        wHeight                           480
        dwMinBitRate                294912000
        dwMaxBitRate                294912000
        dwMaxVideoFrameBufferSize      614400
        dwDefaultFrameInterval         333333
        bFrameIntervalType                  1
        dwFrameInterval( 0)            333333
      VideoStreaming Interface Descriptor:
        bLength                            30
        bDescriptorType                    36
        bDescriptorSubtype                  5 (FRAME_UNCOMPRESSED)
        bFrameIndex                         2
        bmCapabilities                   0x00
          Still image unsupported
        wWidth                            640
        wHeight                           480
        dwMinBitRate                294912000
        dwMaxBitRate                294912000
        dwMaxVideoFrameBufferSize      614400
        dwDefaultFrameInterval         166666
        bFrameIntervalType                  1
        dwFrameInterval( 0)            166666
      VideoStreaming Interface Descriptor:
        bLength                            11
        bDescriptorType                    36
        bDescriptorSubtype                  3 (STILL_IMAGE_FRAME)
        bEndpointAddress                 0x00  EP 0 OUT
        bNumImageSizePatterns               1
        wWidth( 0)                        640
        wHeight( 0)                       480
        bNumCompressionPatterns             1
        bCompression( 0)                    0
      VideoStreaming Interface Descriptor:
        bLength                             6
        bDescriptorType                    36
        bDescriptorSubtype                 13 (COLORFORMAT)
        bColorPrimaries                     0 (Unspecified)
        bTransferCharacteristics            0 (Unspecified)
        bMatrixCoefficients                 0 (Unspecified)
      Endpoint Descriptor:
        bLength                 7
        bDescriptorType         5
        bEndpointAddress     0x83  EP 3 IN
        bmAttributes            2
          Transfer Type            Bulk
          Synch Type               None
          Usage Type               Data
        wMaxPacketSize     0x0200  1x 512 bytes
        bInterval               0

Okay, so it was a USB 2.0 problem. I’ve now got high resolution, and the correct image flip. :sunglasses:

That being said, the image now randomly freezes after about a minute :face_holding_back_tears: .

At this point, I’d say the :thread: is closed :hammer: as it’s likely something on my system and unrelated to the webcam.

If I find out more as to why this is happening I’ll update with details.

1 Like

I noticed running the camera application with sudo kept the camera from freezing. Cheese specifically.

After some more digging I came to the conclusion that you need to change the permissions of the webcam.

Running sudo chmod 777 /dev/video0 seemed to resolve the problem for me. I’m now able to use the webcam without it freezing after about a minute.

If anyone else runs into that hopefully this helps.

Actually never-mind. It’s still frozen after a short period of time again. False alarm. If anyone else has one of these things and encounters this let me know.

Also happy to dump logs, but not sure what to share.

Alright, it seems that it only happens when the resolution is over 1920x1080p. At least after leaving cheese on for the last hour or so set at that resolution, the issue doesn’t happen.

I’ll try to manually set the resolution using the v4l2 command to 1920x1080p. However, it would be great to use the full resolution and actually make use of the fish-eye affect.