Home        Store        Learn        Blog

USB Camera Module

Hello all,

We’re working on a ROV at the moment. We are planning to use a USB Camera Module. However, we don’t want to use the one in Bluerobotics. Do you have any other camera you can reccomend us? Also, can we use ANY camera module without facing issues (with Ardusub)?

Thank you.

Hi,

Any camera that provides video in H264 via USB is compatible with the companion software layer.

1 Like

Hi, I am trying to use the Kurokesu C1 USB camera and the video stream is working but I only get 1 fps in QGroundControl video view.
Here is the datasheet for the camera: https://www.kurokesu.com/uploads/datasheets/Kurokesu_C1.pdf

Can I change some settings to get this to work with 30 fps?
Cheers, Jan R

Hi,

Take a look in http://192.168.2.2:2770/camera, you’ll be able to configure the camera to match the frame rate that you are looking for.

Hi Patrick, I am looking at the settings for the camera and it looks okay and correct, but still it is only showing 1 fps.
Anything else I can try?

Navigate to http://192.168.2.2::8088, open a terminal, and enter this command:

ls /dev/video* | xargs -L1 v4l2-ctl --list-formats-ext --all --device

Let us know the output. It sounds like our software cannot support your camera at 30fps.

Here is what I got:

Driver name   : uvcvideo                                                                   

        Card type     : KurokesuC1_SN000786                                                        

        Bus info      : usb-3f980000.usb-1.5                                                       

        Driver version: 4.9.24                                                                     

        Capabilities  : 0x84200001                                                                 

                Video Capture                                                                      

                Streaming                                                                          

                Extended Pix Format                                                                

                Device Capabilities                                                                

        Device Caps   : 0x04200001                                                                 

                Video Capture                                                                      

                Streaming                                                                          

                Extended Pix Format                                                                

Priority: 2                                                                                        

Video input : 0 (Camera 1: ok)                                                                     

Format Video Capture:                                                                              

        Width/Height  : 1920/1080                                                                  

        Pixel Format  : 'MJPG'                                                                     

        Field         : None                                                                       

        Bytes per Line: 0                                                                          

        Size Image    : 2073600                                                                    

        Colorspace    : Unknown (00000000)                                                         

        Flags         :                                                                            

Crop Capability Video Capture:                                                                     

        Bounds      : Left 0, Top 0, Width 1920, Height 1080                                       

        Default     : Left 0, Top 0, Width 1920, Height 1080                                       

        Pixel Aspect: 1/1                                                                          

Selection: crop_default, Left 0, Top 0, Width 1920, Height 1080                                    

Selection: crop_bounds, Left 0, Top 0, Width 1920, Height 1080                                     

Streaming Parameters Video Capture:                                                                

        Capabilities     : timeperframe                                                            

        Frames per second: 25.000 (25/1)                                                           

        Read buffers     : 0                                                                       

                     brightness (int)    : min=-64 max=64 step=1 default=-8193 value=0             

                       contrast (int)    : min=0 max=64 step=1 default=57343 value=32              

                     saturation (int)    : min=0 max=128 step=1 default=57343 value=64             

                            hue (int)    : min=-40 max=40 step=1 default=-8193 value=0             

 white_balance_temperature_auto (bool)   : default=1 value=1                                       

                          gamma (int)    : min=72 max=500 step=1 default=57343 value=100           

                           gain (int)    : min=0 max=100 step=1 default=57343 value=0              

           power_line_frequency (menu)   : min=0 max=2 default=2 value=2                           

      white_balance_temperature (int)    : min=2800 max=9300 step=1 default=57343 value=4600 flags=

inactive                                                                                           

                      sharpness (int)    : min=0 max=6 step=1 default=57343 value=3                

         backlight_compensation (int)    : min=0 max=2 step=1 default=57343 value=1                

                  exposure_auto (menu)   : min=0 max=3 default=0 value=3                           

              exposure_absolute (int)    : min=1 max=5000 step=1 default=156 value=156 flags=inacti

ve                                                                                                 

         exposure_auto_priority (bool)   : default=0 value=1                                       

                     brightness (int)    : min=-64 max=64 step=1 default=-8193 value=0             

                       contrast (int)    : min=0 max=64 step=1 default=57343 value=32              

                     saturation (int)    : min=0 max=128 step=1 default=57343 value=64             

                            hue (int)    : min=-40 max=40 step=1 default=-8193 value=0             

 white_balance_temperature_auto (bool)   : default=1 value=1                                       

                          gamma (int)    : min=72 max=500 step=1 default=57343 value=100           

                           gain (int)    : min=0 max=100 step=1 default=57343 value=0              

           power_line_frequency (menu)   : min=0 max=2 default=2 value=2                           

      white_balance_temperature (int)    : min=2800 max=9300 step=1 default=57343 value=4600 flags=

inactive                                                                                           

                      sharpness (int)    : min=0 max=6 step=1 default=57343 value=3                

         backlight_compensation (int)    : min=0 max=2 step=1 default=57343 value=1                

ioctl: VIDIOC_ENUM_FMT                                                                             

        Index       : 0                                                                            

        Type        : Video Capture                                                                

        Pixel Format: 'MJPG' (compressed)                                                          

        Name        : Motion-JPEG                                                                  

                Size: Discrete 1920x1080                                                           

                        Interval: Discrete 0.033s (30.000 fps)                                     

                        Interval: Discrete 0.040s (25.000 fps)                                     

                        Interval: Discrete 0.050s (20.000 fps)                                     

                        Interval: Discrete 0.067s (15.000 fps)                                     

                        Interval: Discrete 0.100s (10.000 fps)                                     

                        Interval: Discrete 0.200s (5.000 fps)                                      

                Size: Discrete 1280x720                                                            

                        Interval: Discrete 0.033s (30.000 fps)                                     

                        Interval: Discrete 0.040s (25.000 fps)                                     

                        Interval: Discrete 0.050s (20.000 fps)                                     

                        Interval: Discrete 0.067s (15.000 fps)                                     

                        Interval: Discrete 0.100s (10.000 fps)
 Interval: Discrete 0.200s (5.000 fps)                                      
                Size: Discrete 640x480                                                             
                        Interval: Discrete 0.033s (30.000 fps)                                     
                        Interval: Discrete 0.040s (25.000 fps)                                     
                        Interval: Discrete 0.050s (20.000 fps)                                     
                        Interval: Discrete 0.067s (15.000 fps)                                     
                        Interval: Discrete 0.100s (10.000 fps)                                     
                        Interval: Discrete 0.200s (5.000 fps)                                      
                Size: Discrete 640x360                                                             
                        Interval: Discrete 0.033s (30.000 fps)                                     
                        Interval: Discrete 0.040s (25.000 fps)                                     
                        Interval: Discrete 0.050s (20.000 fps)                                     
                        Interval: Discrete 0.067s (15.000 fps)                                     
                        Interval: Discrete 0.100s (10.000 fps)                                     
                        Interval: Discrete 0.200s (5.000 fps)                                      
                Size: Discrete 320x240                                                             
                        Interval: Discrete 0.033s (30.000 fps)                                     
                        Interval: Discrete 0.040s (25.000 fps)                                     
                        Interval: Discrete 0.050s (20.000 fps)                                     
                        Interval: Discrete 0.067s (15.000 fps)                                     
                        Interval: Discrete 0.100s (10.000 fps)                                     
                        Interval: Discrete 0.200s (5.000 fps)                                      
                Size: Discrete 320x180                                                             
                        Interval: Discrete 0.033s (30.000 fps)                                     
                        Interval: Discrete 0.040s (25.000 fps)                                     
                        Interval: Discrete 0.050s (20.000 fps)                                     
                        Interval: Discrete 0.067s (15.000 fps)                                     
                        Interval: Discrete 0.100s (10.000 fps)                                     
                        Interval: Discrete 0.200s (5.000 fps)                                      
                Size: Discrete 1920x1080                                                           
                        Interval: Discrete 0.033s (30.000 fps)                                     
                        Interval: Discrete 0.040s (25.000 fps)                                     
                        Interval: Discrete 0.050s (20.000 fps)                                     
                        Interval: Discrete 0.067s (15.000 fps)                                     
                        Interval: Discrete 0.100s (10.000 fps)                                     
                        Interval: Discrete 0.200s (5.000 fps)                                      
                                                                                                   
        Index       : 1                                                                            
        Type        : Video Capture                                                                
        Pixel Format: 'YUYV'                                                                       
        Name        : YUYV 4:2:2                                                                   
                Size: Discrete 1920x1080                                                           
                        Interval: Discrete 0.200s (5.000 fps)                                      
                Size: Discrete 1280x720                                                            
                        Interval: Discrete 0.100s (10.000 fps)                                     
                        Interval: Discrete 0.200s (5.000 fps)                                      
                Size: Discrete 640x480                                                             
                        Interval: Discrete 0.033s (30.000 fps)                                     
                        Interval: Discrete 0.040s (25.000 fps)                                     
                        Interval: Discrete 0.050s (20.000 fps)                                     
                        Interval: Discrete 0.067s (15.000 fps)                                     
                        Interval: Discrete 0.100s (10.000 fps)                                     
                        Interval: Discrete 0.200s (5.000 fps)                                      
                Size: Discrete 640x360                                                             
                        Interval: Discrete 0.033s (30.000 fps)                                     
                        Interval: Discrete 0.040s (25.000 fps)                                     
                        Interval: Discrete 0.050s (20.000 fps)                                     
                        Interval: Discrete 0.067s (15.000 fps)                                     
                        Interval: Discrete 0.100s (10.000 fps)                                     
                        Interval: Discrete 0.200s (5.000 fps)                                      
                Size: Discrete 320x240                                                             
                        Interval: Discrete 0.033s (30.000 fps)                                     
                        Interval: Discrete 0.040s (25.000 fps)                                     
                        Interval: Discrete 0.050s (20.000 fps)                                     
                        Interval: Discrete 0.067s (15.000 fps)                                     
                        Interval: Discrete 0.100s (10.000 fps)                                     
                        Interval: Discrete 0.200s (5.000 fps)                                      
                Size: Discrete 320x180                                                             
                        Interval: Discrete 0.033s (30.000 fps)                                     
                        Interval: Discrete 0.040s (25.000 fps)                                     
                        Interval: Discrete 0.050s (20.000 fps)                                     
                        Interval: Discrete 0.067s (15.000 fps)                                     
                        Interval: Discrete 0.100s (10.000 fps)                                     
                        Interval: Discrete 0.200s (5.000 fps)                                      
                Size: Discrete 1920x1080                                                           
                        Interval: Discrete 0.200s (5.000 fps)

Hi, is there anything I can change to make it work?
Cheers,
Jan R

Hi Jan,

Are you sure this is the full output ? Because there is no “H264” pixel format on it.

@patrickelectric There is an error in my command on the v4l2 version running in the raspberry pi. I need to come with a better command.

@pob747 try v4l2-ctl --list-formats-ext --all --device=1

To check if it’s possible to use the camera without configuration or any modification, check the following steps:

  1. Go to http://192.168.2.2:8088 to access the companion terminal.

  2. Check the connected devices with: v4l2-ctl --list-devices

    # In this example you can see two cameras connected
    # mmal service 16.1: The raspberry camera
    # H264 USB Camera: The low light usb camera
    mmal service 16.1 (platform:bcm2835-v4l2):
        /dev/video2
     H264 USB Camera (usb-3f980000.usb-1.2):
        /dev/video0
        /dev/video1
    
  3. Take a look in the camera capabilities with: v4l2-ctl --list-formats-ext --device=/dev/videoX

    • Where X is the camera ID (0, 1, 2 …).

Let us know the output for each device.

Hi, this is what I got:
First is video 0 next post is video 1

pi@raspberrypi:~ $ v4l2-ctl --list-devices
KurokesuC1_SN000786 (usb-3f980000.usb-1.5):
/dev/video0
/dev/video1

pi@raspberrypi:~ v4l2-ctl --list-formats-ext --device=/dev/videoX Failed to open /dev/videoX: No such file or directory pi@raspberrypi:~ v4l2-ctl --list-formats-ext --device=/dev/video0
ioctl: VIDIOC_ENUM_FMT
Index : 0
Type : Video Capture
Pixel Format: ‘MJPG’ (compressed)
Name : Motion-JPEG
Size: Discrete 1920x1080
Interval: Discrete 0.033s (30.000 fps)
Interval: Discrete 0.040s (25.000 fps)
Interval: Discrete 0.050s (20.000 fps)
Interval: Discrete 0.067s (15.000 fps)
Interval: Discrete 0.100s (10.000 fps)
Interval: Discrete 0.200s (5.000 fps)
Size: Discrete 1280x720
Interval: Discrete 0.033s (30.000 fps)
Interval: Discrete 0.040s (25.000 fps)
Interval: Discrete 0.050s (20.000 fps)
Interval: Discrete 0.067s (15.000 fps)
Interval: Discrete 0.100s (10.000 fps)
Interval: Discrete 0.200s (5.000 fps)
Size: Discrete 640x480
Interval: Discrete 0.033s (30.000 fps)
Interval: Discrete 0.040s (25.000 fps)
Interval: Discrete 0.050s (20.000 fps)
Interval: Discrete 0.067s (15.000 fps)
Interval: Discrete 0.100s (10.000 fps)
Interval: Discrete 0.200s (5.000 fps)
Size: Discrete 640x360
Interval: Discrete 0.033s (30.000 fps)
Interval: Discrete 0.040s (25.000 fps)
Interval: Discrete 0.050s (20.000 fps)
Interval: Discrete 0.067s (15.000 fps)
Interval: Discrete 0.100s (10.000 fps)
Interval: Discrete 0.200s (5.000 fps)
Size: Discrete 320x240
Interval: Discrete 0.033s (30.000 fps)
Interval: Discrete 0.040s (25.000 fps)
Interval: Discrete 0.050s (20.000 fps)
Interval: Discrete 0.067s (15.000 fps)
Interval: Discrete 0.100s (10.000 fps)
Interval: Discrete 0.200s (5.000 fps)
Size: Discrete 320x180
Interval: Discrete 0.033s (30.000 fps)
Interval: Discrete 0.040s (25.000 fps)
Interval: Discrete 0.050s (20.000 fps)
Interval: Discrete 0.067s (15.000 fps)
Interval: Discrete 0.100s (10.000 fps)
Interval: Discrete 0.200s (5.000 fps)
Size: Discrete 1920x1080
Interval: Discrete 0.033s (30.000 fps)
Interval: Discrete 0.040s (25.000 fps)
Interval: Discrete 0.050s (20.000 fps)
Interval: Discrete 0.067s (15.000 fps)
Interval: Discrete 0.100s (10.000 fps)
Interval: Discrete 0.200s (5.000 fps)

    Index       : 1                                                                                                                                                                                                                      
    Type        : Video Capture                                                                                                                                                                                                          
    Pixel Format: 'YUYV'                                                                                                                                                                                                                 
    Name        : YUYV 4:2:2                                                                                                                                                                                                             
            Size: Discrete 1920x1080                                                                                                                                                                                                     
                    Interval: Discrete 0.200s (5.000 fps)                                                                                                                                                                                
            Size: Discrete 1280x720                                                                                                                                                                                                      
                    Interval: Discrete 0.100s (10.000 fps)                                                                                                                                                                               
                    Interval: Discrete 0.200s (5.000 fps)                                                                                                                                                                                
            Size: Discrete 640x480                                                                                                                                                                                                       
                    Interval: Discrete 0.033s (30.000 fps)                                                                                                                                                                               
                    Interval: Discrete 0.040s (25.000 fps)                                                                                                                                                                               
                    Interval: Discrete 0.050s (20.000 fps)                                                                                                                                                                               
                    Interval: Discrete 0.067s (15.000 fps)                                                                                                                                                                               
                    Interval: Discrete 0.100s (10.000 fps)                                                                                                                                                                               
                    Interval: Discrete 0.200s (5.000 fps)                                                                                                                                                                                
            Size: Discrete 640x360                                                                                                                                                                                                       
                    Interval: Discrete 0.033s (30.000 fps)                                                                                                                                                                               
                    Interval: Discrete 0.040s (25.000 fps)                                                                                                                                                                               
                    Interval: Discrete 0.050s (20.000 fps)                                                                                                                                                                               
                    Interval: Discrete 0.067s (15.000 fps)                                                                                                                                                                               
                    Interval: Discrete 0.100s (10.000 fps)                                                                                                                                                                               
                    Interval: Discrete 0.200s (5.000 fps)                                                                                                                                                                                
            Size: Discrete 320x240                                                                                                                                                                                                       
                    Interval: Discrete 0.033s (30.000 fps)                                                                                                                                                                               
                    Interval: Discrete 0.040s (25.000 fps)                                                                                                                                                                               
                    Interval: Discrete 0.050s (20.000 fps)                                                                                                                                                                               
                    Interval: Discrete 0.067s (15.000 fps)                                                                                                                                                                               
                    Interval: Discrete 0.100s (10.000 fps)                                                                                                                                                                               
                    Interval: Discrete 0.200s (5.000 fps)                                                                                                                                                                                
            Size: Discrete 320x180                                                                                                                                                                                                       
                    Interval: Discrete 0.033s (30.000 fps)                                                                                                                                                                               
                    Interval: Discrete 0.040s (25.000 fps)                                                                                                                                                                               
                    Interval: Discrete 0.050s (20.000 fps)                                                                                                                                                                               
                    Interval: Discrete 0.067s (15.000 fps)                                                                                                                                                                               
                    Interval: Discrete 0.100s (10.000 fps)                                                                                                                                                                               
                    Interval: Discrete 0.200s (5.000 fps)                                                                                                                                                                                
            Size: Discrete 1920x1080                                                                                                                                                                                                     
                    Interval: Discrete 0.200s (5.000 fps)

This is video 1:

pi@raspberrypi:~ $ v4l2-ctl --list-formats-ext --device=/dev/video1
ioctl: VIDIOC_ENUM_FMT
Index : 0
Type : Video Capture
Pixel Format: ‘H264’ (compressed)
Name : H.264
Size: Discrete 1920x1080
Interval: Discrete 0.033s (30.000 fps)
Interval: Discrete 0.040s (25.000 fps)
Interval: Discrete 0.050s (20.000 fps)
Interval: Discrete 0.067s (15.000 fps)
Interval: Discrete 0.100s (10.000 fps)
Interval: Discrete 0.200s (5.000 fps)
Size: Discrete 1280x720
Interval: Discrete 0.033s (30.000 fps)
Interval: Discrete 0.040s (25.000 fps)
Interval: Discrete 0.050s (20.000 fps)
Interval: Discrete 0.067s (15.000 fps)
Interval: Discrete 0.100s (10.000 fps)
Interval: Discrete 0.200s (5.000 fps)
Size: Discrete 640x480
Interval: Discrete 0.033s (30.000 fps)
Interval: Discrete 0.040s (25.000 fps)
Interval: Discrete 0.050s (20.000 fps)
Interval: Discrete 0.067s (15.000 fps)
Interval: Discrete 0.100s (10.000 fps)
Interval: Discrete 0.200s (5.000 fps)
Size: Discrete 640x360
Interval: Discrete 0.033s (30.000 fps)
Interval: Discrete 0.040s (25.000 fps)
Interval: Discrete 0.050s (20.000 fps)
Interval: Discrete 0.067s (15.000 fps)
Interval: Discrete 0.100s (10.000 fps)
Interval: Discrete 0.200s (5.000 fps)
Size: Discrete 320x240
Interval: Discrete 0.033s (30.000 fps)
Interval: Discrete 0.040s (25.000 fps)
Interval: Discrete 0.050s (20.000 fps)
Interval: Discrete 0.067s (15.000 fps)
Interval: Discrete 0.100s (10.000 fps)
Interval: Discrete 0.200s (5.000 fps)
Size: Discrete 320x180
Interval: Discrete 0.033s (30.000 fps)
Interval: Discrete 0.040s (25.000 fps)
Interval: Discrete 0.050s (20.000 fps)
Interval: Discrete 0.067s (15.000 fps)
Interval: Discrete 0.100s (10.000 fps)
Interval: Discrete 0.200s (5.000 fps)
Size: Discrete 1920x1080
Interval: Discrete 0.033s (30.000 fps)
Interval: Discrete 0.040s (25.000 fps)
Interval: Discrete 0.050s (20.000 fps)
Interval: Discrete 0.067s (15.000 fps)
Interval: Discrete 0.100s (10.000 fps)
Interval: Discrete 0.200s (5.000 fps)

Can you show us what the options look like in the companion webpage for framerate?

Hi, yes here it is:

! h264parse
! queue
! rtph264pay config-interval=10 pt=96
! udpsink host=192.168.2.100 port=5600

I use a small program for testing my USB cameras, “H264 Preview v1.16” and if I switch on the H264 encoding in that program I get the same effect of showing video in 1 fps. The moment I turn it off it goes to show 30 Fps.
Can this information be helpful?
Jan R

I need to see the framerate options in the dropdown please

Framrate settings in gStreamer is 1920x1080 at 30 fps

Here it is:
30
25
20
15
10
5