Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
Collapse
Brand Logo

ModalAI Forum

  1. ModalAI Support Forum
  2. Ask your questions right here!
  3. Recording camera frames to file using MPA

Recording camera frames to file using MPA

Scheduled Pinned Locked Moved Ask your questions right here!
13 Posts 5 Posters 2.3k Views 2 Watching
  • 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 Offline
    C Offline
    czarsimon
    Regular
    wrote on last edited by
    #1

    Hi, is there any existing or planned support for recording camera frames to a file using the MPA like there was using voxl-rtsp?

    Eric KatzfeyE 1 Reply Last reply
    0
    • C czarsimon

      Hi, is there any existing or planned support for recording camera frames to a file using the MPA like there was using voxl-rtsp?

      Eric KatzfeyE Offline
      Eric KatzfeyE Offline
      Eric Katzfey
      ModalAI Team
      wrote on last edited by
      #2

      @czarsimon Are you interested in recording the raw frames coming from the sensor (voxl-camera-server) or the compressed h264 stream coming from voxl-streamer?

      C 1 Reply Last reply
      0
      • Eric KatzfeyE Eric Katzfey

        @czarsimon Are you interested in recording the raw frames coming from the sensor (voxl-camera-server) or the compressed h264 stream coming from voxl-streamer?

        C Offline
        C Offline
        czarsimon
        Regular
        wrote on last edited by
        #3

        @Eric-Katzfey Ideally I would like to be able to record 4K video while streaming at a lower resolution to save on bandwidth. To answer your question I suppose it would be the h264 stream. Does either app have the ability to export video to a file? I wasn't able to find any references to it in the documentation or looking through the source. Thanks

        Eric KatzfeyE 1 Reply Last reply
        0
        • C czarsimon

          @Eric-Katzfey Ideally I would like to be able to record 4K video while streaming at a lower resolution to save on bandwidth. To answer your question I suppose it would be the h264 stream. Does either app have the ability to export video to a file? I wasn't able to find any references to it in the documentation or looking through the source. Thanks

          Eric KatzfeyE Offline
          Eric KatzfeyE Offline
          Eric Katzfey
          ModalAI Team
          wrote on last edited by
          #4

          @czarsimon Unfortunately, voxl-streamer does not currently support that, and we don't have a date when it will be added. You are more than welcome to add the feature to voxl-streamer. It shouldn't be too hard. You just "tee" the stream at some point and send to a "filesink" element.

          Pavel ArdashovP C 2 Replies Last reply
          0
          • Eric KatzfeyE Eric Katzfey

            @czarsimon Unfortunately, voxl-streamer does not currently support that, and we don't have a date when it will be added. You are more than welcome to add the feature to voxl-streamer. It shouldn't be too hard. You just "tee" the stream at some point and send to a "filesink" element.

            Pavel ArdashovP Offline
            Pavel ArdashovP Offline
            Pavel Ardashov
            Contributor
            wrote on last edited by
            #5

            @Eric-Katzfey please tell me how to recording the raw frames coming from the sensor (voxl-camera-server) to a SD card?

            1 Reply Last reply
            0
            • Cliff WongC Offline
              Cliff WongC Offline
              Cliff Wong
              ModalAI Team
              wrote on last edited by
              #6

              Raw frames can be had onboard using voxl-logger. For example,

              voxl-logger --cam stereo --samples 60
              

              will record 60 frames in png format from the stereo camera. The frames are currently stored on /data/voxl-logger/log<XXXX>/run. You'll need to move them to the sdcard.

              C Pavel ArdashovP 2 Replies Last reply
              0
              • Cliff WongC Cliff Wong

                Raw frames can be had onboard using voxl-logger. For example,

                voxl-logger --cam stereo --samples 60
                

                will record 60 frames in png format from the stereo camera. The frames are currently stored on /data/voxl-logger/log<XXXX>/run. You'll need to move them to the sdcard.

                C Offline
                C Offline
                czarsimon
                Regular
                wrote on last edited by
                #7

                @Cliff-Wong Thanks Cliff this is great, is the source for this app available? I can't find it on Gitlab.

                1 Reply Last reply
                0
                • ? Offline
                  ? Offline
                  A Former User
                  wrote on last edited by
                  #8

                  The source lives here in the mpa-tools repo

                  C 1 Reply Last reply
                  0
                  • ? A Former User

                    The source lives here in the mpa-tools repo

                    C Offline
                    C Offline
                    czarsimon
                    Regular
                    wrote on last edited by
                    #9

                    @Alex-Gardner Sweet, thanks!

                    1 Reply Last reply
                    0
                    • Cliff WongC Cliff Wong

                      Raw frames can be had onboard using voxl-logger. For example,

                      voxl-logger --cam stereo --samples 60
                      

                      will record 60 frames in png format from the stereo camera. The frames are currently stored on /data/voxl-logger/log<XXXX>/run. You'll need to move them to the sdcard.

                      Pavel ArdashovP Offline
                      Pavel ArdashovP Offline
                      Pavel Ardashov
                      Contributor
                      wrote on last edited by
                      #10

                      @Cliff-Wong Thanks! Happened.
                      Please tell me how to record video to SD?

                      1 Reply Last reply
                      0
                      • Eric KatzfeyE Eric Katzfey

                        @czarsimon Unfortunately, voxl-streamer does not currently support that, and we don't have a date when it will be added. You are more than welcome to add the feature to voxl-streamer. It shouldn't be too hard. You just "tee" the stream at some point and send to a "filesink" element.

                        C Offline
                        C Offline
                        czarsimon
                        Regular
                        wrote on last edited by
                        #11

                        Hi @Eric-Katzfey, I've been revisiting this lately and modified the voxl-streamer app like you suggested with a tee to a filesink. I am however seeing a strange behavior where the video file is very short and missing most of the frames. Any idea why that might be? My modified pipeline follows the image overlay element and is this:

                        gst_element_link_many(last_element,
                                                            context->encoder_queue,
                                                            context->omx_encoder,
                                                            context->filesink_tee,
                                                            NULL);
                        gst_element_link_many(context->filesink_tee,
                                                            context->rtp_filter,
                                                            context->rtp_queue,
                                                            context->rtp_payload,
                                                            NULL);
                        gst_element_link_many(context->filesink_tee,
                                                            context->h264_parser_queue,
                                                            context->h264_parser,
                                                            context->filesink_queue,
                                                            context->filesink,
                                                            NULL);
                        
                        1 Reply Last reply
                        0
                        • C Offline
                          C Offline
                          czarsimon
                          Regular
                          wrote on last edited by
                          #12

                          I've been trying to build a simple command line pipeline to test the filesink:

                          gst-launch-1.0 videotestsrc num-buffers=100 ! video/x-raw,width=640,height=480,framerate=30/1 ! omxh264enc ! mp4mux ! filesink location=test_file.mp4
                          

                          But it doesn't seem to be want to play nice with omx:

                          ERROR:/opt/workspace/build/apq8096-le-1-0-1_ap_standard_oem.git/apps_proc/poky/build/tmp-glibc/work/armv7a-vfp-neon-oemllib32-linux-gnueabi/lib32-gstreamer1.0-omx/1.10.4-r0/gst-omx-1.10.4/omx/gstomxh264enc.c:532:gst_omx_h264_enc_get_caps: code should not be reached
                          

                          It works just fine on my laptop if I replace omxh264enc with x264enc. Does this mean that the problem is not with gstreamer but with the omx plugin?

                          Eric KatzfeyE 1 Reply Last reply
                          0
                          • C czarsimon

                            I've been trying to build a simple command line pipeline to test the filesink:

                            gst-launch-1.0 videotestsrc num-buffers=100 ! video/x-raw,width=640,height=480,framerate=30/1 ! omxh264enc ! mp4mux ! filesink location=test_file.mp4
                            

                            But it doesn't seem to be want to play nice with omx:

                            ERROR:/opt/workspace/build/apq8096-le-1-0-1_ap_standard_oem.git/apps_proc/poky/build/tmp-glibc/work/armv7a-vfp-neon-oemllib32-linux-gnueabi/lib32-gstreamer1.0-omx/1.10.4-r0/gst-omx-1.10.4/omx/gstomxh264enc.c:532:gst_omx_h264_enc_get_caps: code should not be reached
                            

                            It works just fine on my laptop if I replace omxh264enc with x264enc. Does this mean that the problem is not with gstreamer but with the omx plugin?

                            Eric KatzfeyE Offline
                            Eric KatzfeyE Offline
                            Eric Katzfey
                            ModalAI Team
                            wrote on last edited by
                            #13

                            @czarsimon omx has a very limited set of input formats. I would add format NV12 (or NV21) to your caps filter in between videotestsrc and omx.

                            1 Reply Last reply
                            0

                            Hello! It looks like you're interested in this conversation, but you don't have an account yet.

                            Getting fed up of having to scroll through the same posts each visit? When you register for an account, you'll always come back to exactly where you were before, and choose to be notified of new replies (either via email, or push notification). You'll also be able to save bookmarks and upvote posts to show your appreciation to other community members.

                            With your input, this post could be even better 💗

                            Register Login
                            Reply
                            • Reply as topic
                            Log in to reply
                            • Oldest to Newest
                            • Newest to Oldest
                            • Most Votes


                            ModalAI
                            Categories Recent Tags ModalAI.com Docs
                            © 2026 ModalAI® · Accelerating autonomy for smaller, smarter, safer drones · Powered by NodeBB
                            • Login

                            • Don't have an account? Register

                            • Login or register to search.
                            • First post
                              Last post
                            0
                            • Categories
                            • Recent
                            • Tags
                            • Popular
                            • Users
                            • Groups