Skip to content

AI Dual Camera

A "two camera" scenario in OpenIPC FPV: a day camera (OpenIPC) and a thermal camera (via a Raspberry Pi) run on the same drone, and the pilot switches between them in flight. Both streams are merged into a single WFB transmitter through socat, and onboard object detection is overlaid on the day camera — the YOLOv8n model running on the SigmaStar hardware IPU accelerator.

📦 Installation files

All required binaries, configs and scripts are bundled in a single archive.

Download the "AI Dual Camera" archive

Extract the archive and run the commands below from the folder where you extracted the files.

Advanced users only

This guide is highly technical and modifies system files on both the camera and the ground station. It is intended for experienced users and developers. Everything you do is at your own risk.


How it works

  • Two cameras, one WFB link, in-flight switching via the socat utility.
  • The day camera (OpenIPC) sends its stream to port 5500.
  • The thermal camera (via Raspberry Pi, H.264) sends its stream to port 5600.
  • Depending on the switch, socat takes the stream from 5500 or 5600 and forwards it to a local Unix RTP socket → WFB → transmission to the ground station.
  • Instead of Majestic, the venc streamer runs with object detection (implemented by Milos): it runs per frame, before encoding, using the YOLOv8n (352px) model on the IPU driver (mi_ipu.ko).
Two-camera data flowThe day camera and thermal camera send streams to socat, which switches between them and transmits over WFB to the VRX.Day cameraOpenIPC · venc + YOLOv8nThermal cameraRaspberry Pi · H.264socatswitchWFBVRXRTP :5500Ethernet :5600Unix RTPRF
Data flow: two cameras → socat (switch) → WFB → VRX

Hardware (example build)

ComponentWhat was used
Day camera + VTXEMAX Wi-Fi Link (v1) + the Wi-Fi adapter from a RunCam Wi-Fi Link (v1). Any OpenIPC camera on SigmaStar works
Thermal cameraUSB thermal module → Raspberry Pi Zero 2W ("3B mini") with an SPI-Ethernet adapter; SD card with a URLLC AIO (OR) image
Wired linkEthernet between the Raspberry Pi and the OpenIPC camera (via the SPI adapter)
Flight controllerBetaflight (12/2025) + GPS for position hold
Ground station (VRX)the new EMAX VRX (or RunCam VRX / Eachine VRX / old EMAX VRX)

What you'll need

  • PuTTY — the plink and pscp tools in PATH (the commands below are for Windows). On Mac/Linux use the ssh / scp equivalents.
  • The "AI Dual Camera" archive with the binaries, configs and scripts.
  • An OpenIPC camera on SigmaStar (SSC338Q) with SSH access (root / 12345).

Step 0. Preparation

  1. Extract the archive, open CMD and navigate to the folder with the extracted files.
  2. Connect the camera to your laptop directly with an Ethernet cable (not through a router).
  3. Set the laptop's Ethernet adapter IP to 192.168.1.11 (mask 255.255.255.0). The camera has address 192.168.1.10.
  4. (If needed) reset the camera to its original state with firstboot in its console. Do not interrupt the process.

Step 1. Install files onto the camera (VTX)

Run the commands one by one from the folder with the extracted archive:

bash
plink -ssh [email protected] -pw 12345 killall majestic "&&" rm /usr/bin/majestic "&&" mkdir /config "&&" mkdir /config/dla "&&" mkdir /root/models/
pscp -scp -pw 12345 mi_ipu.ko [email protected]:/lib/modules/4.9.84/sigmastar/
pscp -scp -pw 12345 ipu_firmware.bin [email protected]:/config/dla/
pscp -scp -pw 12345 yolov8n352drone.img [email protected]:/root/models/
pscp -scp -pw 12345 libipu_yolo_worker.so [email protected]:/root/
pscp -scp -pw 12345 venc socat mavlink-routerd channels.sh [email protected]:/usr/bin
pscp -scp -pw 12345 venc.json txprofiles.conf [email protected]:/etc
plink -ssh [email protected] -pw 12345 dos2unix /etc/venc.json "&&" dos2unix /etc/txprofiles.conf "&&" dos2unix /usr/bin/channels.sh "&&" chmod +x /usr/bin/channels.sh "&&" chmod +x /usr/bin/venc "&&" chmod +x /usr/bin/socat "&&" chmod +x /usr/bin/mavlink-routerd
pscp -scp -pw 12345 libmi_vif.so libmi_isp.so libcus3a.so libispalgo.so libmi_vpe.so libmi_sensor.so libmi_venc.so libmi_ipu.so libcam_fs_wrapper.so [email protected]:/usr/lib

Step 2. Edit files on the camera

Three files are edited manually. The archive itself contains ready-made wifibroadcast and S95majestic files you can use as a reference.

/usr/bin/wifibroadcast

In the start_telemetry function, under the mavfwd command, add the mavlink-routerd & line:

bash
if [ "$router" = "mavfwd" ]; then
                mavfwd -b 115200 -c 8 -p 100 -a 15 -t -m /dev/"$serial" \
                        -o 127.0.0.1:14552 -i 127.0.0.1:"$port_rx" > /dev/null &
                mavlink-routerd &

/etc/init.d/S95majestic

Make the beginning of the file look like this (the venc streamer + loading the IPU driver):

bash
#!/bin/sh

DAEMON="venc"
PIDFILE="/var/run/$DAEMON.pid"
DAEMON_ARGS="-s"

start() {
        echo -n "Starting $DAEMON: "
        insmod /lib/modules/4.9.84/sigmastar/mi_ipu.ko
        start-stop-daemon -b -m -S -q -p "$PIDFILE" -x "$DAEMON" -- $DAEMON_ARGS
        if [ $? -eq 0 ]; then
                echo "OK"
        else
                echo "FAIL"
        fi
}
ini
[General]
TcpServerPort = 0

[UdpEndpoint telemetry_tx]
Mode = Normal
Address = 127.0.0.1
Port = 14551

[UdpEndpoint telemetry_tx2]
Mode = Normal
Address = 192.168.1.50
Port = 14551

[UdpEndpoint telemetry_rx]
Mode = Server
Address = 127.0.0.1
Port = 14552

Step 3. Ground station menu (gsmenu)

In the GS menu, change three parameters:

  1. Router (the Telemetry submenu) → mavfwd
  2. txpower (the Alink submenu) → 3 or 4
  3. Mlink (the WFB-NG submenu) → 2000

Step 4. Thermal camera on the Raspberry Pi

  1. Flash the SD card with the URLLC AIO (OR) image and insert it into the Raspberry Pi Zero 2W.
  2. Connect the USB thermal camera to the Raspberry Pi.
  3. A wired Ethernet link (via the SPI adapter) connects the Raspberry Pi to the OpenIPC camera — the thermal stream (H.264) arrives on port 5600.

Since MAVLink is now in use, OSD can't be shown on the camera side — we display it on the VRX.

Enable the WiFi Hotspot in the VRX gsmenu and connect a computer to the OpenIPC GS network (password 12345678). Then, from CMD:

bash
plink -ssh [email protected] -pw 12345 killall pixelpilot
pscp -scp -pw 12345 pixelpilot gsmenu.sh [email protected]:/usr/bin/
pscp -scp -pw 12345 h264.png h265.png h264.svg h265.svg [email protected]:/usr/share/pixelpilot/
pscp -scp -pw 12345 osd.json [email protected]:/etc/pixelpilot/
plink -ssh [email protected] -pw 12345 dos2unix /etc/pixelpilot/osd.json "&&" dos2unix /usr/bin/gsmenu.sh "&&" chmod +x /usr/bin/pixelpilot "&&" chmod +x /usr/bin/gsmenu.sh "&&" reboot

INFO

The first three commands (killall pixelpilot and copying pixelpilot / gsmenu.sh / the icons) are not required if your SBC Buildroot is updated to a build from 11/07/2026 or newer.

Then SSH into the VRX SBC Buildroot (192.168.4.1, root / 12345) and in the new gsmenu change codec to auto, then reboot.


Result

  • The thermal switch → picture from the thermal camera.
  • The day switch → video from the EMAX/RunCam VTX with object detection overlaid.
  • On the VRX — MAVLink OSD with telemetry; PixelPilot auto-detects the codec (H.265 from OpenIPC or H.264 from the Raspberry Pi).

Limitations

  • This is switching between two cameras (one on air at a time), not two simultaneous streams.
  • The commands are for Windows (PuTTY: plink / pscp); on Mac/Linux use ssh / scp.
  • The streamer, scripts and images are third-party; always test everything on the ground first.

Greg's APFPV · OpenIPC Mario AIO · PixelPilot

Was this page helpful?