ESP32 CAM failed to get frame in time
Solution for if this occurs on a known working ESP-32-cam with PSRAM (i.e. example sketch with face recognition works ok).
If you're using anything other than PIX_FORMAT_JPEG, try reducing xclk_freq_hz.
In my case, it suddenly worked fine with PIX_FORMAT_RGB888, FRAMESIZE_VGA and xclk_freq_hz = 5000000 (4x lower).
( @Vraj P, this might not apply directly to what you found your problem was, but this post gets seen by many searching for this problem. Thanks!).