← All case studies

AI-Powered Religious Content Video Generator

How we transformed the complete 1,500-page Sri Guru Granth Sahib into engaging social media videos using intelligent OCR and custom Python video generation.

Client Sacred Text Publishing
Industry Religious Content
Headline Result 100x Faster

Manual video creation would require months or years of work.

A religious content organization approached a2b with an ambitious mission: transform the complete 1,500-page Sri Guru Granth Sahib, a sacred Gurmukhi text into engaging social media videos for educational outreach to younger generations. Each sentence needed to be presented as both a verse video (original Gurmukhi text) and an explanation video (with meaning), creating thousands of unique animated videos.

The challenge was formidable. Manual video creation would require months or years of work. External video generation APIs like Veo or similar services would cost thousands of dollars for this volume. The client needed a solution that was fast, cost-effective, and maintained the sacred text's integrity while creating visually compelling content suitable for Instagram, YouTube, and other social platforms.

A fully automated, zero cost per video solution running completely locally.

a2b delivered a fully automated, zero cost per video solution using n8n workflow orchestration, Gemini AI for intelligent OCR, and custom Python based video generation with FFmpeg. The system processes the entire PDF, extracts and structures content with AI precision, and generates professionally animated videos with culturally appropriate visual styling all running locally with no recurring API costs.

Sacred Text Publishing AI System
Sacred Text Publishing AI System

Phase 1: Intelligent PDF Processing & Content Extraction

Google Sheets Naming System: The workflow begins by checking a centralized Google Sheet that tracks video generation progress. This naming registry prevents file conflicts when processing multiple PDFs through the same workflow. Each time the system runs, it reads the current counter value, uses it for sequential file naming, and increments the counter for the next execution.

Gemini AI OCR with Gurmukhi Intelligence: The system leverages Google's Gemini AI specifically for its superior understanding of Gurmukhi script and context. Unlike generic OCR tools, Gemini doesn't just extract text, it semantically understands the religious verses and their explanations, returning structured JSON that separates the original verse from its meaning.

JavaScript Data Cleansing: A Code node (JavaScript) receives Gemini's JSON output and performs specialized data cleaning. It strips formatting artifacts, normalizes Gurmukhi characters, validates structure, and prepares two distinct data payloads: one for verse videos and one for explanation videos.

Phase 2: Dual-Path Video Generation System

When processing original Gurmukhi verses, the system creates videos with a distinctive golden glowing effect that reflects the sacred nature of the text. The Python script utilizes FFmpeg to:

  • Render Gurmukhi text using locally installed fonts (ensuring proper script rendering)
  • Apply a golden color scheme with animated glow effects
  • Create smooth text animations optimized for social media viewing
  • Generate MP4 files with platform-appropriate dimensions and quality

For explanation content (meanings and interpretations), the system generates a parallel video with a contrasting visual style:

  • Black highlight treatment for enhanced readability
  • Clean, modern typography suitable for educational content
  • Same technical animation quality with different color psychology
  • Maintains consistency in pacing and duration with verse videos

Phase 3: Progress Tracking & Loop Management

After both verse and explanation videos are generated, the workflow updates the Google Sheets counter automatically. This creates a persistent state that survives workflow restarts, enables batch processing of large PDFs in manageable chunks, and provides real-time progress tracking.

Under the hood.

The automated n8n pipeline behind the Sacred Text generation, from intelligent PDF ingestion and semantic meaning extraction, through the parallel Python/FFmpeg video generation branches.

Architecture Diagram

Results.

  • 100x, Faster processing of 1,500-page text
  • Zero, Marginal cost per generated video
  • 100%, Semantic accuracy using Gemini Gurmukhi parsing
  • Infinite, Scalability across unlimited religious texts

Bottom Line

100x

Faster processing speed

Want one of these? Book a call →
"The organization's feedback was unequivocal: they were 'amazed' by the system's capability and the astronomical time savings. What once seemed like an insurmountable challenge, bringing sacred 1,500-page texts to social media, is now as simple as uploading a PDF and pressing a button."
Organization Director

Ready to become
AI-Native?

Book a 30-minute conversation. We'll map the highest-leverage workflows in your business and tell you whether AI is the right answer.

Free consultancy