• Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Register
  • Login
ModalAI Forum
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
    • Register
    • Login

    uvc_get_stream_ctrl_format_size failed

    Ask your questions right here!
    3
    39
    3.8k
    Loading More Posts
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes
    Reply
    • Reply as topic
    Log in to reply
    This topic has been deleted. Only users with topic management privileges can see it.
    • K
      Kris @Kris
      last edited by 28 Feb 2023, 05:22

      Below are the errors that I am getting.

      voxl:~$ voxl-uvc-server   
      uvc_open failed
      voxl:~$ voxl-uvc-server
      uvc_open failed
      voxl:~$ voxl-uvc-server
      uvc_get_stream_ctrl_format_size failed
      
      voxl:~$ voxl-streamer -c uvc-generic -d
      Using configuration uvc-generic
      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
      First frame timestamp: 3202206494106
      Second frame timestamp: 3203206232991
      Calculated frame delta in ns: 999738885
      Calculated frame delta in 100us: 9997
      Calculated input frame rate is: 1
      Output frame rate will be: 0
      ERROR: Frame size mismatch 614400 12441600
      ERROR: Timeout on input parameter initialization
      

      Below is my streamer.conf file

      {
          "conf-version":"1.3",
          "configuration": "hires",
          "uvc-generic": {
              "input": {
                  "interface": "mpa",
                  "mpa-camera": "uvc" },
              "output": {
                  "stream": {
                      "rotation": 0,
                      "width": 640,
                      "height": 480,
                      "decimator": 2,
                      "bitrate": 1000000 } }
          },
          "uvc-flir-boson": {
              "input": {
                  "interface": "mpa",
                  "mpa-camera": "uvc" },
              "output": {
                  "stream": {
                      "rotation": 0,
                      "width": 640,
                      "height": 512,
                      "decimator": 2,
                      "bitrate": 1000000 } }
          },
          "uvc-flir-lepton": {
              "input": {
                  "interface": "mpa",
                  "mpa-camera": "uvc" },
              "output": {
                  "stream": {
                      "rotation": 0,
                      "width": 160,
                      "height": 120,
                      "bitrate": 500000 } } 
          },                                
          "hires": {                        
              "input": {                    
                  "interface": "mpa",       
                  "mpa-camera": "hires" },  
              "output": {                   
                  "stream": {               
                      "rotation": 0,        
                      "width": 640,         
                      "height": 480,        
                      "decimator": 2,       
                      "bitrate": 1000000 } }
          },                                
          "hires-logo": {                   
              "input": {                    
                  "interface": "mpa",       
                  "mpa-camera": "hires" },  
              "output": {                   
                  "stream": {               
                      "rotation": 0,        
                      "width": 640,         
                      "height": 480,        
                      "decimator": 2,       
                      "bitrate": 1000000 } },
              "overlay": {                   
                  "location": "/etc/modalai/modalai.png",
                  "offset_x": -1,                        
                  "offset_y": -1 }                       
          },                                             
          "stereo": {                                    
              "input": {                                 
                  "interface": "mpa",                    
                  "mpa-camera": "stereo" },              
              "output": {                                
                  "stream": {                            
                      "width": 640,                      
                      "height": 960,                     
                      "decimator": 2,                    
                      "bitrate": 1000000 } }             
          },                                             
          "tracking": {                                  
              "input": {                                 
                  "interface": "mpa",                    
                  "mpa-camera": "tracking" },            
              "output": {                                
                  "stream": {                            
                      "width": 640,                      
                      "height": 480,                     
                      "decimator": 2,                    
                      "bitrate": 1000000 } }             
          },                                             
          "dfs-disparity": {                             
              "input": {                                 
                  "interface": "mpa",                    
                  "mpa-camera": "dfs_disparity" },       
              "output": {                                
                  "stream": {                            
                      "width": 640,                      
                      "height": 480,                     
                      "decimator": 2,                    
                      "bitrate": 1000000 } }             
          },                                             
          "qvio-overlay": {                              
              "input": {                                 
                  "interface": "mpa",                    
                  "mpa-camera": "qvio_overlay" },        
              "output": {                                
                  "stream": {                            
                      "width": 640,                      
                      "height": 544,                     
                      "decimator": 2,                    
                      "bitrate": 1000000 } }             
          },                                             
          "tflite-overlay": {                            
              "input": {                                 
                  "interface": "mpa",                    
                  "mpa-camera": "tflite" },              
              "output": {                                
                  "stream": {                            
                      "width": 640,                      
                      "height": 480,                     
                      "decimator": 2,                    
                      "bitrate": 1000000 } }             
          },                                             
          "hdmi-mpa": {                                  
              "input": {                                 
                  "interface": "mpa",                    
                  "mpa-camera": "v4l2" },                
              "output": {                                
                  "stream": {                            
                      "width": 640,                      
                      "height": 360,                     
                      "decimator": 2,                    
                      "bitrate": 1000000 } }             
          },                                             
          "gphoto2-mpa": {                               
              "input": {                                 
                  "interface": "mpa",                    
                  "mpa-camera": "gphoto2" },             
              "output": {                                
                  "stream": {                            
                      "width": 640,                      
                      "height": 360,                     
                      "decimator": 2,                    
                      "bitrate": 1000000 } }             
          },                                             
          "video-test": {                                
              "input": {                                 
                  "interface": "test",                   
                  "frame": {                             
                      "width": 640,                      
                      "height": 480,                     
                      "format": "yuv420" } },            
              "output": {                                
                  "stream": {                            
                      "rotation": 0,                     
                      "width": 640,                      
                      "height": 480,                     
                      "rate": 30,                        
                      "bitrate": 1000000 } }             
          },                                             
          "uvc-video": {                                 
              "input": {                                 
                  "interface": "uvc",                    
                  "device": "/dev/video0" },             
              "output": {                                
                  "stream": {                            
                      "rotation": 0,                     
                      "width": 640,                      
                      "height": 360,                     
                      "rate": 15,                        
                      "bitrate": 1000000 } }             
          }                                              
                                                         
      }                                                  
      

      So, it looks like I am running into the same problem that @wilkinsaf had, but I could be wrong. Please let me know what you think.

      Thank you

      K 1 Reply Last reply 28 Feb 2023, 07:41 Reply Quote 0
      • K
        Kris @Kris
        last edited by 28 Feb 2023, 07:41

        I had also tried “decimator”: 1,
        for the UVC generic in the streamer.conf file, and that did not work either.

        {
            "conf-version":"1.3",
            "configuration": "hires",
            "uvc-generic": {
                "input": {
                    "interface": "mpa",
                    "mpa-camera": "uvc" },
                "output": {
                    "stream": {
                        "rotation": 0,
                        "width": 640,
                        "height": 480,
                        "decimator": 1,
                        "bitrate": 1000000 } }
        
        K 1 Reply Last reply 28 Feb 2023, 07:44 Reply Quote 0
        • K
          Kris @Kris
          last edited by 28 Feb 2023, 07:44

          The Frame size mismatch 614400 12441600 is always the same.

          1 Reply Last reply Reply Quote 0
          • tomT
            tom admin
            last edited by 28 Feb 2023, 16:28

            @Kris You're on a pretty old platform release, I would start by updating to 0.9: https://developer.modalai.com/asset/view/115

            K 2 Replies Last reply 1 Mar 2023, 00:57 Reply Quote 0
            • K
              Kris @tom
              last edited by 1 Mar 2023, 00:57

              @tom
              Ok, thank you. I will try that first.

              1 Reply Last reply Reply Quote 0
              • K
                Kris @tom
                last edited by 7 Mar 2023, 00:49

                @tom
                I've updated my platform to 0.9 and I am still unable to successfully open the uvc camera.

                voxl:~$ lsusb
                Bus 001 Device 008: ID 2560:c184  
                Bus 002 Device 001: ID 1d6b:0003 Linux Foundation 3.0 root hub
                Bus 001 Device 002: ID 0424:2514 Standard Microsystems Corp. USB 2.0 Hub
                Bus 001 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
                
                voxl:~$ voxl-uvc-server -p c184
                uvc_open failed
                voxl:~$ voxl-uvc-server -v 2560
                uvc_open failed
                voxl:~$ voxl-uvc-server -d     
                Enabling debug messages
                voxl-uvc-server starting
                Image resolution 640x480, 30 fps chosen
                UVC initialized
                Device found
                uvc_open failed
                UVC exited
                voxl-uvc-server ending
                
                1 Reply Last reply Reply Quote 0
                • tomT
                  tom admin
                  last edited by 7 Mar 2023, 00:55

                  @Kris Are you sure that your UVC camera is 640x480 resolution?

                  K 2 Replies Last reply 7 Mar 2023, 01:03 Reply Quote 0
                  • K
                    Kris @tom
                    last edited by 7 Mar 2023, 01:03

                    @tom
                    Yes, in the debug messages, it says that it is 640x480.
                    Is there another way to check the resolution?

                    1 Reply Last reply Reply Quote 0
                    • tomT
                      tom admin
                      last edited by 7 Mar 2023, 01:10

                      @Kris Yeah that's just the default that voxl-uvc-server uses if not explicitly specified otherwise with the -r flag.

                      You can use show-video-device-info.sh and that may provide some clues.

                      What is the part number or make and model of the UVC camera you're using? It's possible it's supported image formats don't match up with those supported by voxl-uvc-server

                      K 4 Replies Last reply 7 Mar 2023, 01:18 Reply Quote 0
                      • K
                        Kris @tom
                        last edited by 7 Mar 2023, 01:18

                        @tom Ok, Thank you I will try that now.
                        Here are some details of my UVC 2.0 camera.
                        e-CAM83.png

                        1 Reply Last reply Reply Quote 0
                        • K
                          Kris @tom
                          last edited by 7 Mar 2023, 01:21

                          @tom
                          This is all the information I get from show-video-device-info.sh

                          voxl:~$ show-video-device-info.sh
                          /dev/video2: e-CAM83_USB 2560:c184
                          /dev/video3: e-CAM83_USB 2560:c184
                          
                          1 Reply Last reply Reply Quote 0
                          • K
                            Kris
                            last edited by Kris 7 Mar 2023, 01:27 7 Mar 2023, 01:23

                            Is there any chance I can get 1920 x 1080 @30 fps using h264 in the voxl-uvc-server?
                            Or is 640 x 480 the only option in the voxl-uvc-server?

                            1 Reply Last reply Reply Quote 0
                            • K
                              Kris
                              last edited by 7 Mar 2023, 01:27

                              The rest of the information about my current uvc camera is here.

                              1 Reply Last reply Reply Quote 0
                              • K
                                Kris
                                last edited by 7 Mar 2023, 01:41

                                Additional information;
                                e-CAM83-1.png
                                e-CAM83-2.png

                                1 Reply Last reply Reply Quote 0
                                • K
                                  Kris @tom
                                  last edited by 7 Mar 2023, 01:49

                                  @tom
                                  I gave this a try, but no luck.

                                  voxl:~$ voxl-uvc-server -d -r 1920x1080 -f 30
                                  Enabling debug messages
                                  voxl-uvc-server starting
                                  Image resolution 1920x1080, 30 fps chosen
                                  UVC initialized
                                  Device found
                                  uvc_open failed
                                  UVC exited
                                  voxl-uvc-server ending
                                  
                                  1 Reply Last reply Reply Quote 0
                                  • K
                                    Kris @tom
                                    last edited by 7 Mar 2023, 03:29

                                    @tom

                                    voxl:~$ show-video-device-info.sh
                                    /dev/video2: e-CAM83_USB 2560:c184
                                    /dev/video3: e-CAM83_USB 2560:c184
                                    

                                    /dev/video2: is h264
                                    /dev/video3: is MJPG & YUY2

                                    1 Reply Last reply Reply Quote 0
                                    • K
                                      Kris
                                      last edited by 7 Mar 2023, 03:35

                                      voxl:~$ voxl-uvc-server -l
                                      *** START DEVICE LIST ***
                                      
                                      Found device 0
                                      
                                      Got device descriptor for 2560:c184 (null)
                                      
                                      Found device 2560:c184
                                      
                                      uvc_open failed, Return code: I/O error (-1)
                                      
                                      Found device 0
                                      
                                      Got device descriptor for 2560:c184 (null)
                                      
                                      Found device 2560:c184
                                      
                                      uvc_open failed, Return code: No such device (-4)
                                      
                                      Found device 0
                                      
                                      Got device descriptor for 2560:c184 (null)
                                      
                                      uvc_find_device failed, Return code: No such device (-4)
                                      
                                      Got device descriptor for 2560:c184 (null)
                                      
                                      Found device 2560:c184
                                      
                                      DEVICE CONFIGURATION (2560:c184/00.00.01) ---
                                      Status: idle
                                      VideoControl:
                                      	bcdUVC: 0x0100
                                      VideoStreaming(1):
                                      	bEndpointAddress: 129
                                      	Formats:
                                      	FrameFormat(1)
                                      		  bits per pixel: 16
                                      		  GUID: 4832363400001000800000aa00389b71 (H264)
                                      		  default frame: 1
                                      		  aspect ratio: 0x0
                                      		  interlace flags: 00
                                      		  copy protect: 00
                                      			FrameDescriptor(1)
                                      			  capabilities: 00
                                      			  size: 3840x2160
                                      			  bit rate: 165888000-995328000
                                      			  max frame size: 0
                                      			  default interval: 1/15
                                      			  interval[0]: 1/30
                                      			  interval[1]: 1/15
                                      			FrameDescriptor(2)
                                      			  capabilities: 00
                                      			  size: 1920x1080
                                      			  bit rate: 165888000-995328000
                                      			  max frame size: 0
                                      			  default interval: 1/30
                                      			  interval[0]: 1/30
                                      VideoStreaming(2):
                                      	bEndpointAddress: 136
                                      	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/15
                                      			  interval[0]: 1/15
                                      	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: 1920x1080
                                      			  bit rate: 24576000-147456000
                                      			  max frame size: 614400
                                      			  default interval: 1/30
                                      			  interval[0]: 1/30
                                      END DEVICE CONFIGURATION
                                      
                                      *** END DEVICE LIST ***
                                      
                                      1 Reply Last reply Reply Quote 0
                                      • K
                                        Kris @tom
                                        last edited by 7 Mar 2023, 07:22

                                        @tom
                                        May I ask what image formats the voxl-uvc-serversupports?

                                        1 Reply Last reply Reply Quote 0
                                        • K
                                          Kris
                                          last edited by 7 Mar 2023, 10:25

                                          I have a feeling that maybe the problem is deriving from my camera’s GUID Format.
                                          Does the voxl-uvc-server accept GUID: 4832363400001000800000aa00389b71
                                          for h264 format?
                                          How would I go about correcting the guidFormat to match up with the voxl-uvc-server?

                                          1 Reply Last reply Reply Quote 0
                                          • tomT
                                            tom admin
                                            last edited by 7 Mar 2023, 18:39

                                            @Kris You can see supported format info here: https://gitlab.com/voxl-public/voxl-sdk/services/voxl-uvc-server/-/blob/master/src/main.c#L64

                                            Another thing to try out is using gstreamer instead of voxl-uvc-server + voxl-streamer with a pipeline similar to the following:

                                            gst-launch-1.0 v4l2src device=/dev/video2 ! video/x-raw,format=YUY2 ! videoconvert ! x264enc speed-preset=ultrafast tune=zerolatency ! rtph264pay name=pay0 ! udpsink host=192.168.1.97 port=8554

                                            The pipeline may need to be tweaked slightly but it's one I've used before for other UVC cameras that voxl-uvc-server was unhappy with

                                            K 4 Replies Last reply 7 Mar 2023, 23:08 Reply Quote 0
                                            2 out of 39
                                            • First post
                                              2/39
                                              Last post
                                            Powered by NodeBB | Contributors