Show HN: I built a video codec out of Git
GitFlix started as a ridiculous question: could Git's internal object model and delta compression be abused to store and stream video? The answer, it turns out, is yes.
This tool encodes 1080p60 video into a Git repository where every frame is a commit and every pixel is a Git object. It then uses a custom player (Metal-accelerated on macOS) to stream it back at 60 fps.
The most surprising part was the compression. Storing the raw, uncompressed frames of a 600-frame clip takes about 3.5 GB. The resulting GitFlix repository is 633 MB—a 7:1 lossless compression ratio, purely from Git's handling of the data.
This is obviously not a practical replacement for H.264. It's an experiment in using a tool for a purpose it was never designed for.
The source is on GitHub. I'm happy to answer any questions about the implementation.
No comments yet