Papais CCTV
A website displaying public CCTV in Purwakarta with RTSP to M3U8 conversion.
Tech Stack :

Papais CCTV is a modern, lightweight web-based platform developed to help the people of Purwakarta monitor public CCTV feeds in real time. Rebuilt from the ground up using SvelteKit, this version eliminates the need for a database by relying on static JSON files that are easily customizable without being bundled in the SvelteKit build process. It offers both high performance and maintainability.
Developed in a Node.js environment with TypeScript, the interface is styled using TailwindCSS for a clean and responsive user experience. To address the security and compatibility limitations of directly serving RTSP streams—which often contain embedded usernames and passwords and are poorly supported in browsers—I implemented an RTSP-to-M3U8 conversion pipeline using FFmpeg. This approach ensures that streams are safe to serve and can be played reliably across modern browsers using well-supported JavaScript libraries.
The system also performs periodic health checks on each RTSP endpoint. If a camera is unreachable, its status is automatically updated in the JSON file to reflect its offline state. The served M3U8 files are secured to prevent unauthorized access and abuse, especially for individuals attempting to extract and monetize the resources without consent.
Previously, Papais CCTV was built using CodeIgniter 3 and MySQL, which proved to be inefficient for managing largely static data. The earlier version also lacked containerization and relied on manual Bash scripts and TMUX sessions to keep stream conversions running in the background. These processes were prone to disconnection issues and required manual restarts. In the latest version, all scripts are wrapped within Docker containers, including the web service itself, and are equipped with auto-restart mechanisms for better reliability and maintainability.
For video playback, the older system used a heavy JavaScript library that was difficult to customize. The new implementation uses a minimal and focused library designed solely for playing M3U8 files. I built custom UI controls including play, pause, picture-in-picture, and cinema mode for a more controlled and optimized playback experience.
Additionally, Gagas Sangga Pratama has unofficially developed a mobile version of Papais CCTV, which has received positive feedback from the community for its ease of use and accessibility.
If you're interested in creating a secure and scalable public video monitoring platform or need help modernizing an existing system, feel free to get in touch through the contact page.