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

    Video recording from a 4k camera to a SD card.

    Ask your questions right here!
    5
    17
    1.3k
    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.
    • C
      czarsimon @Eric Katzfey
      last edited by 17 Jan 2022, 15:22

      This post is deleted!
      1 Reply Last reply Reply Quote 0
      • P
        Pavel Ardashov @Eric Katzfey
        last edited by 1 Feb 2022, 07:24

        @Eric-Katzfey camera MPA https://www.modalai.com/products/4k-high-resolution-sensor-for-voxl-8x8x5-8mm
        format RAW or compressed
        I need to stream full hd and record original 4k video.

        E 1 Reply Last reply 3 Feb 2022, 22:34 Reply Quote 0
        • E
          Eric Katzfey ModalAI Team @Pavel Ardashov
          last edited by 3 Feb 2022, 22:34

          @Pavel-Ardashov It produces uncompressed NV21 format frames.

          P 1 Reply Last reply 8 Feb 2022, 09:40 Reply Quote 0
          • P
            Pavel Ardashov @Eric Katzfey
            last edited by 8 Feb 2022, 09:40

            @Eric-Katzfey The documentation says about the ability to record 4k30 video. Currently, I don't care about the recording format.
            I need to stream full hd and record 4k30 from camera M0025

            1 Reply Last reply Reply Quote 0
            • P
              Pavel Ardashov
              last edited by 18 Feb 2022, 09:43

              Is it currently possible with VOXL to stream in Full HD and record 4k30 from the M0025?

              E 1 Reply Last reply 23 Feb 2022, 22:31 Reply Quote 0
              • C
                Chad Sweet ModalAI Team
                last edited by 23 Feb 2022, 17:44

                Hi Pavel,

                We need a little help clarifying your request. Your initial topic suggests "original quality" which means no compression. It seems you are looking to perform the following concurrently?
                -> Record to SD Card, compressed, 4k30
                -> RTSP stream 1080p?

                Right now that would require coding. We're working on a streamlined example coding package to do the same. We will report back here in a few days as we are working on this right now.

                1 Reply Last reply Reply Quote 0
                • E
                  Eric Katzfey ModalAI Team @Pavel Ardashov
                  last edited by 23 Feb 2022, 22:31

                  @Pavel-Ardashov Unfortunately, the current voxl-camera-server application has a couple of bugs that prevent it from streaming 720p out to a pipe for voxl-streamer while simultaneously taking 4k30 video, encoding it with h265, and writing into a file on the SD card. I made the code changes on a branch that will fix this here: https://gitlab.com/voxl-public/modal-pipe-architecture/voxl-camera-server/-/tree/streaming-plus-capturing-hires. You can build this code and load it on to your Voxl. In addition you will need to change a couple configuration file entries. In /etc/modalai/voxl-camera-server.conf you can change the hires camera configuration to match this:

                          "port_J2":      {
                                  "name": "hires",
                                  "enabled":      true,
                                  "type": "hires",
                                  "api":  "hal3",
                                  "frame_rate":   30,
                                  "override_id":  -1,
                                  "auto_exposure_mode":   "isp",
                                  "preview":      {
                                          "enabled":      true,
                                          "width":        1280,
                                          "height":       720,
                                          "format":       "nv21"
                                  },
                                  "video":        {
                                          "enabled":      true,
                                          "width":        3840,
                                          "height":       2160,
                                          "format":       "h265"
                                  },
                                  "snapshot":     {
                                          "enabled":      false,
                                          "width":        1024,
                                          "height":       768,
                                          "format":       "jpg"
                                  }
                          },
                  

                  And change /etc/modalai/voxl-streamer.conf like this:

                      "hires": {
                          "input": {
                              "interface": "mpa",
                              "mpa-camera": "hires" },
                          "output": {
                              "stream": {
                                  "rotation": 0,
                                  "width": 1280,
                                  "height": 720,
                                  "decimator": 2,
                                  "bitrate": 5000000 } }
                      },
                  
                  

                  If you do all of this you will get a 720p RTSP stream at 15fps and 5 Mbps for viewing on QGroundControl and also a file capture of 4k30 video encoded with h265. You can pull the capture file off of Voxl and view it with VLC.

                  C 1 Reply Last reply 15 Mar 2022, 15:01 Reply Quote 1
                  • C
                    czarsimon @Eric Katzfey
                    last edited by czarsimon 15 Mar 2022, 15:06 15 Mar 2022, 15:01

                    Hi @Eric-Katzfey I tried this branch on my VOXL and while it seems to work I'm seeing a lot dropped frames and skipping in the recorded video, is this another known bug or is there a reason for this? Thanks

                    Edit: this doesn't seem to happen when recording at 1080p

                    E 1 Reply Last reply 15 Mar 2022, 16:21 Reply Quote 0
                    • E
                      Eric Katzfey ModalAI Team @czarsimon
                      last edited by 15 Mar 2022, 16:21

                      @czarsimon Yes, it is a known bug and I am actively working on fixing this. 1080p and VGA seem to perform the best right now but 4k and 720p have problems. Hope to have a fix soon.

                      1 Reply Last reply Reply Quote 0
                      • K
                        Kris @Eric Katzfey
                        last edited by 8 Apr 2022, 01:51

                        @Eric-Katzfey Could you please point me in the right direction for recording video to the VOXL SD card when using a UVC Linux based camera? You had mentioned using ffmpeg, but I cannot find anything else on the forums regarding this.

                        E 1 Reply Last reply 8 Apr 2022, 15:06 Reply Quote 0
                        • E
                          Eric Katzfey ModalAI Team @Kris
                          last edited by 8 Apr 2022, 15:06

                          @Kris Unfortunately, we don't currently offer a solution for capturing video streams to SD card from a UVC camera. If you wanted to create your own solution you could likely start with some of our open source code and modify it. What UVC camera are you using?

                          K 1 Reply Last reply 11 Apr 2022, 00:11 Reply Quote 0
                          • K
                            Kris @Eric Katzfey
                            last edited by 11 Apr 2022, 00:11

                            @Eric-Katzfey Thank you for your response. I will try to create my own solution for this. In the possible case that the WiFi signal is lost during an indoor flight, I feel it is important to record RAW video to the SD card. The UVC camera is a Sony STARVIS IMX462. Any help or support with this would be very much appreciated.

                            E 1 Reply Last reply 11 Apr 2022, 14:40 Reply Quote 0
                            • E
                              Eric Katzfey ModalAI Team @Kris
                              last edited by 11 Apr 2022, 14:40

                              @Kris You can start with our voxl-uvc-server application. The code is here: https://gitlab.com/voxl-public/voxl-sdk/services/voxl-uvc-server. If you run it with the -s option it will print out some information about any connected UVC cameras. There is also a utility called show-video-device-info.sh that will also show some useful information. You may find that the camera can output encoded h264 video directly. Then you could simply start the camera and write the frames to a file.

                              1 Reply Last reply Reply Quote 0
                              • E
                                Eric Katzfey ModalAI Team
                                last edited by 26 Apr 2022, 20:07

                                There is a new forum post here: https://forum.modalai.com/topic/889/how-to-stream-hires-camera-at-vga-resolution-and-simultaneously-capture-4k30-to-a-file that explains how to get beta access to a new package with the capability to stream from the hires camera at VGA resolution while simultaneously capturing HD 4k30 to a file.

                                1 Reply Last reply Reply Quote 1
                                • First post
                                  Last post
                                Powered by NodeBB | Contributors