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. 4K Hires Camera crashes camera server

4K Hires Camera crashes camera server

Scheduled Pinned Locked Moved Ask your questions right here!
21 Posts 3 Posters 4.6k Views 1 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.
  • Alex KushleyevA Alex Kushleyev

    @riteshsharma,

    Are you using VOXL1 or VOXL2? it seems VOXL1 based on the terminal output.

    Which SDK do you have installed?

    I am going to assume this is VOXL1, it is possible that it does not have enough memory designated for camera pipeline for all the buffers.

    Are you able to change the number of NUM_RECORD_BUFFERS from 16 to 8 or 10? https://gitlab.com/voxl-public/voxl-sdk/services/voxl-camera-server/-/blob/master/src/hal3_camera_mgr.cpp?ref_type=heads#L86

    I believe we increased the number of buffers at some point and the 4K30 use was missed in testing on VOXL1.

    If you are able to experiment with number of buffers yourself, that would be great, maybe the easiest way to do this is to get the camera server repo on your VOXL1 and compile on target with modified number of buffers. If you cannot compile the camera server in any way, i can help you.

    Alex KushleyevA Online
    Alex KushleyevA Online
    Alex Kushleyev
    ModalAI Team
    wrote on last edited by
    #11

    also in your earlier posts, you showed more prints that print out the buffer info, such as:

        Count Min: 16
        Count Actual: 16
    etc
    

    This is the buffer information for the two cameras, you can see if less than 16 were allocated for the hires camera (camera 0)

    Also, i see you are using three ov7251 cameras, which also require some additional "special" memory and perhaps we missed testing that use case with 16 buffers, so reducing number of recording buffers should solve the issue (it looks like it is able to allocate 11 of them, but you can use 8 to be safe)

    R 1 Reply Last reply
    0
    • Alex KushleyevA Alex Kushleyev

      also in your earlier posts, you showed more prints that print out the buffer info, such as:

          Count Min: 16
          Count Actual: 16
      etc
      

      This is the buffer information for the two cameras, you can see if less than 16 were allocated for the hires camera (camera 0)

      Also, i see you are using three ov7251 cameras, which also require some additional "special" memory and perhaps we missed testing that use case with 16 buffers, so reducing number of recording buffers should solve the issue (it looks like it is able to allocate 11 of them, but you can use 8 to be safe)

      R Offline
      R Offline
      riteshsharma
      wrote on last edited by
      #12

      @Alex-Kushleyev Hi Alex, Thank you for your suggestion, I will try to change the buffers to 10. I have two stereo camera ("ov7251"), one tracking camera ("ov7251"), one flir boson camera ("uvc") and one Hires camera ("imx412"). I am trying to operate all cameras on VOXL1 together. I am not sure if 10 buffers will be enough.

      Alex KushleyevA 1 Reply Last reply
      0
      • R riteshsharma

        @Alex-Kushleyev Hi Alex, Thank you for your suggestion, I will try to change the buffers to 10. I have two stereo camera ("ov7251"), one tracking camera ("ov7251"), one flir boson camera ("uvc") and one Hires camera ("imx412"). I am trying to operate all cameras on VOXL1 together. I am not sure if 10 buffers will be enough.

        Alex KushleyevA Online
        Alex KushleyevA Online
        Alex Kushleyev
        ModalAI Team
        wrote on last edited by
        #13

        @riteshsharma , the number of buffers is per camera 🙂 so 16 is definitely an overkill

        R 1 Reply Last reply
        0
        • Alex KushleyevA Alex Kushleyev

          @riteshsharma , the number of buffers is per camera 🙂 so 16 is definitely an overkill

          R Offline
          R Offline
          riteshsharma
          wrote on last edited by riteshsharma
          #14

          @Alex-Kushleyev Hi Alex, I tried changing buffer to 8. It is still failing to initialize encoder for hires camera.

          =================================================================
          Starting Camera: tracking (id #1)
          Using gain limits min: 100 max: 6399
          Starting Camera: hires (id #0)
          Using gain limits min: 54 max: 8000
          pthread_setaffinity_np: Success
          WARNING: Port Def 0:
          Count Min: 11
          Count Actual: 11
          Size: 0xbfd000
          Buffers Contiguous: Yes
          Buffer Alignment: 0
          WARNING: Port Def 1:
          Count Min: 16
          Count Actual: 16
          Size: 0xbdd800
          Buffers Contiguous: No
          Buffer Alignment: 0
          WARNING: Encoder expecting(11) more buffers than module allocated(8)
          ERROR: OMX Set config failed!
          ERROR: Failed to initialize encoder for camera: hires
          ERROR: Failed to start camera: hires
          Starting Camera: stereo (id #2)
          Using gain limits min: 100 max: 6399

          with buffers set to 12, it is still failing to start:

          =================================================================
          Starting Camera: tracking (id #1)
          Using gain limits min: 100 max: 6399
          Starting Camera: hires (id #0)
          Using gain limits min: 54 max: 8000
          pthread_setaffinity_np: Success
          ERROR: Failed to get correct number of buffers from OMX module, expected: 12 got: 11
          ERROR: OMX SetPortParams of PortIndexIn failed!
          ERROR: OMX Set config failed!
          ERROR: Failed to initialize encoder for camera: hires
          ERROR: Failed to start camera: hires
          Starting Camera: stereo (id #2)
          Using gain limits min: 100 max: 6399

          ------ voxl-camera-server: Started 2 of 3 cameras

          ------ voxl-camera-server: Camera server is now running
          pthread_setaffinity_np: Success
          pthread_setaffinity_np: Success

          Alex KushleyevA 1 Reply Last reply
          0
          • R riteshsharma

            @Alex-Kushleyev Hi Alex, I tried changing buffer to 8. It is still failing to initialize encoder for hires camera.

            =================================================================
            Starting Camera: tracking (id #1)
            Using gain limits min: 100 max: 6399
            Starting Camera: hires (id #0)
            Using gain limits min: 54 max: 8000
            pthread_setaffinity_np: Success
            WARNING: Port Def 0:
            Count Min: 11
            Count Actual: 11
            Size: 0xbfd000
            Buffers Contiguous: Yes
            Buffer Alignment: 0
            WARNING: Port Def 1:
            Count Min: 16
            Count Actual: 16
            Size: 0xbdd800
            Buffers Contiguous: No
            Buffer Alignment: 0
            WARNING: Encoder expecting(11) more buffers than module allocated(8)
            ERROR: OMX Set config failed!
            ERROR: Failed to initialize encoder for camera: hires
            ERROR: Failed to start camera: hires
            Starting Camera: stereo (id #2)
            Using gain limits min: 100 max: 6399

            with buffers set to 12, it is still failing to start:

            =================================================================
            Starting Camera: tracking (id #1)
            Using gain limits min: 100 max: 6399
            Starting Camera: hires (id #0)
            Using gain limits min: 54 max: 8000
            pthread_setaffinity_np: Success
            ERROR: Failed to get correct number of buffers from OMX module, expected: 12 got: 11
            ERROR: OMX SetPortParams of PortIndexIn failed!
            ERROR: OMX Set config failed!
            ERROR: Failed to initialize encoder for camera: hires
            ERROR: Failed to start camera: hires
            Starting Camera: stereo (id #2)
            Using gain limits min: 100 max: 6399

            ------ voxl-camera-server: Started 2 of 3 cameras

            ------ voxl-camera-server: Camera server is now running
            pthread_setaffinity_np: Success
            pthread_setaffinity_np: Success

            Alex KushleyevA Online
            Alex KushleyevA Online
            Alex Kushleyev
            ModalAI Team
            wrote on last edited by
            #15

            @riteshsharma

            Can you try 11?

            Alex KushleyevA 1 Reply Last reply
            0
            • Alex KushleyevA Alex Kushleyev

              @riteshsharma

              Can you try 11?

              Alex KushleyevA Online
              Alex KushleyevA Online
              Alex Kushleyev
              ModalAI Team
              wrote on last edited by
              #16

              Also, just for the test, you could try to disable the other cameras and see if the system is able to allocate more buffers for hires camera (12?)

              I can test your setup sometime soon and provide better recommendations, I just dont have it in front of me right now.

              R 1 Reply Last reply
              0
              • Alex KushleyevA Alex Kushleyev

                Also, just for the test, you could try to disable the other cameras and see if the system is able to allocate more buffers for hires camera (12?)

                I can test your setup sometime soon and provide better recommendations, I just dont have it in front of me right now.

                R Offline
                R Offline
                riteshsharma
                wrote on last edited by
                #17

                @Alex-Kushleyev Hi Alex, buffer when set to 11 works. I am able to see all my cameras. But now I am not seeing hires_large_encoded and hires_small_encoded stream on my voxl-portal.

                Capture.PNG

                R 1 Reply Last reply
                0
                • R riteshsharma

                  @Alex-Kushleyev Hi Alex, buffer when set to 11 works. I am able to see all my cameras. But now I am not seeing hires_large_encoded and hires_small_encoded stream on my voxl-portal.

                  Capture.PNG

                  R Offline
                  R Offline
                  riteshsharma
                  wrote on last edited by riteshsharma
                  #18

                  @Alex-Kushleyev I have one more question about the length of the cable for connecting Hires (imx412) 4k Camera. I tried using more than one extension and it does not work. Do you have any suggestion for longer wire or extension.

                  IMG_4914 (1).jpg

                  Alex KushleyevA 1 Reply Last reply
                  0
                  • R riteshsharma

                    @Alex-Kushleyev I have one more question about the length of the cable for connecting Hires (imx412) 4k Camera. I tried using more than one extension and it does not work. Do you have any suggestion for longer wire or extension.

                    IMG_4914 (1).jpg

                    Alex KushleyevA Online
                    Alex KushleyevA Online
                    Alex Kushleyev
                    ModalAI Team
                    wrote on last edited by
                    #19

                    @riteshsharma , good progress.. i dont think voxl-portal is able to display h264 stream.

                    If you use “voxl-inspect-cam -a” , it should show stream stats. Also you can view the h264 stream using voxl-streamer, at least that is what we do on voxl2.

                    Regarding chaining the extension flex cables, our tests also showed that only one extension works for imx412 due to high data rate. Other cameras may be able to go longer. We dont have a longer solution for imx412

                    R 1 Reply Last reply
                    0
                    • Alex KushleyevA Alex Kushleyev

                      @riteshsharma , good progress.. i dont think voxl-portal is able to display h264 stream.

                      If you use “voxl-inspect-cam -a” , it should show stream stats. Also you can view the h264 stream using voxl-streamer, at least that is what we do on voxl2.

                      Regarding chaining the extension flex cables, our tests also showed that only one extension works for imx412 due to high data rate. Other cameras may be able to go longer. We dont have a longer solution for imx412

                      R Offline
                      R Offline
                      riteshsharma
                      wrote on last edited by
                      #20

                      @Alex-Kushleyev Thanks Alex. You have been great help.

                      Alex KushleyevA 1 Reply Last reply
                      0
                      • R riteshsharma

                        @Alex-Kushleyev Thanks Alex. You have been great help.

                        Alex KushleyevA Online
                        Alex KushleyevA Online
                        Alex Kushleyev
                        ModalAI Team
                        wrote on last edited by
                        #21

                        @riteshsharma you are welcome. If the current approach initializes and works fine (is able to allocate all the buffers), the performance should be stable. I am a bit surprised so many buffers are needed for the encoder, there is probably some other settings in our software to change that... However since it is actually working with 11 buffers, maybe there is no need for me to test / fix that. If you do encounter any other issues, let me know..

                        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