u/Ordinary_1111

Built an AI Workflow that Turns Long Videos into Viral Shorts Automatically (n8n + Whisper + Gemini)

I’ve been testing a pipeline to repurpose long-form videos into short-form content, and finally got something working end-to-end inside n8n.

The idea:
Upload 1 long video → get multiple ready-to-post shorts.

How the workflow works

1. Upload video

  • Simple form trigger
  • Accepts any long video

2. Audio extraction + transcription

  • FFmpeg extracts audio
  • Whisper generates full transcript with word-level timestamps

3. AI selects viral moments

  • Gemini analyzes:
    • full transcript
    • word timestamps
  • Picks 3–15 high-retention clips (15–60s each)
  • Returns exact start/end timestamps (very important for accuracy)

4. Clip generation

  • FFmpeg auto-cuts clips using timestamps
  • Crops to vertical (9:16)
  • Adds proper encoding for social platforms

5. Auto scheduling

  • Shorts are automatically scheduled to:
    • TikTok
    • Instagram
    • YouTube Shorts
  • Posted daily (one per day)

What was harder than expected

  • Getting accurate timestamps (word-level matters a LOT)
  • Handling async jobs (FFmpeg processing loops)
  • Making sure clips don’t cut mid-sentence
  • Forcing AI to return clean JSON (this took time)

What I like about this setup

  • Fully automated once triggered
  • No manual editing
  • Reuses long content efficiently
  • Scales content output easily

Workflow (for anyone curious)

reddit.com
u/Ordinary_1111 — 1 day ago