4K Hires Camera crashes camera server
-
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)
-
@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.
-
@riteshsharma , the number of buffers is per camera so 16 is definitely an overkill
-
@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: 6399with 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 -
Can you try 11?
-
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.
-
@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.
-
@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.
-
@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
-
@Alex-Kushleyev Thanks Alex. You have been great help.
-
@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..