Easy IP Camera for Lightburn

Thanks Dave!,

Good choice to go with the S3 variant - that will be much better with the OV5640, being faster, and with hopefully more PSRAM.

I’ve got the XIAO_ESP32S3, but it’s looks like there are a bunch of other options with integrated camera support:

// ===================
// Select camera model
// ===================
//#define CAMERA_MODEL_WROVER_KIT // Has PSRAM
//#define CAMERA_MODEL_ESP_EYE  // Has PSRAM
//#define CAMERA_MODEL_ESP32S3_EYE // Has PSRAM
//#define CAMERA_MODEL_M5STACK_PSRAM // Has PSRAM
//#define CAMERA_MODEL_M5STACK_V2_PSRAM // M5Camera version B Has PSRAM
//#define CAMERA_MODEL_M5STACK_WIDE // Has PSRAM
//#define CAMERA_MODEL_M5STACK_ESP32CAM // No PSRAM
//#define CAMERA_MODEL_M5STACK_UNITCAM // No PSRAM
//#define CAMERA_MODEL_M5STACK_CAMS3_UNIT  // Has PSRAM
//#define CAMERA_MODEL_AI_THINKER // Has PSRAM
//#define CAMERA_MODEL_TTGO_T_JOURNAL // No PSRAM
#define CAMERA_MODEL_XIAO_ESP32S3 // Has PSRAM
// ** Espressif Internal Boards **
//#define CAMERA_MODEL_ESP32_CAM_BOARD
//#define CAMERA_MODEL_ESP32S2_CAM_BOARD
//#define CAMERA_MODEL_ESP32S3_CAM_LCD
//#define CAMERA_MODEL_DFRobot_FireBeetle2_ESP32S3 // Has PSRAM
//#define CAMERA_MODEL_DFRobot_Romeo_ESP32S3 // Has PSRAM

In my experience, you shouldn’t need Splitcam or any virtual webcam driver to act as a PC-side client for an RTSP stream since you can instead stream MJPEG over HTTP, and LightBurn will accept that URL directly as you can see in this forum post.

The CameraWebServer example that ships with the Arduino ESP32 board package is a good starting point: File>Examples>ESP32>Camera>CameraWebServer

I did make a couple of changes to the sketch in the Wifi block just before startCameraServer():

I set a static IP so the camera URL in LightBurn never changes after a router reboot;

  // Fixed IP configuration
  IPAddress local_IP(192, 168, 1, 200); //setup your fixed IP here
  IPAddress gateway(192, 168, 1, 1);
  IPAddress subnet(255, 255, 255, 0);
  IPAddress primaryDNS(8, 8, 8, 8);

  if (!WiFi.config(local_IP, gateway, subnet, primaryDNS)) {
    Serial.println("Failed to configure static IP");
  }

  WiFi.begin(ssid, password);
  WiFi.setSleep(false);
  Serial.print("WiFi connecting");
  while (WiFi.status() != WL_CONNECTED) {
    delay(500);
    Serial.print(".");
  }
  Serial.println("");
  Serial.println("WiFi connected");

I also disabled WiFi sleep with ‘WiFi.setSleep(false)’, just so the connection stays super responsive (although I didn’t actually test this).

The sketch streams on port 81 at /stream by default, so based on the configuration above, your LightBurn Network URL would be http://192.168.1.200:81/stream