ContentGuard AI — Devpost Submission


Inspiration

Every movie you've ever watched carries an age rating — G, PG, R, or in India, U/A or A. But have you ever stopped to think about how that decision actually gets made?

Today, certifying a film is a slow, expensive, and deeply human process. A board of reviewers watches every minute of footage, logs every act of violence, every expletive, every intimate scene, and then debates context before issuing a verdict. In India, the CBFC can take weeks. In the US, the MPAA charges thousands of dollars per submission. For independent filmmakers and streaming platforms releasing content globally, navigating four or five different regulatory bodies simultaneously is an operational nightmare.

We built ContentGuard AI because we believed this entire workflow could be automated — not to replace human judgment, but to augment it. The same way spell-check didn't replace editors, an AI content classifier shouldn't replace certification boards. It should do the heavy lifting so humans can focus on the edge cases that actually need a human decision.

The deeper inspiration came from the problem of global distribution. A film rated PG-13 in the US might be an 'A' (Adults Only) in India, a 15 in the UK, and FSK-16 in Germany. Currently, studios re-submit and re-pay for each jurisdiction. We wanted a single intelligent system that could give you all four ratings at once, and tell you exactly which scenes are causing the problem.


What It Does

ContentGuard AI is an automated movie content certification and rating platform powered by multi-modal AI analysis.

Upload a video or paste a script. The system immediately begins a three-layer analysis:

Visual Analysis — The AI watches the video frame by frame, detecting visual triggers: weapons, gore, sexual content, drug use, and dangerous acts. Each detection is timestamped precisely.

Audio Analysis — An audio spectrogram is extracted and analyzed for tone, intensity, and speech content. Profanity, aggressive dialogue, and disturbing audio signatures are flagged.

Contextual Understanding — Unlike simple keyword filters, the AI understands context. A character discussing violence in a history lesson is treated differently from a character committing it.

Once analysis completes, the dashboard populates with:

  • A Temporal Safety Timeline — a visual heatmap showing moment-by-moment content intensity across the full runtime
  • A Detected Triggers Panel — a timestamped list of every flagged moment (e.g., "01:22:15 — Violence: Physical assault depicted")
  • A Multi-Region Rating — simultaneous compliance verdicts for US (MPAA), India (CBFC), UK (BBFC), and Germany (FSK)
  • A Director's Cuts List — specific time-ranges the AI recommends removing to achieve a lower target rating
  • A Certification Report — a legally-formatted document stating the final rating with full justification

Additional features include a Benchmark Tool (compare your content's "DNA" against previously rated films like The Dark Knight or Spider-Man), a Review Room (manual human override of individual trigger decisions), a What-If Simulator (drag a slider to see how reducing content intensity changes the predicted rating), and a Project Archive (history of all past certification sessions).


How We Built It

The stack is a fully client-side React + TypeScript application built with Vite, styled with Tailwind CSS v4, and deployed on Vercel.

AI Core — Google Gemini 1.5 Flash The intelligence layer is powered by the @google/genai SDK. We chose Gemini 1.5 Flash for its multimodal capability — it accepts both image frames and audio data in a single prompt, which is essential for our parallel analysis pipeline.

Video Frame Extraction — Smart Shot Boundary Detection Rather than sending every frame (which would be token-prohibitive), we implemented a Smart SBD (Shot Boundary Detection) algorithm in utils/videoProcessing.ts. It samples frames at strategic intervals and detects scene cuts using pixel-difference heuristics, sending only keyframes to the AI. This reduces API costs by roughly 80% compared to naive uniform sampling.

Audio Pipeline The utils/audioUtils.ts module extracts audio from the uploaded video using the Web Audio API, converts it to a spectrogram representation, and passes it alongside the visual frames to Gemini.

Multi-Region Compliance Engine We built a regional rating calculator that maps detected trigger severity (High / Medium / Low) to the correct rating scale for each jurisdiction. Each region (US, IN, UK, DE, JP) has its own ordered rating ladder, and the compliance gap meter shows exactly how far a film is from its target certification.

Component Architecture The app is split into focused components: Timeline (recharts-based intensity graph), TriggerList, CutsList, CertificationReport, ComplianceDashboard, ReviewRoom, BenchmarkView, GlobalDatabaseView, and SettingsPanel — each consuming the central AnalysisResult type from types.ts.


Challenges We Ran Into

Token limits vs. video length. A feature film is thousands of frames. Sending all of them to any LLM API is impossible within token budgets and latency constraints. Building the Shot Boundary Detection system to intelligently sample only semantically meaningful frames was the hardest engineering problem on the project. We iterated through five different sampling strategies before settling on the hybrid SBD approach.

Audio extraction in the browser. The Web Audio API was not designed for the kind of batch spectrogram extraction we needed. There are significant security sandboxing restrictions on reading audio buffers from user-uploaded video files without server-side processing. We worked around this with OfflineAudioContext rendering, but browser inconsistencies — especially on Safari — made this unreliable.

Multi-region rating logic. The five certification systems (MPAA, CBFC, BBFC, FSK, Eirin) don't map cleanly onto each other. A "Medium severity" violence flag means PG-13 in the US but UA-13+ in India and 12A in the UK. Building a consistent severity-to-rating translation layer that respected each system's actual guidelines — not just a rough approximation — required deep research into each board's published criteria.

Context-aware detection. Early versions of our Gemini prompts were flagging documentary war footage at the same severity as gratuitous action sequences. We spent significant time engineering the system prompt to convey contextual nuance — distinguishing depictions of violence from glorification of it, the way a real certification board would.

Prompt engineering for structured output. Getting Gemini to return clean, consistently structured JSON (with timestamps, severity ratings, and cut recommendations) across a wide range of video types required careful prompt design and robust fallback parsing.


Accomplishments That We're Proud Of

We're genuinely proud that the full multi-modal pipeline works end to end — upload a video, get a timestamped trigger list, a multi-jurisdiction rating, and a formatted certification report, all within the browser, all powered by a single AI model call.

The Temporal Safety Timeline is something we're particularly happy with. Seeing the content intensity graph light up in real time as the AI processes a film, with trigger markers appearing at exact timestamps, feels like a real professional tool — not a demo.

Building five regional rating systems simultaneously, with correct compliance gap calculation for each, is technically novel. We're not aware of another open-source tool that does this.

The Director's Cuts feature — where the AI not only flags problems but recommends exactly which time ranges to remove to hit a lower target rating — is a genuinely useful capability for independent filmmakers trying to move a film from 'A' to 'UA' to access wider audiences.

And building a full cinematic UI aesthetic — the film-grain overlay, clapperboard animations, gold-and-noir palette — while keeping the UX functional and professional is something the whole team is proud of.


What We Learned

We learned that multimodal AI is genuinely powerful but prompt-sensitive in ways that aren't obvious until you're in production. The difference between a good and bad Gemini prompt for content analysis isn't a few words — it's the entire framing of what "harmful" means contextually, and that framing takes serious iteration.

We learned that browser-based video processing has hard ceilings. Audio extraction, real-time frame analysis, and video editing without a backend are all possible in theory, but each runs into browser security constraints, memory limits, or API restrictions that a server-side pipeline would handle trivially. Our next version needs a proper backend.

We learned about regulatory diversity in content classification. Before this project, we assumed the five major certification systems were roughly equivalent translations of each other. They're not — the BBFC weighs imitable dangerous behaviour very heavily, the CBFC has different standards for sexual vs. violent content than the MPAA, and the FSK system has explicit age-banding logic that doesn't map to any other system's categories.

And we learned that good UX is part of the product. The cinematic design language we adopted — making the tool feel like a film studio dashboard rather than a generic SaaS app — made demo feedback dramatically more positive than early utilitarian versions.


What's Next for ContentGuard AI

Backend infrastructure. The most important next step is moving the AI pipeline server-side. A Node.js / Python backend would remove browser constraints on audio processing, enable real video editing (actual frame removal rather than UI-only simulation), and allow us to handle feature-length films instead of being limited by browser memory.

Real video sanitization. Right now, "Sanitize for Region" is a UI toggle — it hides triggers in the interface but doesn't actually cut the video. We want to integrate FFmpeg server-side to produce a genuinely edited output file with flagged segments removed or blurred.

CBFC India deep integration. Given our strong Indian market focus, we want to add a dedicated CBFC workflow — including the specific categories India's Central Board of Film Certification evaluates (social values, national security, religious sentiments) alongside standard content triggers.

Real-time streaming analysis. Instead of batch processing after upload, we want to stream the video to the AI and display triggers as they're detected, creating a live "screening room" experience.

API for studios. Package the analysis engine as a REST API that film studios and streaming platforms can integrate into their post-production pipelines. A single endpoint: send video, receive multi-region compliance report.

Expanding the benchmark database. Currently the benchmark feature pulls live data from Gemini for individual films. We want to build a curated, structured database of thousands of rated films with their content DNA, enabling statistical comparison ("your film's violence level is in the 73rd percentile of R-rated action films from the last decade").

Human-in-the-loop review workflow. Build out the Review Room into a full collaborative tool where multiple reviewers can annotate, dispute, and vote on individual trigger classifications — creating an auditable, transparent certification record.

Built With

Share this project:

Updates