# n8n: Viral clips from YouTube with Gemini + FFmpeg

Downloads a YouTube video with yt-dlp, has Gemini score transcript moments for virality, then FFmpeg cuts the top 10 into 9:16 clips with burned-in subtitles.

* Page: https://agentcut.dev/tools/n8n-viral-clips-gemini-ffmpeg/
* Source: https://n8n.io/workflows/11584-extract-viral-worthy-clips-from-youtube-videos-with-gemini-ai-and-ffmpeg-editing/
* Works with: n8n workflows, FFmpeg
* Type: n8n workflow
* Setup difficulty: hard
* Supported versions: Self-hosted n8n only (not n8n Cloud)
* Price: free
* License: n8n template
* GitHub stars: n/a
* Last updated: ~8 months ago (per n8n page)
* Checked: 2026-10-17

Setup steps:

1. Self-host n8n; install ffmpeg and yt-dlp on the host.
2. Create /data/clips with write permission.
3. Import the workflow JSON and create the editing subworkflow.
4. Add Gemini and Gmail credentials, then test on a 5-10 minute video.

Safety notes:

* Needs shell access on the n8n host (FFmpeg, yt-dlp).
* Google Gemini API key and Gmail OAuth credentials.

More n8n workflows tools: https://agentcut.dev/n8n-video-workflows/

---
AgentCut: https://agentcut.dev/ · All tools as JSON: https://agentcut.dev/tools.json · Overview for agents: https://agentcut.dev/llms.txt
