Post by Sathwik Hejamady Bhat
Java Backend Developer | Spring Boot | System Architecture | API Engineering
Have you heard of the famous YouTube Infinite Storage Glitch? For those who don't know, back in 2023, a Rust developer named DvorakDwarf built a project that could convert any file into a video and upload it to YouTube. The idea sounds ridiculous at first. Why would anyone store files in a video? But then you realise that YouTube lets users upload an absurd amount of video content, with no practical limit on how many videos you can upload. So in theory, you could store practically unlimited amounts of data on YouTube. The difficult part was that YouTube aggressively recompresses every uploaded video. So if you naively store data as pixel values, something like (255, 17, 89) might become (254, 18, 88) after processing. The changes are invisible to the eye, but that makes it impossible to decode, since the video is now corrupted. Unfortunately, the original repository is now private, so I thought it would be fun to try building my own version and see if it works. Presenting to you, 𝗕𝗶𝘁𝗽𝗹𝗮𝗻𝗲. Bitplane converts files into lossless video streams and can reconstruct the original file from those streams. Unlike the original project, I couldn't build a clean implementation that survives the YouTube compression. However, it should still work on platforms that preserve the original video data. The backend is Spring Boot, the frontend is Thymeleaf, and it is currently hosted on Google Cloud. I also integrated Microsoft Clarity for analytics and used DuckDNS for the subdomain. You can try it out here: https://lnkd.in/gyMiFeUS Source code: https://lnkd.in/g5SY6cYM It took me a few months to design an architecture that actually works well. Let me give you a quick overview of how it works. If you'd like to learn more, feel free to check out the ARCHITECTURE.md file in the GitHub repository. A 1920×1080 grayscale frame contains 20,73,600 pixels, and each pixel stores exactly 1 byte. The file gets split across as many frames as needed, with a metadata frame at the front that records the file name, size, and frame count. FFmpeg then stitches everything together into a lossless MP4. Decoding simply runs the entire process in reverse to recover the original file. Building it turned out to be a lot more interesting than I expected. There was file chunking to handle large uploads, a custom binary protocol to keep frames ordered and decodable, and isolated workspaces so multiple users could run the system simultaneously without interfering with each other. Automatic cleanup was also needed to prevent temporary files from piling up on the server. Getting all of this to work together cleanly took more effort than I expected. Would love to hear your thoughts or ideas on this. #Java #SpringBoot #BackendDevelopment #SoftwareEngineering #SystemDesign #FFmpeg #CloudComputing #GoogleCloud #OpenSource #GitHub #FileEncoding #VideoEncoding #TechProject #Developer #YouTube #InfiniteStorageGlitch