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

Papais CCTV is a modern and lightweight web based platform created to help the people of Purwakarta monitor public CCTV feeds in real time. The system was rebuilt from scratch using SvelteKit, and this new version removes the need for a database by relying on static JSON files that can be customized easily without being bundled into the SvelteKit build. The result is a platform that offers high performance, straightforward maintenance, and a clean development workflow.
Developed in a Node.js environment with TypeScript, the interface is styled using TailwindCSS to create a clean, responsive, and accessible user experience. To overcome the security and compatibility issues that come with serving RTSP streams directly, especially since many cameras embed usernames and passwords and browsers do not support RTSP natively, I implemented an RTSP to M3U8 conversion pipeline using FFmpeg. This ensures that every stream is safe to deliver and can be played reliably across modern browsers using well supported JavaScript libraries.
The system performs periodic health checks on each RTSP endpoint. When a camera becomes unreachable, its status is automatically updated inside the JSON file to indicate that it is offline. The generated M3U8 files are also secured to prevent unauthorized access and to discourage individuals from copying or monetizing the feeds without permission.
Papais CCTV was previously built using CodeIgniter 3 and MySQL, which turned out to be inefficient for managing data that is largely static. The older version relied on manual Bash scripts and TMUX sessions to keep conversion processes running in the background, and these sessions were prone to disconnection issues that required manual intervention. In the latest version, every script is wrapped inside Docker containers, including the web service itself, and all containers are configured with auto restart mechanisms to improve reliability and long term maintainability.
For video playback, the older system used a heavy JavaScript library that was difficult to customize. The new implementation replaces it with a minimal player designed specifically for M3U8 playback. I built custom interface controls such as play, pause, picture in picture, and cinema mode to offer a smooth and focused viewing experience.
Gagas Sangga Pratama has also developed an unofficial mobile version of Papais CCTV, which has been positively received by the community due to its ease of use and accessibility.
If you are looking to build 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.
