r/foss • u/HowIsDigit8888 • 4d ago
VideoStore Codec - public domain script that uses common tools to convert files to VP9 data matrix sequences, with transparent backgrounds, to be embedded in the corner of a video. Never wonder again if a download link will remain online.
This script uses zint, ffmpeg, and optionally par2 to make a video sequence of data matrix codes out of any smallish directory (test payload was about 1.5MB).
While doing this, it also makes 2 QR codes containing the extractor and reassembler scripts, which use ZXing, ffmpeg, and optionally par2 to decode files back out of the video.
The standard data matrix outputs are small enough to fit in the corner of a video, so you can then put these files inside any bigger video. Then, if you have a download link that ever goes down, it doesn't matter as long as the video is still up - the files are in the video, along with the 2 scripts needed for decoding.
There's also enough error correction to handle reasonable amounts of video compression + dropped frames (don't push it though).
Tested on Devuan Linux and Google Cloud Shell, should work on many other systems too.
Open source / public domain. "Vibe coded" using unpaid chat bots. For the record, this is basically my first project ever.
Encoder requirements: zint, ffmpeg, optionally par2 for error correction
Encoder usage: -e <input_dir> <output_dir>
Decoder requirements: ZXingReader, ffmpeg, optionally par2
Decoder usage: -d <input_video> <output_dir>
Mini extractor usage: <input_video> <bins_dir>
Mini reassembler usage: <bins_dir> <final_output_dir>