Open jackforrester03 opened 9 months ago
Hi @jackforrester03 Try timing your host side loop. I think that your MacBook is unable to write frames that fast.
Hi just did a quick test to check the loop times and I'm not sure that is the problem.
The first images shows a plot of sequence number vs timestamp (normalised to the timestamp of the first frame). The green dots showing the colour camera frames at 30fps and the orange dots show the left and right cams frames at 90FPS with both mono cameras set with setIsp3aFps(15). This shows the issue, as the orange dots stop after ~4.3s
The second plot shows the loop timestamp (again normalised to the loop start time) vs loop duration time. The worst case being 0.0056s which is faster than 0.0111 (90fps) so this doesn't seem long loop times are the issue.
Couple of additional things to notice is that after 4.3s the average loop time is reduced, this seems consistent with no frames being received by the host. Also, the CPU usage starts at around 45% for the first few seconds and then reduces to 17% usage, this seems to show that no frames are being received by the ISP after a few seconds (probably after ~4.3s).
Finally, this issue does not happen with the mono cams set to 60FPS, this only seems to occur at higher FPS.
Thanks for the suggestion.
We are also experiencing the same issue with setIsp3aFps().
@jackforrester03, have you found any resolution?
Hi @pgmurphy @jackforrester03 ,
Unfortunately, we found out the setIsp3aFps
isn't as stable as we initially thought. So we will likely deprecate/ignore it until we can make it stable. We apologize for the inconvenience.
I am currently trying to save encoded frames from all 3 cameras of an Oak D Lite, at 30 FPS@1080p and 90 FPS@400p for the colour and mono cameras respectively. I am using a python script very similar to the Encoding Max Limit example. After recording some videos, it was clear that frames were being dropped and not being received on the host (found by plotting sequence against timestamps). After a bit of investigation it was due to the CPU usage being >95%.
Using the guidance given in the docs I have looked to reduce the FPS of the 3A algorithms, using the 'setIsp3aFps' function. I have tried this on all 3 cameras individually and in various combinations and various FPS. Whilst this does reduce the CPU usage, this still results in some (however fewer) dropped frames but the camera in which the setIsp3aFps is set on, stops sending frames after a few seconds.
For example, I have set setIsp3aFps to 30FPS for both mono cameras (colour camera not set) and recorded for ~50s. The colour camera recorded as expected but the mono cameras only recorded for 3.8 and 3.9s for the left and right respectively, after which no frames were received.
Is there something I am doing wrong or is this a bug?
The full script I have used it below:
Using M1 MacBook Air and depthai-2.24.0.0.