RE:SCENE

A second look at the story.

Built for the ClickHouse track of Agentic Cinema: The Blockbuster Hackathon.

Inspiration

A major plot revelation can change how we understand everything that came before it. A remark that seemed incidental may suggest a character’s motive, while an apparently inconsistent action may begin to make sense. For movie fans who want to explore those connections after watching, the difficulty is often finding the relevant scenes again: remembering roughly what happened is not the same as knowing where to look or which details matter. We built RE:SCENE to make that process easier. A plot summary can explain an ending, but tracing that ending back to specific moments in the film is a separate task. We wanted viewers to be able to follow a revelation back through the story and revisit the scenes that support a different understanding of what came before.

What it does

RE:SCENE lets movie fans select a major plot revelation—a “Reveal”—and revisit earlier scenes that read differently in light of it. Each connection includes where the scene appears in the film, what the scene initially seems to suggest, how it can be understood after the Reveal, and what details support that interpretation.

Gemini serves two distinct purposes in RE:SCENE.

First, it analyzes films in advance using source material, including audio and sampled frames. The preprocessing workflow gathers timestamped observations from the film and uses them to generate interpretations that connect earlier scenes to later Reveals. These results are stored in ClickHouse and retrieved through the official ClickHouse MCP server when viewers explore the film. Selecting a Reveal opens previously generated analysis; it does not trigger a new Gemini call or reanalyze the film.

Second, a separate background workflow uses Gemini to analyze comments and replies for potential spoilers. It classifies discussion text as non-spoiling, spoiler-containing, or uncertain, helping identify disclosures such as identity reveals, deaths, twists, and plot outcomes. These classifications support spoiler protection alongside viewing-progress settings and author-provided spoiler labels. In the submitted demo, paid screening calls are disabled, so new contributions remain unverified rather than being treated as spoiler-free.

The analysis goes beyond foreshadowing to cover character motivations, scenes whose meaning changes after a Reveal, and events that initially appear inconsistent. Film discovery, editorial articles, reviews, and comments provide space for broader discussion, while spoiler warnings help viewers control how much they uncover.

How we built it

The frontend uses React, TypeScript, and Vite, with Figma designs guiding the visual structure. A Python FastAPI backend provides film information, Reveal analysis, reviews, and comments.

The film-preprocessing workflow calls Google Gemini through the Google Gen AI SDK. For audio-and-frame analysis, it first gathers observations from selected portions of a film, then uses those observations to generate interpretations connecting earlier events to later Reveals. Source references, timestamps, and generation records make it possible to inspect how each analysis was produced.

For the ClickHouse track, scene, Reveal, and narrative-analysis data are stored in a self-hosted ClickHouse deployment. The hosted backend queries this data through the official ClickHouse MCP server, mcp-clickhouse, and serves the resulting analysis to the interface.

Comment and reply screening runs separately from film preprocessing. When enabled, a background worker sends contribution text and relevant film context to Gemini for spoiler classification. The application records the result for the corresponding version of the comment and uses it as part of its visibility controls. An uncertain result or a failed check is not treated as confirmation that the text is spoiler-free.

Both Gemini workflows include controls over paid API usage. In the submitted demo, paid calls remain disabled, and previously generated film analysis is served without requiring additional inference during browsing.

Shared reviews and comments are maintained separately from browser-specific viewing progress, allowing discussion to remain shared while each browser keeps its own progress settings.

Challenges we ran into

The central challenge was deciding how much context a viewer needs to understand a connection. Simply placing an earlier scene beside a Reveal leaves too much unexplained, so we organized the analysis around what the scene initially suggests, what changes after the Reveal, and which details support that change. The explanation also needs to leave room for disagreement rather than present one interpretation as the only possible reading.

Film analysis introduced a separate challenge: establishing reliable evidence. Audio and sampled frames do not capture every visual detail, and an observation does not automatically amount to a convincing interpretation. We therefore needed to preserve source references and uncertainty so that the resulting explanations could be inspected and refined.

Spoiler handling affected both the analysis and the discussion features. An explanation may reveal something the viewer has not yet reached, while a comment or reply can disclose a major plot detail outside the analysis page. We therefore designed viewing-progress controls, author-provided labels, and Gemini screening to serve distinct roles. Missing or uncertain screening results could not simply be assumed to be safe.

We also separated film preprocessing from browsing to manage analysis time and cost. Once a film has been analyzed, viewers should be able to explore those results without waiting for the same work to run again.

Finally, replacing design samples with real content exposed layout issues. Longer explanations and varying text lengths required adjustments to keep the analysis readable and easy to follow on screen.

Accomplishments that we're proud of

We brought Reveal-to-scene analysis into a working platform alongside film discovery, editorial content, reviews, and comments. Viewers can revisit moments in films such as The Bat Whispers, compare before-and-after readings, and examine the explanations and evidence behind those connections.

We completed real Gemini film-analysis runs and connected the stored results to the hosted experience through ClickHouse MCP. This gives the project a concrete workflow from film material to generated analysis to an interface that viewers can explore.

We also implemented a separate Gemini screening workflow for comments and replies, including uncertainty handling and controls over paid API usage. This allows spoiler protection to extend beyond the analysis itself to the places where viewers discuss the story.

What we learned

We learned to distinguish between identifying a possible connection and making a convincing case for it. An earlier scene may seem relevant once the ending is known, but the explanation still needs to show which details support that relationship.

We also learned the importance of separating AI workloads according to their purpose. Film analysis can be performed in advance and reused, while spoiler screening is designed to evaluate individual contributions as they arrive when the workflow is enabled. Neither requires the film to be reanalyzed every time someone opens a page.

Working with real content also changed how we evaluated the interface. A feature could function correctly while its explanation remained difficult to follow, so functional testing and reviewing the reading experience became complementary parts of development.

What's next for RE:SCENE

Our next priorities are to refine mobile usability, expand the collection of carefully reviewed analyses, and improve the precision of scene-level evidence. We also want to evaluate spoiler screening across a wider range of comments and replies, especially in cases where the surrounding context is incomplete or ambiguous.

Further improvements will make it easier to compare different interpretations of the same moment and identify explanations that may need revision. These steps support the experience that motivated RE:SCENE: returning to a familiar scene and finding a reason to look at it more closely.

Built With

Share this project:

Updates

Submission history