mavlink-camera-manager: Resource temporarily unavailable when configure stream

Hello there, After installing and building I tried to create a stream from my USB camera connected to the Jetson Orin, but nothing happens in the UI and I’m getting the error below in the console:

camera.rs:816: Error receiving a message as 1:100. Reason: Io(
    Os {
        code: 11,
        kind: WouldBlock,
        message: "Resource temporarily unavailable",
    },
). Camera: MavlinkCameraInformation {
    component: MavlinkCameraComponent {
        system_id: 1,
        component_id: 100,
        stream_id: 1,
        vendor_name: "Logitech BRIO",
        model_name: "/dev/video0 - Logitech BRIO",
        firmware_version: 0,
        resolution_h: 1080,
        resolution_v: 1920,
        framerate: 30.0,
        bitrate: 5000,
        rotation: 0,
        hfov: 90,
        thermal: false,
    },
    mavlink_connection_string: "tcpout:127.0.0.1:5760",
    mavlink_stream_type: VIDEO_STREAM_TYPE_RTPUDP,
    video_stream_uri: Url {
        scheme: "udp",
        cannot_be_a_base: false,
        username: "",
        password: None,
        host: Some(
            Domain(
                "0.0.0.0",
            ),
        ),
        port: Some(
            5600,
        ),
        path: "/logi",
        query: None,
        fragment: None,
    },
    video_source_type: Local(
        VideoSourceLocal {
            name: "Logitech BRIO",
            device_path: "/dev/video0",
            typ: Unknown(
                "usb-3610000.xhci-3.4",
            ),
        },
    ),
}

NOTE : there’s no other apps or processes using the camera, and I’m using mavlink-router to provide a server for the mavlink communication.

Any idea how to solve that?

About this issue

  • Original URL
  • State: closed
  • Created 3 years ago
  • Comments: 15 (4 by maintainers)

Most upvoted comments

You can also use C++ to receive the stream, you can check this minimal example.

It’s also possible to write a C++/Qt application that uses this QML code, or just the QML with QHot.

Or Python.

Closing this for now since the underlying problem was detected.

Thank you very much for your feedback, I’m going to play arround to write a C++ consumer for the stream to see if I’m satisfied with the latency (I would appreciate some guidance too!).

Nice! Well, to receive you can start testing with the following pipeline right from your console:

gst-launch-1.0 -vc udpsrc address=0.0.0.0 port=5600 close-socket=false auto-multicast=true \
    ! application/x-rtp,payload=96 ! rtpjpegdepay ! jpegdec \
    ! videoconvert ! fpsdisplaysink sync=false

If that works, you can start by hacking this example.


Regarding adding JPEG support to your WebRTC I would be more than happy to know how and contribute.

Awesome, I’ll prepare a guide and link it here later.

Cool, we can see some interesting points:

* The message `Unable to identify the local camera connection type, please report the problem: \"usb-3610000.xhci-3.4\"` means some of the exposed camera devices are not compatible, which doesn't mean your camera is not supported, but it's a chance... Can you post the output of `v4l2-ctl --all`?

* The main problem seems to be that `discard-corrupted-frames` is not a valid property in your GstJpegDec. Can you post the output of `gst-inspect-1.0 jpegdec`?

Also, just for completeness, can you post the output of uname -a?

edit: I created a PR (#262) fixing the discord-corrupted-frames problem, should be merged soon.

Sorry for my late reply, here are the information:

  • v4l2-ctl --all :

Driver Info:
        Driver name      : uvcvideo
        Card type        : Logitech BRIO
        Bus info         : usb-3610000.xhci-3.4
        Driver version   : 5.10.104
        Capabilities     : 0x84a00001
                Video Capture
                Metadata Capture
                Streaming
                Extended Pix Format
                Device Capabilities
        Device Caps      : 0x04200001
                Video Capture
                Streaming
                Extended Pix Format
Media Driver Info:
        Driver name      : uvcvideo
        Model            : Logitech BRIO
        Serial           : 00000000
        Bus info         : usb-3610000.xhci-3.4
        Media version    : 5.10.104
        Hardware revision: 0x00000317 (791)
        Driver version   : 5.10.104
Interface Info:
        ID               : 0x03000002
        Type             : V4L Video
Entity Info:
        ID               : 0x00000001 (1)
        Name             : Logitech BRIO
        Function         : V4L2 I/O
        Flags         : default
        Pad 0x0100000d   : 0: Sink
          Link 0x0200002c: from remote pad 0x1000010 of entity 'Processing 3': Data, Enabled, Immutable
Priority: 2
Video input : 0 (Camera 1: ok)
Format Video Capture:
        Width/Height      : 1280/720
        Pixel Format      : 'YUYV' (YUYV 4:2:2)
        Field             : None
        Bytes per Line    : 2560
        Size Image        : 1843200
        Colorspace        : sRGB
        Transfer Function : Rec. 709
        YCbCr/HSV Encoding: ITU-R 601
        Quantization      : Default (maps to Limited Range)
        Flags             :
Crop Capability Video Capture:
        Bounds      : Left 0, Top 0, Width 1280, Height 720
        Default     : Left 0, Top 0, Width 1280, Height 720
        Pixel Aspect: 1/1
Selection Video Capture: crop_default, Left 0, Top 0, Width 1280, Height 720, Flags:
Selection Video Capture: crop_bounds, Left 0, Top 0, Width 1280, Height 720, Flags:
Streaming Parameters Video Capture:
        Capabilities     : timeperframe
        Frames per second: 30.000 (30/1)
        Read buffers     : 0
                     brightness 0x00980900 (int)    : min=0 max=255 step=1 default=128 value=155
                       contrast 0x00980901 (int)    : min=0 max=255 step=1 default=128 value=128
                     saturation 0x00980902 (int)    : min=0 max=255 step=1 default=128 value=128
 white_balance_temperature_auto 0x0098090c (bool)   : default=1 value=1
                           gain 0x00980913 (int)    : min=0 max=255 step=1 default=0 value=0
           power_line_frequency 0x00980918 (menu)   : min=0 max=2 default=2 value=1
                                0: Disabled
                                1: 50 Hz
                                2: 60 Hz
      white_balance_temperature 0x0098091a (int)    : min=2000 max=7500 step=10 default=4000 value=3990 flags=inactive
                      sharpness 0x0098091b (int)    : min=0 max=255 step=1 default=128 value=128
         backlight_compensation 0x0098091c (int)    : min=0 max=1 step=1 default=1 value=1
                  exposure_auto 0x009a0901 (menu)   : min=0 max=3 default=3 value=3
                                1: Manual Mode
                                3: Aperture Priority Mode
              exposure_absolute 0x009a0902 (int)    : min=3 max=2047 step=1 default=250 value=156 flags=inactive
         exposure_auto_priority 0x009a0903 (bool)   : default=0 value=1
                   pan_absolute 0x009a0908 (int)    : min=-36000 max=36000 step=3600 default=0 value=-36000
                  tilt_absolute 0x009a0909 (int)    : min=-36000 max=36000 step=3600 default=0 value=-32400
                 focus_absolute 0x009a090a (int)    : min=0 max=255 step=5 default=0 value=10 flags=inactive
                     focus_auto 0x009a090c (bool)   : default=1 value=1
                  zoom_absolute 0x009a090d (int)    : min=100 max=500 step=1 default=100 value=100
  • gst-inspect-1.0 jpegdec :

Factory Details:
  Rank                     primary (256)
  Long-name                JPEG image decoder
  Klass                    Codec/Decoder/Image
  Description              Decode images from JPEG format
  Author                   Wim Taymans <wim@fluendo.com>

Plugin Details:
  Name                     jpeg
  Description              JPeg plugin library
  Filename                 /usr/lib/aarch64-linux-gnu/gstreamer-1.0/libgstjpeg.so
  Version                  1.16.3
  License                  LGPL
  Source module            gst-plugins-good
  Source release date      2020-10-21
  Binary package           GStreamer Good Plugins (Ubuntu)
  Origin URL               https://launchpad.net/distros/ubuntu/+source/gst-plugins-good1.0

GObject
 +----GInitiallyUnowned
       +----GstObject
             +----GstElement
                   +----GstVideoDecoder
                         +----GstJpegDec

Pad Templates:
  SRC template: 'src'
    Availability: Always
    Capabilities:
      video/x-raw
                 format: { (string)I420, (string)RGB, (string)BGR, (string)RGBx, (string)xRGB, (string)BGRx, (string)xBGR, (string)GRAY8 }
                  width: [ 1, 2147483647 ]
                 height: [ 1, 2147483647 ]
              framerate: [ 0/1, 2147483647/1 ]

  SINK template: 'sink'
    Availability: Always
    Capabilities:
      image/jpeg

Element has no clocking capabilities.
Element has no URI handling capabilities.

Pads:
  SINK: 'sink'
    Pad Template: 'sink'
  SRC: 'src'
    Pad Template: 'src'

Element Properties:
  idct-method         : The IDCT algorithm to use
                        flags: readable, writable
                        Enum "GstIDCTMethod" Default: 1, "ifast"
                           (0): islow            - Slow but accurate integer algorithm
                           (1): ifast            - Faster, less accurate integer method
                           (2): float            - Floating-point: accurate, fast on fast HW
  max-errors          : (Deprecated) Error out after receiving N consecutive decoding errors (-1 = never fail, 0 = automatic, 1 = fail on first error)
                        flags: readable, writable, deprecated
                        Integer. Range: -1 - 2147483647 Default: 0
  name                : The name of the object
                        flags: readable, writable
                        String. Default: "jpegdec0"
  parent              : The parent of the object
                        flags: readable, writable
                        Object of type "GstObject"

  • uname -a : Linux microorin1-desktop 5.10.104-tegra #1 SMP PREEMPT Sun Mar 19 07:55:28 PDT 2023 aarch64 aarch64 aarch64 GNU/Linux

I’ll try to pull the master with the new merge and rebuild and try and let you know.