Hello,

I am writing to inquire about the possibility of streaming video from the OAK-D POE camera through VLC. Could you provide any examples that I could use for reference? Specifically, I would like to know if this is achievable and whether it is necessary to configure a multicast connection.

Thank you very much!

Hello,

I wanted to provide an update that I've successfully resolved the previous issue. However, I'm now encountering a new challenge.

My current objective is to broadcast video from the OAK-D POE camera into an HTML video tag. To accomplish this, I've employed the Script MJPEG server by bootloading it onto our camera (oak-d as a server). Unfortunately, when I load my HTML webpage, I only receive a static image. I'm uncertain about the cause behind this behavior. Do you have any suggestions on how I might go about resolving this particular issue?

Below is the simple HTML code I'm currently working with:

<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <meta name="viewport" content="width=device-width; height=device-height;">
    <title>Imagen HTML</title>
</head>
<body>
    <h1>Video HTML</h1>
    <video controls width="250" autoplay>
        <source src="my_url/img" type="video/mp4">
    </video>
</body>
</html>

Thanks a lot!

    Hi Irena
    Maybe try replacing video tag with an image. I haven't tested but according to some web sources the site will automatically update with new img when received, giving the appearance of video. If that doesn't work, check how to properly update the page when a new img arrives.

    Thoughts?
    Jaka

      Hi jakaskerl !

      I wanted to provide an update on our recent progress and seek your guidance on a new challenge we've encountered.

      We've successfully resolved the previous issue by implementing the HTML iframe tag solution. The functionality is now working seamlessly.

      However, a new endeavor has brought us to a different hurdle. Our current objective involves running a neural network (NN) model in standalone mode (streming http), all within the camera itself. The purpose of this initiative is to facilitate real-time people detection and tracking. We have opted to employ a mobileSSD model for this task. To ensure accurate bounding box sampling, we've identified the need to incorporate 'opnecv' within the script.

      During our implementation, we recive a message in the console: "[critical] ModuleNotFoundError: No module named 'cv2'." It's ok? Furthermore, we are curious to know if it is feasible to install the 'cv2' module on the device? Or any tips that can provide us to achieve this goal.

      Thank you for your time and assistance.

        Hi Irena
        cv2 library won't work on the script node. Here are the docs pertaining to this issue.

        Irena To ensure accurate bounding box sampling, we've identified the need to incorporate 'opnecv' within the script.

        Could you elaborate what exactly you need and why OpenCV is needed for it?
        2 options that come to mind:

        • implement it yourself using raw python code or supported modules/libraries
        • send the data needed over socket and parse them on host side

        For example, cumulative object counting project was ported into standalone mode. In order to draw the tracking information host side, we had to send the information, as well as image frames over the socket and parse/draw them host side.

        Thanks,
        Jaka

        Hi @jakaskerl !!

        Thank you for your prompt response to my inquiry.

        After going through the libraries mentioned in the link you provided, I must admit that I'm not entirely clear on which one would best suit the task at hand.

        If possible, could you possibly share an example or a solution that pertains to a similar problem? Having a concrete illustration would help me a lot.

        Thank you in advance.

          Hi Irena
          The link I sent (docs) are the libraries and modules that can be used with the script node. I would need to know what kind of operations you are aiming to perform to suggest an alternative. Most likely, you will have to hardcode the functions yourself using raw python.

          Another example - MQTT library is not available from inside script node, so bherbruck ported it to a python file which we can use. https://github.com/luxonis/depthai-experiments/tree/7e28e1009832552734eaf9b4d3d9433bdaa2b1fe/gen2-poe-mqtt

          Similarly, you would have to code the function you wish to have.

          OR, as I said, send the data over to the host and perform the operations there like you usually would with the help of OpenCV.

          Thanks,
          Jaka

            Hi jakaskerl!

            Thanks a lot for your prompt response.

            Our aim is pretty straightforward: we're trying to set up a neural network flow that can spot people and then show the images or video stream with those detection squares overlaid. The video clip featuring the detections should be accessible through an HTML server. What's key here is that this whole process, from detection to video display with the bounding boxes, needs to happen in standalone mode. That's why the second option you mentioned earlier wouldn't quite work for us.

            Right now, I've managed to performs in standalone mode by streaming content via HTML.

            However, I'm still a bit unsure about how MQTT fits into the picture regarding the second part of our challenge—specifically, displaying the video stream with those detection bounding boxes, all have to be implemented in standalone mode.

            Tahnks once again for your help!

              Hi Irena

              Irena However, I'm still a bit unsure about how MQTT fits into the picture

              The mqtt was just an example that you can sometimes manually port modules (that aren't necessarily available inside script node out of the box) to the device.

              Irena Right now, I've managed to performs in standalone mode by streaming content via HTTP.

              That's great. What modules are you using for it? Perhaps you could hardcode the bounding boxes into the html.

              Thanks,
              Jaka