uvc-camera rtsp



  • Hello 😊 ,

    I'm trying to use rtsp to stream a uvc camera. After I finish the connection(using fast boot module) and setting(using voxl-uvc-server and streamer), i get a stream from my computer like following:

    Screenshot 2022-08-25 18:07:55.png

    Here's my voxl-streamer.conf about uvc:

    "uvc-generic": {              
            "input": {                
                "interface": "mpa",   
                "mpa-camera": "uvc" },
            "output": {            
                "stream": {               
                    "rotation": 0, 
                    "width": 640,         
                    "height": 480,        
                    "decimator": 2,       
                    "bitrate": 1000000 } }
        }
    

    My camera is logitech C930c and Luminous C30 and both have similar image.

    Any suggestion is welcome, big thanks : )


  • Dev Team

    @張為超 This looks like a mismatch in video format. There are some helpful debugging tips here: https://docs.modalai.com/voxl-uvc-server/#helpful-tips. Can you show the output when you run voxl-uvc-server -s and also voxl-uvc-server -d -v?



  • Hello,
    Thanks for answering me.😊

    here's output for voxl-uvc-server -s :

    voxl:~$ voxl-uvc-server -s
    *** START DEVICE LIST ***
    
    Found device 1
    
    Got device descriptor for 046d:0891 E1127E0E
    
    Found device 046d:0891
    
    DEVICE CONFIGURATION (046d:0891/E1127E0E) ---
    Status: idle
    VideoControl:
    	bcdUVC: 0x0100
    VideoStreaming(1):
    	bEndpointAddress: 129
    	Formats:
    	UncompressedFormat(1)
    		  bits per pixel: 16
    		  GUID: 5955593200001000800000aa00389b71 (YUY2)
    		  default frame: 1
    		  aspect ratio: 0x0
    		  interlace flags: 00
    		  copy protect: 00
    			FrameDescriptor(1)
    			  capabilities: 00
    			  size: 640x480
    			  bit rate: 24576000-147456000
    			  max frame size: 614400
    			  default interval: 1/30
    			  interval[0]: 1/30
    			  interval[1]: 1/24
    			  interval[2]: 1/20
    			  interval[3]: 1/15
    			  interval[4]: 1/10
    			  interval[5]: 1/7
    			  interval[6]: 1/5
    			FrameDescriptor(2)
    			  capabilities: 00
    			  size: 160x120
    			  bit rate: 1536000-9216000
    			  max frame size: 38400
    			  default interval: 1/30
    			  interval[0]: 1/30
    			  interval[1]: 1/24
    			  interval[2]: 1/20
    			  interval[3]: 1/15
    			  interval[4]: 1/10
    			  interval[5]: 1/7
    			  interval[6]: 1/5
    			FrameDescriptor(3)
    			  capabilities: 00
    			  size: 176x144
    			  bit rate: 2027520-12165120
    			  max frame size: 50688
    			  default interval: 1/30
    			  interval[0]: 1/30
    			  interval[1]: 1/24
    			  interval[2]: 1/20
    			  interval[3]: 1/15
    			  interval[4]: 1/10
    			  interval[5]: 1/7
    			  interval[6]: 1/5
    			FrameDescriptor(4)
    			  capabilities: 00
    			  size: 320x180
    			  bit rate: 4608000-27648000
    			  max frame size: 115200
    			  default interval: 1/30
    			  interval[0]: 1/30
    			  interval[1]: 1/24
    			  interval[2]: 1/20
    			  interval[3]: 1/15
    			  interval[4]: 1/10
    			  interval[5]: 1/7
    			  interval[6]: 1/5
    			FrameDescriptor(5)
    			  capabilities: 00
    			  size: 320x240
    			  bit rate: 6144000-36864000
    			  max frame size: 153600
    			  default interval: 1/30
    			  interval[0]: 1/30
    			  interval[1]: 1/24
    			  interval[2]: 1/20
    			  interval[3]: 1/15
    			  interval[4]: 1/10
    			  interval[5]: 1/7
    			  interval[6]: 1/5
    			FrameDescriptor(6)
    			  capabilities: 00
    			  size: 352x288
    			  bit rate: 8110080-48660480
    			  max frame size: 202752
    			  default interval: 1/30
    			  interval[0]: 1/30
    			  interval[1]: 1/24
    			  interval[2]: 1/20
    			  interval[3]: 1/15
    			  interval[4]: 1/10
    			  interval[5]: 1/7
    			  interval[6]: 1/5
    			FrameDescriptor(7)
    			  capabilities: 00
    			  size: 424x240
    			  bit rate: 8140800-48844800
    			  max frame size: 203520
    			  default interval: 1/30
    			  interval[0]: 1/30
    			  interval[1]: 1/24
    			  interval[2]: 1/20
    			  interval[3]: 1/15
    			  interval[4]: 1/10
    			  interval[5]: 1/7
    			  interval[6]: 1/5
    			FrameDescriptor(8)
    			  capabilities: 00
    			  size: 480x270
    			  bit rate: 10368000-62208000
    			  max frame size: 259200
    			  default interval: 1/30
    			  interval[0]: 1/30
    			  interval[1]: 1/24
    			  interval[2]: 1/20
    			  interval[3]: 1/15
    			  interval[4]: 1/10
    			  interval[5]: 1/7
    			  interval[6]: 1/5
    			FrameDescriptor(9)
    			  capabilities: 00
    			  size: 640x360
    			  bit rate: 18432000-110592000
    			  max frame size: 460800
    			  default interval: 1/30
    			  interval[0]: 1/30
    			  interval[1]: 1/24
    			  interval[2]: 1/20
    			  interval[3]: 1/15
    			  interval[4]: 1/10
    			  interval[5]: 1/7
    			  interval[6]: 1/5
    			FrameDescriptor(10)
    			  capabilities: 00
    			  size: 800x448
    			  bit rate: 28672000-172032000
    			  max frame size: 716800
    			  default interval: 1/30
    			  interval[0]: 1/30
    			  interval[1]: 1/24
    			  interval[2]: 1/20
    			  interval[3]: 1/15
    			  interval[4]: 1/10
    			  interval[5]: 1/7
    			  interval[6]: 1/5
    			FrameDescriptor(11)
    			  capabilities: 00
    			  size: 800x600
    			  bit rate: 38400000-184320000
    			  max frame size: 960000
    			  default interval: 1/24
    			  interval[0]: 1/24
    			  interval[1]: 1/20
    			  interval[2]: 1/15
    			  interval[3]: 1/10
    			  interval[4]: 1/7
    			  interval[5]: 1/5
    			FrameDescriptor(12)
    			  capabilities: 00
    			  size: 848x480
    			  bit rate: 32563200-195379200
    			  max frame size: 814080
    			  default interval: 1/30
    			  interval[0]: 1/30
    			  interval[1]: 1/24
    			  interval[2]: 1/20
    			  interval[3]: 1/15
    			  interval[4]: 1/10
    			  interval[5]: 1/7
    			  interval[6]: 1/5
    			FrameDescriptor(13)
    			  capabilities: 00
    			  size: 960x540
    			  bit rate: 41472000-124416000
    			  max frame size: 1036800
    			  default interval: 1/15
    			  interval[0]: 1/15
    			  interval[1]: 1/10
    			  interval[2]: 1/7
    			  interval[3]: 1/5
    			FrameDescriptor(14)
    			  capabilities: 00
    			  size: 1024x576
    			  bit rate: 47185920-141557760
    			  max frame size: 1179648
    			  default interval: 1/15
    			  interval[0]: 1/15
    			  interval[1]: 1/10
    			  interval[2]: 1/7
    			  interval[3]: 1/5
    			FrameDescriptor(15)
    			  capabilities: 00
    			  size: 1280x720
    			  bit rate: 73728000-147456000
    			  max frame size: 1843200
    			  default interval: 1/10
    			  interval[0]: 1/10
    			  interval[1]: 1/7
    			  interval[2]: 1/5
    			FrameDescriptor(16)
    			  capabilities: 00
    			  size: 1600x896
    			  bit rate: 114688000-172032000
    			  max frame size: 2867200
    			  default interval: 1/7
    			  interval[0]: 1/7
    			  interval[1]: 1/5
    			FrameDescriptor(17)
    			  capabilities: 00
    			  size: 1920x1080
    			  bit rate: 165888000-165888000
    			  max frame size: 4147200
    			  default interval: 1/5
    			  interval[0]: 1/5
    			FrameDescriptor(18)
    			  capabilities: 00
    			  size: 2304x1296
    			  bit rate: 238878720-238878720
    			  max frame size: 5971968
    			  default interval: 1/2
    			  interval[0]: 1/2
    			FrameDescriptor(19)
    			  capabilities: 00
    			  size: 2304x1536
    			  bit rate: 283115520-283115520
    			  max frame size: 7077888
    			  default interval: 1/2
    			  interval[0]: 1/2
    	MJPEGFormat(2)
    		  bits per pixel: 0
    		  GUID: 4d4a5047000000000000000000000000 (MJPG)
    		  default frame: 1
    		  aspect ratio: 0x0
    		  interlace flags: 00
    		  copy protect: 00
    			FrameDescriptor(1)
    			  capabilities: 00
    			  size: 640x480
    			  bit rate: 24576000-147456000
    			  max frame size: 614400
    			  default interval: 1/30
    			  interval[0]: 1/30
    			  interval[1]: 1/24
    			  interval[2]: 1/20
    			  interval[3]: 1/15
    			  interval[4]: 1/10
    			  interval[5]: 1/7
    			  interval[6]: 1/5
    			FrameDescriptor(2)
    			  capabilities: 00
    			  size: 160x120
    			  bit rate: 1536000-9216000
    			  max frame size: 38400
    			  default interval: 1/30
    			  interval[0]: 1/30
    			  interval[1]: 1/24
    			  interval[2]: 1/20
    			  interval[3]: 1/15
    			  interval[4]: 1/10
    			  interval[5]: 1/7
    			  interval[6]: 1/5
    			FrameDescriptor(3)
    			  capabilities: 00
    			  size: 176x144
    			  bit rate: 2027520-12165120
    			  max frame size: 50688
    			  default interval: 1/30
    			  interval[0]: 1/30
    			  interval[1]: 1/24
    			  interval[2]: 1/20
    			  interval[3]: 1/15
    			  interval[4]: 1/10
    			  interval[5]: 1/7
    			  interval[6]: 1/5
    			FrameDescriptor(4)
    			  capabilities: 00
    			  size: 320x180
    			  bit rate: 4608000-27648000
    			  max frame size: 115200
    			  default interval: 1/30
    			  interval[0]: 1/30
    			  interval[1]: 1/24
    			  interval[2]: 1/20
    			  interval[3]: 1/15
    			  interval[4]: 1/10
    			  interval[5]: 1/7
    			  interval[6]: 1/5
    			FrameDescriptor(5)
    			  capabilities: 00
    			  size: 320x240
    			  bit rate: 6144000-36864000
    			  max frame size: 153600
    			  default interval: 1/30
    			  interval[0]: 1/30
    			  interval[1]: 1/24
    			  interval[2]: 1/20
    			  interval[3]: 1/15
    			  interval[4]: 1/10
    			  interval[5]: 1/7
    			  interval[6]: 1/5
    			FrameDescriptor(6)
    			  capabilities: 00
    			  size: 352x288
    			  bit rate: 8110080-48660480
    			  max frame size: 202752
    			  default interval: 1/30
    			  interval[0]: 1/30
    			  interval[1]: 1/24
    			  interval[2]: 1/20
    			  interval[3]: 1/15
    			  interval[4]: 1/10
    			  interval[5]: 1/7
    			  interval[6]: 1/5
    			FrameDescriptor(7)
    			  capabilities: 00
    			  size: 424x240
    			  bit rate: 8140800-48844800
    			  max frame size: 203520
    			  default interval: 1/30
    			  interval[0]: 1/30
    			  interval[1]: 1/24
    			  interval[2]: 1/20
    			  interval[3]: 1/15
    			  interval[4]: 1/10
    			  interval[5]: 1/7
    			  interval[6]: 1/5
    			FrameDescriptor(8)
    			  capabilities: 00
    			  size: 480x270
    			  bit rate: 10368000-62208000
    			  max frame size: 259200
    			  default interval: 1/30
    			  interval[0]: 1/30
    			  interval[1]: 1/24
    			  interval[2]: 1/20
    			  interval[3]: 1/15
    			  interval[4]: 1/10
    			  interval[5]: 1/7
    			  interval[6]: 1/5
    			FrameDescriptor(9)
    			  capabilities: 00
    			  size: 640x360
    			  bit rate: 18432000-110592000
    			  max frame size: 460800
    			  default interval: 1/30
    			  interval[0]: 1/30
    			  interval[1]: 1/24
    			  interval[2]: 1/20
    			  interval[3]: 1/15
    			  interval[4]: 1/10
    			  interval[5]: 1/7
    			  interval[6]: 1/5
    			FrameDescriptor(10)
    			  capabilities: 00
    			  size: 800x448
    			  bit rate: 28672000-172032000
    			  max frame size: 716800
    			  default interval: 1/30
    			  interval[0]: 1/30
    			  interval[1]: 1/24
    			  interval[2]: 1/20
    			  interval[3]: 1/15
    			  interval[4]: 1/10
    			  interval[5]: 1/7
    			  interval[6]: 1/5
    			FrameDescriptor(11)
    			  capabilities: 00
    			  size: 800x600
    			  bit rate: 38400000-230400000
    			  max frame size: 960000
    			  default interval: 1/30
    			  interval[0]: 1/30
    			  interval[1]: 1/24
    			  interval[2]: 1/20
    			  interval[3]: 1/15
    			  interval[4]: 1/10
    			  interval[5]: 1/7
    			  interval[6]: 1/5
    			FrameDescriptor(12)
    			  capabilities: 00
    			  size: 848x480
    			  bit rate: 32563200-195379200
    			  max frame size: 814080
    			  default interval: 1/30
    			  interval[0]: 1/30
    			  interval[1]: 1/24
    			  interval[2]: 1/20
    			  interval[3]: 1/15
    			  interval[4]: 1/10
    			  interval[5]: 1/7
    			  interval[6]: 1/5
    			FrameDescriptor(13)
    			  capabilities: 00
    			  size: 960x540
    			  bit rate: 41472000-248832000
    			  max frame size: 1036800
    			  default interval: 1/30
    			  interval[0]: 1/30
    			  interval[1]: 1/24
    			  interval[2]: 1/20
    			  interval[3]: 1/15
    			  interval[4]: 1/10
    			  interval[5]: 1/7
    			  interval[6]: 1/5
    			FrameDescriptor(14)
    			  capabilities: 00
    			  size: 1024x576
    			  bit rate: 47185920-283115520
    			  max frame size: 1179648
    			  default interval: 1/30
    			  interval[0]: 1/30
    			  interval[1]: 1/24
    			  interval[2]: 1/20
    			  interval[3]: 1/15
    			  interval[4]: 1/10
    			  interval[5]: 1/7
    			  interval[6]: 1/5
    			FrameDescriptor(15)
    			  capabilities: 00
    			  size: 1280x720
    			  bit rate: 73728000-442368000
    			  max frame size: 1843200
    			  default interval: 1/30
    			  interval[0]: 1/30
    			  interval[1]: 1/24
    			  interval[2]: 1/20
    			  interval[3]: 1/15
    			  interval[4]: 1/10
    			  interval[5]: 1/7
    			  interval[6]: 1/5
    			FrameDescriptor(16)
    			  capabilities: 00
    			  size: 1600x896
    			  bit rate: 114688000-688128000
    			  max frame size: 2867200
    			  default interval: 1/30
    			  interval[0]: 1/30
    			  interval[1]: 1/24
    			  interval[2]: 1/20
    			  interval[3]: 1/15
    			  interval[4]: 1/10
    			  interval[5]: 1/7
    			  interval[6]: 1/5
    			FrameDescriptor(17)
    			  capabilities: 00
    			  size: 1920x1080
    			  bit rate: 165888000-995328000
    			  max frame size: 4147200
    			  default interval: 1/30
    			  interval[0]: 1/30
    			  interval[1]: 1/24
    			  interval[2]: 1/20
    			  interval[3]: 1/15
    			  interval[4]: 1/10
    			  interval[5]: 1/7
    			  interval[6]: 1/5
    END DEVICE CONFIGURATION
    
    *** END DEVICE LIST ***
    

    voxl-uvc-server -d -v :

    voxl:~$ voxl-uvc-server -d -v 046d
    Enabling debug messages
    voxl-uvc-server starting
    Vendor ID 0x046d chosen
    Image resolution 640x480, 30 fps chosen
    UVC initialized
    Device 046d:0000 found
    Device opened
    uvc_get_stream_ctrl_format_size succeeded for format 0
    Streaming starting
    Got frame callback! frame_format = 3, width = 640, height = 480, length = 614400, ptr = (nil)
     * got image 30
     * got image 60
     * got image 90
     * got image 120
    ...
    ..
    

    I use gstream to watch rtsp from laptop by using:

    gst-launch-1.0 -v playbin uri=rtsp://192.168.8.1:8900/live uridecodebin0::source::latency=0
    

    Maybe here's the problem? But I also check VLC media player and got pretty much same image.


  • Dev Team

    @張為超 I don't see anything incorrect. Can you also show output when manually launching voxl-streamer with the -d option?



  • @Eric-Katzfey hello,sorry for responding late.

    here's output for voxl-streamer -d :

    voxl:~$ voxl-streamer -d
    Enabling debug messages
    Using configuration file /etc/modalai/voxl-streamer.conf
    MPA interface chosen
    Input pipe name /run/mpa/uvc/
    Output stream width 640
    Output stream height 480
    Output stream bitrate 1000000
    Output stream rotation 0
    Output frame decimator 2
    No image overlay specified
    Camera server Connected
    Meta data from incoming frame:
    	magic_number 0x564F584C 
    	timestamp_ns: 67575140926
    	frame_id: 720
    	width: 640
    	height: 480
    	size_bytes: 614400
    	stride: 1280
    	exposure_ns: 100
    	gain: 100
    	format: 8
    Input parameters initialized
    Made rtsp_server
    Created RTSP server main loop context
    Created RTSP server main loop
    Created RTSP server main loop source for callback
    Got 2 from gst_rtsp_server_attach
    Stream available at rtsp://127.0.0.1:8900/live
    A new client has connected to the RTSP server
    Creating media pipeline for RTSP client
    Made empty pipeline
    Made app_source
    Made parser_queue
    Made raw_video_parser
    Made scaler_queue
    Made scaler
    Made converter_queue
    Made video_converter
    Made rotator_queue
    Made video_rotate
    Made video_rotate_filter
    Made encoder_queue
    Made omx_encoder
    Made rtp_filter
    Made rtp_queue
    Made rtp_payload
    Made video_info
    Made video_caps
    

  • Dev Team

    @張為超 Everything still looks normal. We will order a couple of Logitech C930e and see if we can recreate your issue.



  • This post is deleted!


  • @Eric-Katzfey Hey, I just update my voxl-platform from 3.6.0 to 3.8.0 and reinstall some package include uvc-server.
    And I find out that the image become nice and clear. So I guess the problem is solved for me. Hope you guys still have time to refund C930e. Really big thanks for helping me to resolve problem. Cheers 😃


  • Dev Team

    @張為超 Great, glad to hear it is working for you now!


Log in to reply