I have an application in C++, and I record 640x480 jpg images to an SD-card on the PI3B+. This works, but sometimes I get some frame skips. The pts timestamps shows a diff of 1800 ms sometimes, so there is a gap there. Now when I record to a tmpfs instead of an sd-card, then I never have those gaps. Is there some sort of correlation between the camera bandwidth and SD-card writes? How could I detect where the framedrop happens, and why?