
Multimodal vision models are almost always prompted to produce flat, literal descriptions of what is on screen, while critical theory is traditionally applied to cinema by hand, long after the fact. I built philm to see what happens when you force those two registers together: a command-line tool and archive that hands video to a multimodal model and makes one schema-constrained call per analysis mode, pairing rigorous interpretive prompts with strict Pydantic validation (model_validate_json).
The core design conviction here is that encoding a theorist’s actual conceptual apparatus into a JSON schema that the model must satisfy at generation time makes theoretical readings structured, rigorous, and directly comparable across clips. Twenty-eight analysis modes are selectable by flag: four descriptive modes (captions, paragraph, key moments, table), twenty-one analytical lenses — spanning Levinas, Baudrillard, Foucault, Virilio, Žižek, Barthes, Benjamin, Rancière, Sontag, Haraway, Marks, Chion, Bazin, Eisenstein, Greenberg, and Ngai alongside affect, rhythm, gaze, hauntology, and a deadline-editor sizzle mode — and three numeric per-scene chart modes. In the Žižek schema, for instance, each moment requires a parallax enum, a Lacanian register, the ideology at work, and the gap between them; in the hauntology schema, temporal pathology and capitalist realism are explicit typed fields.
Model access runs through a provider registry with three adapters, selected by flag, so the workflow isn’t locked to a single vendor or cloud budget. The default uploads video to Gemini and polls until processing completes. An OpenRouter adapter compresses the video, optionally strips the audio track to save tokens, and dispatches to a hosted model. An Ollama adapter extracts a fixed number of frames via ffmpeg and sends them to a local model with the Pydantic schema attached. An optional local pre-pass also computes a numeric chaos index (1–10) from the footage’s cut density and scene-change scores, prepending it to the prompt so the model’s qualitative read of “chaotic” camera work is anchored to a measured signal.
Every reading lands in a local SQLite database — with dedicated tables for heavily schematized modes, a fallback table for the rest, and an FTS5 virtual table for full-text search across the entire corpus — alongside terminal and JSON output and a FastAPI web UI for timecode-synced reading. What started as an experiment in parameterized film theory quickly became the cataloguing backbone for The Feeling Index.