Create Video Narration with n8n, OpenAI & Python

This workflow automates video narration by extracting frames using Python, generating scripts with OpenAI’s GPT-4o, and converting them into voiceovers. Save hours by transforming videos into narrated audio clips effortlessly.
lmChatOpenAi
code
httpRequest
+9
Workflow Identifier: 1345
NODES in Use: Manual Trigger, HTTP Request, Code, Split Out, Split In Batches, Convert To Binary, Edit Image, Aggregate, Chain LLM, OpenAI, Wait, Google Drive

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 Automation Does

This workflow takes a video from a public link and makes a spoken narration audio automatically.
It solves the problem of writing scripts for videos which takes many hours.
You get a voiceover audio file from the video fast, with a script written by AI looking at the images.


Tools and Services Used

  • OpenAI API: For generating narration scripts and text-to-speech audio.
  • Google Drive API: To upload and store the final audio file.
  • Python with OpenCV: To extract frames evenly from the downloaded video.
  • n8n Automation Platform: To connect all steps in a workflow.
  • HTTP Request node: To download the video.

Workflow Input, Process, and Output

Inputs

  • Video file accessed from a public URL.

Processing Steps

  1. Download video using HTTP Request node.
  2. Extract up to 90 evenly spaced frames from the video using Python and OpenCV in Code node.
  3. Split frames into individual items for further processing.
  4. Batch frames into groups of 15 to fit language model token limits.
  5. Convert base64 frames to binary and resize images for AI input.
  6. Generate a continuous narration script in the style of a famous nature narrator using OpenAI’s multimodal GPT-4o LLM.
  7. Combine partial scripts into full narration text.
  8. Use OpenAI’s text-to-speech to make an MP3 voiceover from the script.
  9. Upload the final audio file to Google Drive for storage and sharing.

Output

  • MP3 audio file with a voiceover narration of the input video.

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

Download and Import

  1. Inside the n8n editor, click the Download button on this page to get the workflow file.
  2. Import the workflow file via the “Import from File” button in n8n.

Configure Credentials and Settings

  1. Add your OpenAI API Key in the credentials section to allow script generation and TTS.
  2. Add Google Drive API credentials to upload the voiceover audio.
  3. Check and update any IDs like Google Drive folder ID or email/channel fields if applicable.
  4. If URLs, prompts, or code snippets appear in the input fields, copy and paste exactly from the description to these fields.

Test the Workflow

  1. Click the Manual Trigger node (Manual Trigger) and run the workflow once.
  2. Check the output to make sure the MP3 audio has uploaded successfully.

Activate for Production

  1. Once tests pass, activate the workflow to run whenever needed or schedule runs.

This quick method lets you use and benefit from the workflow without building it from zero.


Key Workflow Details

Extracting Frames

The Code node (Python) uses OpenCV to select frames evenly spaced through the video.
It outputs a list of base64 JPEG strings representing these frames.

Batching and Image Preparation

Splitting frames into batches of 15 keeps the input size manageable for the AI model.
Frames get converted to binary and resized to 768px for better processing.

Narration Script Generation

The multimodal GPT-4o model reads image batches and produces script parts.
Scripts keep context between batches for a smooth narration.

Building the Final Audio

Partial scripts combine into a single composed text.
OpenAI’s text-to-speech service creates the MP3 file from the whole script.

Uploading and Access

The voiceover MP3 uploads to Google Drive.
The user can then easily find and share the audio file.


Common Issues and Solutions

  • Video Frame Extraction Failure: Happens if video format is unsupported or Python OpenCV is missing.
    Fix it by using MP4 videos and ensure OpenCV is installed.
  • OpenAI Rate Limit Errors: May occur when sending many requests fast.
    Use a Wait node to slow requests or upgrade the OpenAI plan.
  • Google Drive Upload Fails: Caused by expired or wrong OAuth credentials.
    Re-authenticate with Google Drive and check folder permissions.

Customization Ideas

  • Change narration style by editing prompt in the script generation node.
  • Increase or decrease frame count in the Python node for detail vs speed.
  • Adjust batch size in the frame batching node for token limit management.
  • Switch upload folder in Google Drive node or use other cloud storage.
  • Remove or modify the frame resize node depending on desired image quality.

Pre-Production Checklist

  • Confirm the video download URL is accessible and uses a supported format.
  • Run the frame extraction Python code separately first.
  • Validate OpenAI credentials including quota limits.
  • Verify Google Drive API connection and destination folder.
  • Test the workflow on a small video to check timing and outputs.
  • Backup generated files if re-running for multiple videos.

Deployment Notes

After testing the workflow, activate it in n8n editor.
You can run it manually or schedule for batch jobs.

Watch execution logs to catch API errors or slowdowns.
Use the Wait node to avoid hitting OpenAI call limits.

Consider self-host n8n for more control and stability at scale.


Summary

✓ The workflow transforms a public video URL into narrated MP3 audio.
✓ It extracts key video frames, writes AI narration scripts, and produces speech.
✓ Saves hours of manual work on scripting and voiceover creation.
✓ Outputs an MP3 stored on Google Drive for easy access.
✓ Beginners can import and configure the workflow in n8n without building it themselves.


Frequently Asked Questions

Yes, any publicly accessible video URL in MP4 format that OpenCV supports can be used.
API usage depends on video length and frame batch size; more frames cost more tokens.
The audio file uploads to the linked Google Drive account in the specified folder.
Yes, increasing frames is possible but will slow processing and use more resources.

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