xTool S1 Internal Camera – Watch the Laser Work from Your Desk

The xTool S1 is a versatile and reliable workhorse. The lack of a built-in internal camera is largely offset by excellent manual framing, which in practice is often more precise than many camera-based systems.

What was still missing was the ability to watch the machine work from the inside — the same way most modern 3D printers let you monitor a print. Being able to check progress from my desk and capture dramatic footage of the laser beam hitting the material is extremely useful for both everyday use and content creation.

This guide shows how to add a clean, reliable internal camera for roughly $80–100 using a Raspberry Pi Zero 2 W and an Arducam 16 MP camera.


Hardware

Space inside the S1 is very limited, so everything has to be compact:

  • Raspberry Pi Zero 2 W
  • Arducam 16 MP IMX519 camera (with autofocus)
  • 22-to-15 pin CSI ribbon cable adapter (required for the Zero 2 W)
  • Small 3D-printed mount (clip + camera plate)
  • Power supply for the Pi (USB-C or micro-USB depending on your Zero board)

Both the Pi Zero 2 W and the Arducam camera are small enough to fit without interfering with the gantry travel.


Camera Location

Access to the rear of the machine is essentially impossible with normal hands. The only practical locations are the front-left or front-right sections of the Y-axis frame rails.

I mounted the camera on the right side. The laser module body sits on the right side of the laser head, so a left-side camera would frequently be blocked by the laser itself. The right-side position keeps a clear view of the entire processing area.


Mount

The 3D-printed mount is deliberately simple:

  • A clip that snaps onto the Y-axis rail
  • A vertical plate for the Raspberry Pi Zero (held with double-sided tape)
  • A lower plate that holds the camera as low as possible, aimed toward the centre of the bed

The part prints flat in about 18 minutes on a Bambu Lab H2D. I used PLA — temperatures inside the S1 stay low enough that this is perfectly safe.

Important installation notes

  • Power the machine completely off before installing anything.
  • Route the CSI ribbon and power cable carefully so they cannot snag the gantry or laser head.
  • Use strain relief on the cables.

Software Setup – Raspberry Pi Zero 2 W

1. Basic OS & Camera Driver

  1. Flash the latest Raspberry Pi OS using Raspberry Pi Imager (version 2.0 or newer — version 1.8 had problems setting Wi-Fi and SSH).
  2. Enable SSH and configure Wi-Fi during imaging if desired.
  3. Connect the IMX519 camera to the Pi Zero 2 W CSI port using the 22-to-15 pin adapter ribbon.
  4. Boot the Pi and install the official Arducam IMX519 driver following their guide:
    https://docs.arducam.com/Raspberry-Pi-Camera/Native-camera/16MP-IMX519/
  5. Edit the boot configuration:
sudo nano /boot/firmware/config.txt

Add or change these lines:

camera_auto_detect=0
dtoverlay=imx519

Save and reboot.

2. Install required packages

sudo apt update
sudo apt install -y ffmpeg

3. Install MediaMTX

MediaMTX is a modern, lightweight RTSP / WebRTC server that is far more reliable than trying to make ffmpeg act as a server by itself.

cd /tmp
# Check the latest release on https://github.com/bluenviron/mediamtx/releases
# Example for arm64 (Pi Zero 2 W 64-bit OS):
wget https://github.com/bluenviron/mediamtx/releases/latest/download/mediamtx_linux_arm64.tar.gz
tar -xzf mediamtx_linux_arm64.tar.gz
sudo mv mediamtx /usr/local/bin/
sudo chmod +x /usr/local/bin/mediamtx

(If you are on a 32-bit OS, download the linux_armv7 version instead.)

4. Create a minimal MediaMTX configuration

sudo nano /etc/mediamtx.yml

Paste this minimal working config:

# Minimal MediaMTX config for xTool S1 camera
logLevel: info
# RTSP
rtsp: yes
rtspAddress: :8554
paths:
live:
source: publisher

Save and exit.

5. Create systemd services

MediaMTX service

sudo nano /etc/systemd/system/mediamtx.service
[Unit]
Description=MediaMTX RTSP / WebRTC Server
After=network-online.target
Wants=network-online.target
[Service]
Type=simple
User=root
ExecStart=/usr/local/bin/mediamtx /etc/mediamtx.yml
Restart=always
RestartSec=3
[Install]
WantedBy=multi-user.target

Camera streaming service (pushes the camera into MediaMTX)

sudo nano /etc/systemd/system/camstream.service
[Unit]
Description=xTool S1 Internal Camera Stream (libcamera → MediaMTX)
After=network-online.target mediamtx.service
Wants=network-online.target
Requires=mediamtx.service
[Service]
Type=simple
User=root
ExecStart=/bin/bash -c '/usr/bin/libcamera-vid --width 1920 --height 1080 --framerate 30 --bitrate 8000000 --inline -t 0 -o - | /usr/bin/ffmpeg -hide_banner -loglevel error -i - -c:v copy -f rtsp rtsp://127.0.0.1:8554/live'
Restart=always
RestartSec=5
[Install]
WantedBy=multi-user.target

6. Enable and start the services

sudo systemctl daemon-reload
sudo systemctl enable mediamtx.service camstream.service
sudo systemctl start mediamtx.service camstream.service

Useful management commands

# Check status
sudo systemctl status mediamtx.service
sudo systemctl status camstream.service
# Stop / restart
sudo systemctl stop camstream.service
sudo systemctl restart camstream.service
# Live logs
sudo journalctl -u camstream.service -f
sudo journalctl -u mediamtx.service -f

Viewing the Stream

After a reboot it usually takes 1–2 minutes for the stream to become available.

In OBS, VLC, or any RTSP-capable software, open this network source:

rtsp://YOUR_PI_IP:8554/live

You will get a clear view of the entire bed and a dramatic shot of the laser beam. There is some latency (normal for this type of stream). This is not a problem when recording for content or monitoring from your desk.

Tip: Give the Raspberry Pi a static IP address (or a DHCP reservation on your router) so the stream address never changes.


Results

For about $80–100 you get a reliable internal camera that is perfect for:

  • Remote monitoring from your desk
  • Capturing high-quality video of the laser in action for YouTube / social content
  • Showing friends the process when you make them a gift

The low camera position captures the full processing area very well and makes the laser look spectacular — very “Star Wars”.

Limitation of the current position

The current low angle does not show the finished engraving or cut as clearly as a top-down view would.

Version 2 idea

Mount the camera higher on the frame (next to the Pi) for a more overhead perspective. This may occasionally be partially blocked by the laser body, but it should give a better view of the actual result on the material.


Summary of files created

FilePurpose
/etc/mediamtx.ymlMediaMTX configuration
/etc/systemd/system/mediamtx.serviceAuto-start MediaMTX
/etc/systemd/system/camstream.serviceAuto-start camera → RTSP pipeline

Once both services are enabled, the stream starts automatically every time the Pi boots.


Comments

Leave a Reply