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
Automate video narration with n8n and OpenAI

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

Learn how to Build this Workflow with AI:

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.


Automate video narration with n8n and OpenAI

Visit through Desktop to Interact with the Workflow.

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 Twist Channel Creation and Messaging with n8n

This workflow automates creating and updating a channel in Twist and sending a personalized message to specific users. It eliminates manual setup errors and saves time managing Twist communications.

Automate Ideogram Image Generation with Google Sheets & Gmail

This workflow automates graphic design image generation via Ideogram AI, storing image data in Google Sheets and Google Drive, with email alerts via Gmail. It saves designers hours by automating image creation, remixing, review, and record-keeping.

Automate IT Support with Slack and OpenAI in n8n

Streamline IT support by automating Slack message handling using n8n and OpenAI. This workflow handles Slack DMs, filters bots, queries a Confluence knowledge base, and delivers AI-generated responses, improving support efficiency and response time.

Automate Crypto Analysis with CoinMarketCap & n8n AI Agent

Discover how this unique n8n workflow leverages CoinMarketCap’s multi-agent AI to deliver precise, real-time cryptocurrency insights directly via Telegram. Manage crypto data analysis efficiently with automated multi-source API integration.

Automate Gumroad to Beehiiv Subscriber Sync with n8n

Learn how to automatically add new Gumroad sales customers as Beehiiv newsletter subscribers using n8n automation. This workflow saves time by syncing sales data to Google Sheets CRM and notifying your Telegram channel instantly.

Generate On-Brand Blog Articles Using n8n and OpenAI

This workflow automates the creation of on-brand blog articles by analyzing existing company content using n8n and OpenAI. It extracts article structures and brand voice to produce consistent draft articles, saving significant content creation time.
1:1 Free Strategy Session
Your competitors are already automating. Are you still paying for it manually?

Do you want to adopt AI Automation?

Every hour your team does repetitive work, you're burning real money.
While you wait, faster businesses are cutting costs and moving quicker.
AI and automations aren't the future anymore — they're the present.

Book a live 1-on-1 session where we show you exactly which of your daily tasks can be automated — and what it’s costing you not to.