Automate Video Narration with n8n and OpenAI Vision AI

This workflow automates turning a video into a narrated script and voiceover using n8n’s video frame extraction and OpenAI’s multimodal LLM, saving hours of manual editing and scripting time.
lmChatOpenAi
code
splitOut
+11
Workflow Identifier: 1301
NODES in Use: lmChatOpenAi, code, splitOut, httpRequest, convertToFile, googleDrive, aggregate, splitInBatches, editImage, wait, chainLlm, openAi, manualTrigger, stickyNote

Press CTRL+F5 if the workflow didn't load.

Learn how to Build this Workflow with AI:

Visit through Desktop for Best experience

What This Workflow Does

This workflow takes a wildlife video and makes a talk script for it.
The script matches the style of a famous nature storyteller.
It also makes a voice audio from the script and saves the audio online.
This saves many hours of writing and recording.

The user will get an audio narration file that fits the video without doing the writing or voice recording themselves.


Inputs, Processing Steps, and Output

Inputs

Processing Steps

  • Download video via Download Video node.
  • Extract 90 or fewer frames evenly spaced using Python and OpenCV in Capture Frames node.
  • Split frames one by one with Split Out Frames node.
  • Batch frames into groups of 15 using For Every 15 Frames (SplitInBatches) node.
  • Convert Base64 strings of frames to binary files in Convert to Binary node.
  • Resize frames to 768×768 JPEG for the AI model using Resize Frame node.
  • Aggregate each batch of 15 images with Aggregate Frames node.
  • Call OpenAI GPT-4o-2024-08-06 model in Generate Narration Script node to make partial scripts from each image batch.
  • Wait briefly between calls with Stay Within Service Limits node to avoid API limits.
  • Combine the partial scripts into one full narration using Combine Script node.
  • Convert the full script text to MP3 audio with Use Text-to-Speech OpenAI audio node.
  • Upload final MP3 file to Google Drive folder with Upload to GDrive node.

Output

A voiceover narration MP3 that matches the video and is stored in Google Drive for easy use.


Who Should Use This Workflow

This workflow is for people who make wildlife videos and need fast, good narration talk scripts.
It is good for those who do not want to spend hours writing and recording voiceovers.
It helps creators who want consistent narration style and faster content production.


Tools and Services Used

  • n8n: Automates the sequence of tasks.
  • Python with OpenCV: Extracts and processes frames from video.
  • OpenAI GPT-4o-2024-08-06 model: Generates narration script from images.
  • OpenAI Text-to-Speech endpoint: Converts script text into MP3 audio.
  • Google Drive API: Uploads and stores the generated audio file.

Beginner Step-by-Step: How to Use This Workflow in n8n

Step 1: Get the Workflow

  1. Download the workflow file by clicking the Download button on this page.
  2. Open your n8n editor where you want to run the workflow.
  3. Import the workflow using the Import from File option.

Step 2: Set Up Credentials

  1. Add your OpenAI API Key for the AI nodes.
  2. Connect your Google Drive account with OAuth2 for file uploading.

Step 3: Check and Update Settings

  1. Make sure the video URL in the Download Video node is a valid link.
  2. If needed, update the Google Drive folder ID in Upload to GDrive node.
  3. Review any prompts or code snippets in Generate Narration Script or Capture Frames and adjust if wanted.

Step 4: Test the Workflow

  1. Click the manual trigger Webhook node or Manual Trigger to start.
  2. Watch the workflow logs and confirm the script and audio file are generated and saved.

Step 5: Activate for Production

  1. Turn on the workflow by enabling it.
  2. Hook it to a trigger you want, like a webhook or schedule.

For better performance, consider running on a server with enough CPU and memory. See self-host n8n options.


Customization Ideas

  • Change the video URL in the Download Video node to your own sample.
  • Adjust max_frames in the Python script to choose how many frames to extract.
  • Edit narration style in the prompt text inside Generate Narration Script node to narrate in a different tone.
  • Modify or remove the wait node Stay Within Service Limits if you have higher API limits.
  • Change Google Drive folder ID in the Upload to GDrive node to store files elsewhere.

Common Issues and Solutions

Problem: “Failed to decode video or no frames extracted”

Cause: The video format is not supported or the video file is corrupt.
Solution: Use MP4 video format from a working URL. Recheck video file quality.

Problem: “OpenAI API rate limit exceeded”

Cause: Too many requests sent quickly.
Solution: Increase the delay in the Stay Within Service Limits node or upgrade the API plan.

Problem: “Memory crash during frame extraction”

Cause: Video is too large or too many frames extracted.
Solution: Reduce max_frames in the Python code or shrink the video size before processing.


Pre-Production Checklist

  • Check the video URL is valid in the download node.
  • Test frame extraction on small videos first.
  • Verify OpenAI API key and usage limits.
  • Make sure Google Drive connection has upload permission.
  • Run multiple test workflows to confirm consistent results.

Deployment Guide

After import and setup, enable the workflow and link to a trigger node.
Run manual tests to check all steps finish without errors.
For heavy video jobs, use a system with enough CPU and memory and consider self-host n8n.


Summary of Benefits

✓ Saves hours of manual narration writing
✓ Produces consistent wildlife-style script
✓ Automatically creates voiceover audio
✓ Uploads audio for easy access
✓ Requires minimal user work beyond setup

→ Outcome: A ready-to-use narrated video audio clip without manual scripting or recording.


Frequently Asked Questions

Yes, you can use any video with a valid URL in MP4 format that OpenCV can process.
Yes, API calls to OpenAI for text and audio generation consume credits based on the plan.
Large videos may cause memory issues; reduce frame extraction count or pre-optimize videos before using.
Yes, the narration prompt text in the Generate Narration Script node can be edited to change the style or tone.

Promoted by BULDRR AI

Related Workflows

Automate Viral UGC Video Creation Using n8n + Degaus (Beginner-Friendly Guide)

Learn how to automate viral UGC video creation using n8n, AI prompts, and Degaus. This beginner-friendly guide shows how to import, configure, and run the workflow without technical complexity.
Form Trigger
Google Sheets
Gmail
+37
Free

AI SEO Blog Writer Automation Workflows in n8n

A complete beginner guide to building an AI SEO blog writer automation using n8n.
AI Agent
Google Sheets
httpRequest
+5
Free

Automate CrowdStrike Alerts with VirusTotal, Jira & Slack

This workflow automates processing of CrowdStrike detections by enriching threat data via VirusTotal, creating Jira tickets for incident tracking, and notifying teams on Slack for quick response. Save hours daily by transforming complex threat data into actionable alerts effortlessly.
scheduleTrigger
httpRequest
jira
+5
Free

Automate Telegram Invoices to Notion with AI Summaries & Reports

Save hours on financial tracking by automating invoice extraction from Telegram photos to Notion using Google Gemini AI. This workflow extracts data, records transactions, and generates detailed spending reports with charts sent on schedule via Telegram.
lmChatGoogleGemini
telegramTrigger
notion
+9
Free

Automate Email Replies with n8n and AI-Powered Summarization

Save hours managing your inbox with this n8n workflow that uses IMAP email triggers, AI summarization, and vector search to draft concise replies requiring minimal review. Automate business email processing efficiently with AI guidance and Gmail integration.
emailReadImap
vectorStoreQdrant
emailSend
+12
Free

Automate Email Campaigns Using n8n with Gmail & Google Sheets

This n8n workflow automates personalized email outreach campaigns by integrating Gmail and Google Sheets, saving hours of manual follow-up work and reducing errors in email sequences. It ensures timely follow-ups based on previous email interactions, optimizing communication efficiency.
googleSheets
gmail
code
+5
Free