is it possible to store the video recordings on the DepthAI device itself first and then when recordings are complete that it then downloads to a host?

Reason for this is i am trying to connect
3x OAK-D POE
AND
3x OAK-1 POE
from which i am trying to collect all of the video streams (mono and rgb) cameras, thus giving me alot of data stream which is a big botleneck. I do not require a live feed even though it would be nice if that would be possible do advice me of a senario where i can do this.

cheers

  • erik replied to this.

    Hello CodingArcher,
    so the only real solution here would be to save (encoded) video streams on the SD card. POE devices have an SD card slot, but unfortunately we don't have support for it yet. We are thinking to expose SD card support via Script node (which supports running python scripts on the device), since it has file system support. There's no ETA for this support yet, but we hope to have alpha release of this out in the next few weeks.
    Thanks, Erik

      erik

      Yeah i did notice the Sd card slot as i had a sneak peak inside of it 😉

      Hmm do you think it is possible to have all 6 devices record simultaneusly without losing frames?

      Cheers,
      markus

        CodingArcher I wasn't sure about it either so I checked as well 😃

        Hmm do you think it is possible to have all 6 devices record simultaneusly without losing frames?

        Do you mean on the SD card or by streaming all streams to the host and writing it on an SSD there?

        • If SD card, yes; you could have as many devices as you would want to, since there wouldn't be much/any communication with the host, so there wouldn't be any bottlenecks.
        • If you meant on the host SSD, that really depends on the frame size - what frame resolutions are you trying to stream? I believe your computer's ethernet can quickly become the bottleneck here.

        Thanks, Erik

          Hi erik ,
          yeah idealy it would be best to have the SD card to store them as a temporarily location before transfering it to the host. I guess i have to wait till you guys give the SD card option aviable in the alpha 😃

          I would be looking at high FPS and also good resolution to be able to see minute details.

          Cheers,
          Markus

          • erik replied to this.
            2 years later

            Unfortunately we bought an OAK-1 POE in the hope that using the internal SD-Card for collection data would be possible. What is the actual state. I wasn't able to find any documantation on that. Would be a great fature. Mabe to store sole other data on the SD to use localized Recording (via connected GPS).

            • erik replied to this.

              Hi FlorianRahe,

              The script is set so it expects sd card at /media/mmcsd-0-0/(some index). Perhaps the path to your SD card is different for your machine, or the SD card has yet to be mounted.

              Hope this helps,
              Jaka

                jakaskerl Sorry, I don't understan why for my machine? I want to use the sdcard which i put in the reader of the camera. That is the oak-1 poe. So since it should be a path on the device, it should always be the same. I changed the script and got the web-server running: there ist only /etc and /dev existing on the device. This should be completely independent from the host.

                  It seems, that I need to recomplibe the sdcard_support repository. Unfortunate it ist quite behind the actual branch. This is really sad, that it is not included in the main branch.

                  • erik replied to this.

                    Hi FlorianRahe
                    Oh sorry, my bad, I assumed you were using SD on the host. It seems the branch is a bit problematic.
                    Let me know if recompiling works.

                    Thanks,
                    Jaka

                    FlorianRahe it should have prebuilt wheels. Are there any features required from the newer versions?

                    FlorianRahe alternatively, you can also checkout to the correct branch (in depthai-python) and call python examples/install_requirements.py, which also fetches from artifacts.luxonis for the prebuilt wheels.

                    I'm somewhat really dissapointed. You are selling a device with sdcard slot, but in general the sdcard slot ist unusable.
                    I have code which is running in host and standalone mode on the main branch (not needing sdcard). But when I want to run the same code with the branch sdcard_support, the code only works in host mode. The only thing the code is doing: Serving the file system. So about nothing what could break. A nice side effect: The device is soft bricked after flashing the application.
                    I have one idea for a reason. Running the code in standalone in the main branch, the webserver serves the directory /media/mmcsd-0-0/ with the application file in it. In host mode this is not existing. But this is also the folder where the sdcard is mounted. So i think there is a conflict with that path and possibly the application cannot be loaded, since its not on the sdcard, which is now mounted at that path.

                    import time

                    import depthai as dai

                    # Create pipelinepipeline = dai.Pipeline()
                    # Define source and output

                    scriptServer = pipeline.create(dai.node.Script)
                    # Properties

                    scriptServer.setProcessor(dai.ProcessorType.LEON_CSS)
                    scriptServer.setScript("""
                    import http.server
                    import socketserver
                    import socket
                    import fcntl
                    import struct
                    import os
                    def get_ip_address(ifname):
                        s = socket.socket(socket.AF_INET, socket.SOCK_DGRAM)
                        return socket.inet_ntoa(fcntl.ioctl(
                            s.fileno(),
                            -1071617759,  # SIOCGIFADDR
                            struct.pack('256s', ifname[:15].encode())
                        )[20:24])
                    # Note: `chdir` here will prevent unmount, this should be improved!
                    # os.chdir('/media/mmcsd-0-0/')
                    PORT = 80
                    Handler = http.server.SimpleHTTPRequestHandler
                    with socketserver.TCPServer(("", PORT), Handler) as httpd:
                        ip = get_ip_address('re0')
                        node.warn(f'===== HTTP file server accessible at: http://{ip}')
                        httpd.serve_forever()""")

                    flash = True
                    # Flash the pipeline
                    if flash:
                        (f, bl) = dai.DeviceBootloader.getFirstAvailableDevice()
                        bootloader = dai.DeviceBootloader(bl)
                        progress = lambda p: print(f'Flashing progress: {p * 100:.1f}%')
                        bootloader.flash(progress, pipeline)
                    else:
                        # Connect to device and start pipeline
                        with dai.Device() as device:
                            device.startPipeline(pipeline)
                            print('======== Press C to capture JPEG images to SDcard')
                            while True:
                                key = input()[0]
                                if key == ord('q'):
                                    break
                                time.sleep(1)

                      Hi FlorianRahe ,
                      We apologize for the inconvenience, if you are dissapointed with your purchase you can write to support@luxonis.com to get a refund. Alternatively, you could write feature request on depthai-core repo to update this branch to the latest. It might be that sd-card path is clashing with nor/emmc flash, I am not sure.
                      Thanks, Erik

                        a month later

                        hello erik , can I get any documentation link, I only found the code on the sd card branch. If there is any document to understand more, please share. thank you

                        • erik replied to this.

                          erik ok. I have this error. I ran the branch seperately in a virtual environment and got this error:

                          depthai-python/examples/Script$ python3 script_jpeg_to_sdcard.py

                          [1844301001AEBD0F00] [88.103] [system] [warning] Device contains calibration data of version 1437204487 which is not supported in this version of depthai

                          ======== Press C to capture JPEG images to SDcard

                          [1844301001AEBD0F00] [93.378] [Script(4)] [warning] Saving to SDcard: /media/mmcsd-0-0/1000.jpg

                          [1844301001AEBD0F00] [93.379] [Script(4)] [critical] FileNotFoundError: [Errno 2] N: '/media/mmcsd-0-0/1000.jpg'

                          At:

                          <script>(15): <module>

                          could you please suggest whats wrong,.