Download https://github.com/Links2004/arduinoWebSockets as zip file and add this library to your Arduino Libraries by Sketch/Include Library/Add Zip...
Android application: https://play.google.com/store/apps/details?id=com.p4f.esp32camai
I configured my board as Tools/Board/ESP32 Wrover Module, and define CAMERA_MODEL_AI_THINKER for the pin definition. Because there are some different kind of ESP32-CAM modules, so please check your board and your pin definition respectively.
I clarified my module was trying to run the ESP32 example CameraWebserver first, then keep the setting for my other projects, but it maybe different from yours.
The part contains my code is released under BSD 2-Clause License. Regarding other libraries used in this project, please follow the respective Licenses.