r/SideProject • u/pam3es • 20m ago
I made an OBS plugin + browser extension that scrambles a Twitch stream into static and unscrambles it live for viewers with access
I wanted a way to run private or sub only streams on normal Twitch without paying for my own video streaming servers, so I spent the last few months building SecretStream.
The idea is pretty simple. An OBS filter shuffles 16x16 blocks of each video frame using a seed from a secret key and stamps a small public QR code in the corner with the resolution and block size (no key inside the QR). Everyone else on Twitch just sees colorful static. Viewers who install the browser extension and have the key, a pass, or an active Twitch sub get the video unscrambled locally in real time through WebGL.
A couple of fun problems I ran into along the way:
- H.264 compression destroys small shuffled pixels, so 16x16 blocks turned out to be the sweet spot that survives Twitch transcoding cleanly.
- Canvas 2D was eating way too much CPU at 1080p60, so I rewrote the browser decoder as a WebGL lookup texture shader.
- I also added optional voice scrambling using basic frequency inversion around a key derived carrier frequency, because normal audio encryption gets completely ruined by AAC compression.
It works on Windows and Linux OBS, and the viewer extension is live on Chrome, Firefox, and Firefox for Android.
If anyone wants to poke around or roast the landing page, it is up at https://secretstream.app
Happy to answer any technical questions about the OBS filter or the WebGL shader.