Inspiration

Films are often edited, censored, age-restricted, or even denied release because standards around intimacy, violence, language, and cultural sensitivity vary across audiences and regions.

Creating these alternate cuts is still largely manual and can require significant editing effort.
That inspired SafeCut - an agentic AI system that understands sensitive moments and creates audience- and market-appropriate alternatives while preserving the original story, emotion, and continuity.

Instead of simply asking "What should we remove?", SafeCut asks:
"What could happen here instead, without breaking the story?"


What it does

SafeCut is an agentic AI video adaptation platform that detects sensitive moments and generates audience-appropriate alternatives while preserving the original story, emotion, and continuity.

  • Market-Aware Policy Research - Uses Parallel Search API to research current, source-backed content guidelines for the selected market, release type, and audience.
  • Multimodal Content Detection - Analyzes video and dialogue to detect intimacy, violence, language, and other sensitive content based on the selected audience and researched market requirements.
  • Precise Moment Localization - Identifies the exact sensitive moment so only the necessary footage is changed.
  • Narrative-Aware Adaptation - Understands the scene, characters, actions, and surrounding context before deciding what should happen instead.
  • AI Video Replacement - Uses Veo 3.1 on Vertex AI to generate story-appropriate replacement footage instead of simply cutting, blurring, or removing the scene.
  • Generation Validation & Retry - Evaluates generated footage and automatically retries with different visual conditioning strategies when a result is unsuitable.
  • Interactive Timeline - Maps detections and adaptations onto a visual timeline where users can inspect, adjust, regenerate, and review individual moments.
  • Original vs SafeCut - Lets users instantly compare the original footage with the AI-adapted version.
  • Selective Regeneration - Users can revisit a completed detection and generate a new replacement without processing the entire video again.
  • Persistent Projects - Google Sign-In allows users to save and reopen SafeCut projects, while Guest Mode supports temporary projects without an account.
  • Final SafeCut Render - Reconstructs the timeline with approved AI replacements and produces a downloadable, audience-appropriate version of the original video.

How we built it

SafeCut combines agentic AI, multimodal reasoning, live web research, generative video, deterministic media processing, and serverless cloud infrastructure.

Tech Stack

Layer Technology How SafeCut Uses It
Frontend Next.js 16, React, TypeScript Production-grade web interface, video player, project dashboard, comparison view, and interactive adaptation timeline.
UI Tailwind CSS, Lucide React Minimal responsive interface and timeline controls.
Backend FastAPI, Python REST APIs, authentication, media workflows, pipeline orchestration, and asynchronous processing.
Agent Framework Google Gen AI SDK Powers SafeCut's specialized AI agents and structured multimodal workflows.
Multimodal AI Gemini on Vertex AI Understands video, dialogue, audience requirements, sensitive content, and narrative context.
Web Research Parallel Search API Researches current market-specific content guidelines and provides source-backed context for SafeCut's adaptation policies.
Generative Video Veo 3.1 on Vertex AI Generates alternative footage for sensitive intervals while attempting to preserve scene continuity.
Media Processing FFmpeg Interval cutting, audio processing, generated-clip insertion, trimming, and final video assembly.
Transactional Database Google Cloud Firestore Stores users, projects, videos, jobs, detections, adaptation plans, generation state, researched policies, and persistent timeline data.
Object Storage Google Cloud Storage Privately stores source videos, extracted assets, generated clips, intermediate media, and final SafeCut renders.
Authentication Google Sign-In Provides authenticated user sessions and persistent project ownership, with optional guest sessions.
Serverless Compute Google Cloud Run Hosts the containerized FastAPI backend and Next.js application with automatic scaling.
Deployment Docker, Google Cloud Build Builds and deploys reproducible production containers to Google Cloud.
Real-Time Updates SSE + Pipeline Events Streams job, agent, detection, generation, validation, and rendering progress to the frontend.
Secure Media Access GCS Signed URLs + IAM Provides temporary authenticated playback and download access without exposing private media publicly.

How Gen AI & Agents are Used

SafeCut uses an agentic architecture built with Google's Gen AI SDK, combined with Parallel Search for live market research. Specialized agents handle research, understanding, planning, generation, and validation.

AI Agents

Agent Role
Policy Research Agent Uses Parallel Search API to research current market, audience, and release-specific content requirements from relevant web sources.
Video Understanding Agent Uses Gemini to understand the video, identify sensitive moments, locate them precisely, and reason about their narrative context.
Adaptation Planner Agent Understands the detection, researched audience requirements, and surrounding story to decide how the moment should be adapted.
Storyboard Agent Converts the adaptation plan into a sequence of visual and motion states for generation.
Generation Agent Selects visual references and conditioning strategies and generates replacement footage with Veo 3.1.
Validation Agent Evaluates the generated result and triggers another generation attempt when the output is unsuitable.

AI Models & Responsibilities

Technology Used For
Google Gen AI SDK Agent execution, structured model interactions, multimodal reasoning, and orchestration
Gemini on Vertex AI Video understanding, content detection, precise localization, narrative reasoning, and adaptation context
Parallel Search API Live web research for current market and audience-specific content guidelines with source-backed results
Veo 3.1 on Vertex AI Generating story-appropriate replacement footage
Structured Outputs Converting AI reasoning into policies, detections, timestamps, adaptation plans, storyboards, and generation specifications
FFmpeg Deterministic trimming, media processing, generated-clip insertion, and final video reconstruction

Architecture

Alt text

How the Agents Work Together

A single model call cannot reliably handle the entire process of researching market requirements, understanding a video, finding sensitive content, deciding what should replace it, generating that replacement, and validating the result.

SafeCut therefore breaks the problem into specialized agents with structured outputs. This makes SafeCut's AI pipeline source-backed, retryable, controllable, and human-reviewable instead of treating video adaptation as a single black-box generation request.

  • Research - The Policy Research Agent uses Parallel Search to find current audience- and market-specific content guidance and converts it into a structured SafeCut policy.
  • Understand & Detect - The Video Understanding Agent analyzes the video using the selected audience and researched policy to identify and precisely locate sensitive moments.
  • Plan - The Adaptation Planner Agent reasons about the characters, scene, audience, emotional intent, market requirements, and surrounding narrative to determine what should happen instead.
  • Storyboard - The Storyboard Agent converts that decision into structured visual states describing how the replacement should progress over time.
  • Generate - The Generation Agent selects clean visual references and conditioning strategies before sending the generation request to Veo 3.1.
  • Validate - The Validation Agent checks the generated result. Failed generations can automatically return to the generation stage with a different strategy.
  • Review - The final decision remains with the user. SafeCut exposes the result on the interactive timeline where it can be compared, regenerated, adjusted, or approved.

Live Market Research with Parallel

SafeCut uses the Parallel Search API at runtime to research current content requirements for different audiences, regions, and release types.

When a user selects a target such as:

India · Family · Theatrical

SafeCut's Policy Research Agent searches the web for relevant current guidance and converts the results into a structured policy that can be used during video analysis.

How We Use Parallel

Use Case How SafeCut Uses It
Market Research Searches current content and certification guidance for the selected region
Audience Requirements Researches relevant restrictions around intimacy, violence, language, and other sensitive content
Source-Backed Policies Connects SafeCut's adaptation rules to the web sources used to create them
Market-Specific Analysis Passes the researched policy into Gemini so detections are evaluated against the selected release profile
Policy Refresh Allows users to research the latest requirements again when creating or updating a release version

Research Flow

Market + Audience + Release Type → Parallel Search API → Policy Research Agent → Structured SafeCut Policy → Gemini Video Understanding → Adaptation Pipeline

This allows SafeCut to go beyond generic content filtering and create adaptations based on current, market-specific context.


Challenges we ran into

  • Precise Sensitive-Moment Detection - Identifying only the exact part of a scene that requires adaptation is critical to avoid unnecessarily changing surrounding footage.
  • Maintaining Visual Continuity - Generated replacements needed to preserve characters, clothing, lighting, environment, camera composition, and motion.
  • Generation Duration Constraints - Veo's supported generation lengths don't always match the detected interval, so we generate and precisely trim the replacement footage.
  • Reliable AI Generation - Generations can fail or produce unsuitable results, so we added validation, retries, and different visual-conditioning strategies.
  • Long-Running AI Pipelines - Detection, generation, and rendering take time, requiring persistent jobs and live pipeline updates.
  • Secure Media Playback - Source and generated videos are privately stored in GCS, requiring secure authenticated playback and downloads.
  • State Synchronization - Keeping the player, timeline, detections, pipeline activity, and final render synchronized required careful state management.

Accomplishments that we're proud of

  • End-to-End Adaptation - SafeCut goes beyond detection with a complete pipeline: Research → Understand → Detect → Plan → Generate → Validate → Review → Render.
  • Market-Aware Adaptation - Parallel Search allows SafeCut to research current audience- and market-specific requirements before analyzing a video.
  • Precise Moment Detection - SafeCut identifies the specific moments that require adaptation, minimizing unnecessary changes.
  • Generative Adaptation - Instead of simply cutting, blurring, or blacking out scenes, SafeCut generates story-appropriate replacements designed to preserve continuity.
  • Human + AI Workflow - Users can inspect detections, compare footage, regenerate adaptations, and make the final decision.
  • Selective Regeneration - Individual detected moments can be modified and regenerated without processing the entire video again.
  • Cloud-Native System - Firestore, Cloud Storage, Cloud Run, authentication, and persistent projects make SafeCut a complete web application rather than just an AI prototype.

What we learned

  • Detection and adaptation are different problems - Detecting what happened is easier than deciding what should happen instead while preserving the story.
  • External context matters - Audience and market requirements can vary, so grounding adaptation policies in current web research makes the system more useful across different releases.
  • Agentic decomposition works well for video - Specialized agents for research, understanding, planning, generation, and validation produce a more controllable pipeline than a single model call.
  • Humans should remain in control - AI can handle expensive analysis, research, and generation while editors review and control important creative decisions.

What's next for SafeCut

  • Stronger Visual Continuity - Improve character identity, clothing, lighting, camera motion, and scene consistency in generated footage.
  • Automated Quality Evaluation - Detect generation artifacts, continuity errors, temporal glitches, and narrative inconsistencies before human review.
  • Multilingual Dialogue Adaptation - Rewrite and dub sensitive dialogue while preserving tone, timing, and context.

Built With

Share this project:

Updates

Submission history