👀 Project TrackWatch

🏗️ System Architecture

TrackWatch utilizes a secure, modern data pipeline to transition video feeds from the physical edge to the web browser without compromising network security.

Stream Flow Diagram

architectural diagram

🔧 Component Breakdown

The video stream flows seamlessly through five primary architecture layers:

  • ESP32-CAM (Source): Serves as the hardware edge device. It captures raw video footage and hosts or pushes an RTSP/HTTP stream over the local Wi-Fi network.
  • MediaMTX (Local Server): Runs on a local Windows or Linux PC to act as the media server. It ingests the raw RTSP feed from the camera and transcodes it into web-friendly streaming formats like HLS (.m3u8) or WebRTC.
  • cloudflared Tunnel (Ingress): Operates locally alongside MediaMTX. It creates a secure, outbound-only connection to the Cloudflare network, completely eliminating the need for risky router port forwarding.
  • Cloudflare Edge (Routing): Receives the encrypted public traffic from the local tunnel. It handles routing, provisions SSL/TLS security, and exposes a secure public URL protected by Cloudflare’s CDN.
  • EasyWP Website (CMS): A managed WordPress site hosted on Namecheap. Using an embedded video player plugin or a custom HTML5 video tag, it points to the public Cloudflare URL to display the live feed.

👥 Targeted End Users

The EasyWP frontend provides a live stream interface optimized for our critical railway operations staff, including:

  • Rail Traffic Controllers (RTC)
  • Train Dispatchers
  • Rail Signallers

For more information about MediaMTX, have a look at MediaMTX | ready-to-use, open source, live media router.

For more information about CloudFlare, have a look at Cloudflare: Build for the agent era.