gitwtfhub

wtf is lossy?

willhs/lossy — explained in plain English

Analysis updated 2026-05-18

4PythonAudience · researcherComplexity · 4/5LicenseSetup · hard

TL;DR

A tool that compresses a movie into under 1MB of text shot descriptions, then rebuilds a new version of the film using AI video, audio, and speech generation.

Mindmap

mindmap
  root((lossy film codec))
    Encode
      Shot detection
      Keyframe extraction
      AI scene description
    Decode
      AI video generation
      AI audio generation
      Text to speech dialogue
    Compare
      Browser side by side tool
    Tech stack
      Python pipeline
      RunPod GPU hosting
      Gemini vision
    Audience
      Researchers
      AI video experimenters

Code map

Detail Auto

An interactive map of this repo's files and how they connect — its source is parsed live in your browser. Click Visualize to build it.

filefunction / class

Why would anyone build with this?

REASON 1

Encode a feature film into a compact text description of its scenes.

REASON 2

Regenerate a reconstructed version of a film from those text descriptions using AI video models.

REASON 3

Compare original and AI-reconstructed footage side by side in a browser tool.

REASON 4

Experiment with different AI video and audio backends to trade off cost, speed, and quality.

What's in the stack?

PythonFFmpegGeminiRunPodElevenLabs

How it stacks up

willhs/lossy1038lab/agnes-ai3eyedtiger/video2vrcemote
Stars444
LanguagePythonPythonPython
Setup difficultyhardeasyeasy
Complexity4/52/51/5
Audienceresearchervibe codervibe coder

Figures from each repo's GitHub metadata at analysis time.

How do you spin it up?

Difficulty · hard Time to first run · 1h+

Needs a rented GPU (RunPod) or paid API keys for video, audio, and vision models before the pipeline produces output.

MIT license: use, copy, modify, and distribute freely, including for commercial purposes, as long as the copyright notice is kept.

Wtf does this do

This project takes a whole movie and compresses it into a small text file, then uses AI video and audio generation to rebuild a new version of the film from that text. It calls itself a lossy codec, meaning the rebuilt film is not an exact copy, it is a reconstruction based on written descriptions of what happens in each shot. The process works in stages. First the film is split into roughly two thousand shots using scene detection tools, and keyframes are pulled from each one. Next, an AI vision model looks at sampled frames and writes a detailed description of each shot, including things like camera movement and sound. Those descriptions, plus some audio classification, get bundled into a single JSON file that ends up under one megabyte once compressed. That tiny file is effectively the whole film boiled down to text. To turn the text back into video, the project sends each shot's description to an AI video generation model, which can be run on a rented cloud GPU or through a paid API service, and several different backend options are supported with different costs and speed tradeoffs. Sound effects and music are generated separately by other AI audio models, and any spoken dialogue is recreated using text to speech based on the film's original subtitles. Finally all the generated clips and audio are stitched back together into one output video, and a browser based tool lets you compare the original and reconstructed versions side by side. According to the author's write-up, reconstructing a full feature film this way costs around thirty dollars in rented GPU time plus about a dollar for the description step. The project is written in Python, needs FFmpeg and the uv tool to install its dependencies, and requires API keys for the AI services it depends on. It is released under the MIT license.

Yoink these prompts

Prompt 1
Explain how the shot detection and description pipeline in this project works, step by step.
Prompt 2
Help me set up uv and the required API keys to run the full pipeline on a short video clip.
Prompt 3
Compare the cost and quality tradeoffs between the runpod-wan22 and fal-seedance strategies in this project.
Prompt 4
Walk me through using the compare tool to view my original video next to the reconstructed one.

Frequently asked questions

wtf is lossy?

A tool that compresses a movie into under 1MB of text shot descriptions, then rebuilds a new version of the film using AI video, audio, and speech generation.

What language is lossy written in?

Mainly Python. The stack also includes Python, FFmpeg, Gemini.

What license does lossy use?

MIT license: use, copy, modify, and distribute freely, including for commercial purposes, as long as the copyright notice is kept.

How hard is lossy to set up?

Setup difficulty is rated hard, with roughly 1h+ to a first successful run.

Who is lossy for?

Mainly researcher.

View the repo → Decode another repo

This repo across BitVibe Labs

Don't trust strangers blindly. Verify against the repo.