How to create many videos in bulk using a spreadsheet

February 19, 2025
10 Min
Video Engineering
Jump to
Share
This is some text inside of a div block.

If you’ve ever tried to create a series of videos manually, you know how time-consuming it can be. But producing videos at scale is no longer reserved for large teams or big-budget companies. With the right tools, you can easily automate the process and create hundreds of videos in just a few clicks.

Bulk video creation offers major advantages: it boosts efficiency by automating repetitive tasks, enables scalability for multiple products or campaigns without extra work, and allows for personalized content across all videos, even in large volumes.

FastPix API simplifies this process by allowing you to create videos programmatically using data from a spreadsheet. No more manual video editing or juggling multiple video files. All you need is a bit of automation, and you’re good to go.

Prerequisites

Before we get started, make sure you have the following:

  • Basic understanding of spreadsheets: This guide assumes you’re comfortable working with data in Google Sheets, Excel, or CSV format.
  • FastPix API access: You’ll need an API key to interact with FastPix and generate videos.
  • Some basic API knowledge: While you don’t need to be an API expert, it helps to have a general understanding of how to make API calls and handle responses.

Prepare your spreadsheet

The first step is to create a spreadsheet that holds all the necessary data for your videos. Depending on the type of videos you want to create, you’ll need to define which variables will change for each video.

Once you are done you can also add extra fields in the columns next. For example, intro outro URLs and time stamps or description to pass inside metadata.

Set up FastPix API integration

To interact with the FastPix API, you’ll first need to authenticate using your API key. Here’s a basic example of how you can authenticate and set up the API call using Python.

1import pandas as pd
2import requests
3from requests.auth import HTTPBasicAuth
4
5# Load the Excel file into a DataFrame
6df = pd.read_excel('/Users/Downloads/spreadsheetTest.xlsx')
7
8# Define the Fastpix API endpoint 
9api_url = 'https://v1.fastpix.io/on-demand'
10access_token_key = '96c9bb3f-b057-4089-9b5f-2ccb5e58eccf'
11access_token_secret = 'a4dd5560-475b-4151-b217-1156617ab779'

You can generate your API key by logging into FastPix dashboard and navigate to Settings > Access Tokens. For more information follow this guide FastPix Access Tokens.

Automate video creation using API

Now comes the fun part automating video creation! You’ll need to loop through each row in your spreadsheet and send an API request to FastPix for every video. Each row will represent a different video, with its unique title, description, image, and other attributes.

Step 1: Read Data from Spreadsheet

You’ll use the panda’s library to read the data from your spreadsheet. Each row in the DataFrame corresponds to one video, and each column represents a different attribute for the video (like the title, URL, etc.).

Step 2: Prepare API payload

For each row in your spreadsheet, you’ll prepare an API request payload. This will include:

  • The video’s URL (e.g., for the video source, intro, and outro).
  • Metadata (like the video title).
  • Any other custom fields, such as access policies or resolution settings.

Here’s how you can write the script:

1# Function to send API request
2def send_api_request(payload):
3try:
4response = requests.post(api_url, json=payload, auth=HTTPBasicAuth(access_token_key, access_token_secret))
5if response.status_code == 201:
6print(f"Request successful for {payload['metadata']['title']}.")
7else:
8print(f"Error {response.status_code} for {payload['metadata']['title']}.")
9except Exception as e:
10print(f"Error occurred for {payload['metadata']['title']}: {e}")
11
12# Loop through each row in the DataFrame
13for index, row in df.iterrows():
14print(f"fetch successful: {row['Video Title']}")
15
16# Prepare the payload for each row in the required format
17payload = {
18"inputs": [
19{
20"type": "video",
21"url": row["Video urls"], 
22"introUrl": row["Intro URL"], 
23"outroUrl": row["Outro URL"] 
24}
25],
26"moderation": { 
27"type": row["Moderation Type"]
28},
29"namedEntities": row["Named Entities"],
30"chapters": row["Chapters"], 
31"metadata": {
32"title": row["Video Title"],
33},
34"accessPolicy": "public",
35"maxResolution": "1080p"
36}
37# Send the API request with the prepared payload
38send_api_request(payload)

You can explore more payload options through our API reference here.

Explanation of the code:

  1. Reading data: The pandas read_excel() function loads your Excel file into a DataFrame. Each row in the DataFrame represents a different video, and the columns contain the various video attributes (e.g., Video Title, Video URLs, Intro, Outro, etc.).
  2. Loop through rows: The script loops through each row of the DataFrame using df.iterrows(). For each row, it extracts the necessary data (such as the video title, URLs, etc.).
  3. Prepare the payload: The payload is structured to send the necessary information to FastPix in the required format. The inputs array contains the video URL along with the intro and outro URLs, while the metadata contains the video title.
  4. Send API request: The send_api_request() function sends the prepared payload to FastPix via an API POST request. If the request is successful (status code 201), it prints a success message; otherwise, it prints an error message.

Step 3: Handling the response

The response from the FastPix API will indicate whether the video creation request was successful. You can handle success or failure accordingly in your script. In the provided code, if the API request is successful, it prints a message confirming the success.

Advanced media features in FastPix for bulk video update

FastPix also provides a range of advanced media manipulation features. These features enable you to further customize your videos by modifying the audio, adding intros and outros, and even expunging unwanted segments. Here’s how to integrate these advanced media features into your bulk video workflow.

  1. Intro and outro customization

You can automate the addition of intros and outros to each of your videos, ensuring that your branding, and call-to-action messages are consistently included in every video. This is particularly useful for marketing campaigns or tutorials, where the intro/outro stays the same but the main content changes based on dynamic data.

How to use:

  • Intro: This could be a brand logo, a tagline,or a short teaser clip.·     
  • Outro: Typically used for calls to action(e.g., "Subscribe", "Follow us on social media","Visit our website").‍‍

API Example for adding intro/outro:

You can specify the intro and outro videos as input files and combine them with the main video dynamically.

1{
2  "inputs": [
3    {
4      "type": "video",
5      "url": "https://static.fastpix.io/sample.mp4",
6      "introUrl": "https://static.fastpix.io/sample.mp4",
7      "outroUrl": "https://static.fastpix.io/sample.mp4"
8    }
9  ],
10  "accessPolicy": "public",
11  "maxResolution": "1080p"
12}

Automation workflow

  • For each video, specify the intro.mp4 and outro.mp4 URLs.
  • This combines them with the main video content to create a final video with seamless transitions between the intro, main content, and outro.

  1. Audio replacement

You can replace the original audio track of a video with a custom audio file using your URL input in the swapTrackUrl parameter. This is useful for adding voiceovers, background music, or even translated audio versions of your videos.

How to use:

  • Voiceovers: Automatically insert a voiceover based on the content of the video, whether it's a product description, tutorial, or marketing pitch.
  • Background music: Replace the existing audio with royalty-free or branded background music.
  • Multilingual audio: Replace the audio in videos for different languages by simply uploading a different audio file.

API example for audio replacement:

1{  
2  "inputs": [  
3    {  
4      "type": "video",  
5      "url": "https://static.fastpix.io/sample-video.mp4"  
6    },  
7    {  
8      "type": "audio",  
9      "swapTrackUrl":"https://static.fastpix.io/sample-audio.mp4" 
10    }  
11  ], 
12"accessPolicy": "public", 
13"maxResolution": "1080p" 
14}

Automation workflow

Upload the desired audio track (e.g.,voiceover or background music) to replace the existing one in your video.

  1. Expunging segments

FastPix allows you to expunge or remove unwanted segments from a video. This is particularly useful when you need to clean up a video by removing mistakes, irrelevant sections, or sensitive content. You can define start and end timestamps for the segments you want to remove.

How to use:

  • Removing mistakes: If there’s a mistake in the middle of the video (e.g., a typo or error), you can expunge that section.
  • Content optimization: Remove sections of the video that aren't relevant to the specific audience (e.g., intro segments in a longer video).
  • Sensitive content: Use moderation or manual timestamps to remove sensitive content before publishing.

API example for expunging segments:

1{
2  "inputs": [
3    {
4      "type": "video",
5      "url": "https://static.fastpix.io/sample.mp4",
6      "expungeSegments": [
7        "2-5",
8        "7-9"
9      ]
10    }
11  ],
12  "accessPolicy": "public",
13  "maxResolution": "1080p"
14}

Automation workflow:

  • In your video metadata, specify the segments to expunge by defining their start and end timestamps.
  • The system will automatically remove those segments from the video, leaving you with a polished final product.

  1. Audio overlay

Audio overlay allows you to add an additional audio track to the video, such as background music, sound effects, or voiceovers, while keeping the original audio. This is useful for videos where you want to keep the natural sound of the video (e.g., a speaker's voice) but enhance it with additional sound elements.

How to use:

  • Background music overlay: Add subtle background music while keeping the original voiceover or dialogue intact.
  • Sound effects: Overlay sound effects on specific scenes (e.g., a "click" sound when showing a product image).
  • Voiceover overlay: Overlay a new voiceover on top of the original audio, especially useful for tutorials or product demos.

API example for audio overlay

1{
2  "inputs": [
3    {
4      "type": "video",
5      "url": " https://static.fastpix.io/sample-video.mp4"
6    },
7    {
8      "type": "audio",
9      "imposeTracks": [
10        {
11          "url": " https://static.fastpix.io/sample-audio.mp3",
12          "startTime": 0,
13          "endTime": 14,
14          "fadeInLevel": 2,
15          "fadeOutLevel": 3
16        }
17      ]
18    }
19  ],
20  "accessPolicy": "public",
21  "maxResolution": "1080p"
22}

Automation workflow:

  1. Upload the overlay audio file.
  2. Align the overlay audio with the video, either starting from the beginning or syncing it to specific timestamps.
  3. Combine the original audio and overlay audio, adjusting volumes if necessary to ensure clarity and balance.

Note: you can find in-depth information about video transformation in Fastpix Guides.

AI features for bulk video creation with FastPix

With FastPix, you can use AI to make your bulk video creation smarter, more efficient, and personalized. The following AI-driven features are specifically available in the platform:

  1. Named Entity Recognition (NER)

Named Entity Recognition automatically detect and highlight specific entities in your video content, such as product names, brand names, locations, people, and other key items. This feature is useful for dynamic video content creation where these entities can be customized based on the data in your spreadsheet, giving each video a personalized touch.

Example use cases:

  • Highlighting and displaying product names dynamically in the video intro or outro.
  • Personalizing a marketing video with names or locations automatically inserted into the content.

Learn more about named entities here

  1. Automated summarization

FastPix's AI can generate concise summaries of your video content based on the key points, which can then be integrated directly into your video. Whether you're working with long-form videos or content with complex themes, AI-driven summaries can help create condensed versions of videos for quicker consumption.

Example use cases:

  • Creating quick teaser videos that summarize the main points of a longer video.
  • Automatically generating description text for the video, which can be inserted into metadata.

See how you can generate summary from video with FastPix.

  1. Chaptering

With the chaptering feature, you can automatically divide your video into key segments based on the content. This is particularly useful for tutorial or educational content, where you may want to break the video into sections that are easy to navigate. FastPix uses AI to identify logical break points in your video and creates chapters accordingly.

Example use cases:

  • Generating a table of contents for long-form videos, where each chapter corresponds to a specific topic or section.
  • Using chapters to create shorter video clips that can be reused on social media or other platforms.

Learn more about video chapters here.

  1. Video moderation

FastPix also includes moderation tools powered by AI, which can automatically detect inappropriate content in your videos. This feature ensures that your videos meet community guidelines or company standards by automatically flagging sensitive content such as offensive language, explicit imagery, or controversial topics.

Example use cases:

  • Automatically filtering out inappropriate content during video production before it’s published.
  • Ensuring compliance with platform-specific rules (e.g., YouTube, TikTok) for content moderation.

Learn more about moderation here.

Final thoughts

When you choose FastPix, you empower your team to innovate without the headaches of managing complex video workflows.

FastPix gives you:

  • Efficiency: Content-adaptive encoding ensures high-quality video while saving on bandwidth and storage.
  • Flexibility: Integrate seamlessly with our APIs to create workflows tailored to your platform’s needs.
  • Insights: Deep analytics to optimize your video strategy and enhance viewer engagement.
  • Reliability: Scalable infrastructure that ensures uninterrupted video delivery for global audiences.

Get started today or explore our Docs and Guide on building scalable video workflows

FAQs

How can I automate video creation using FastPix and a spreadsheet?

You can automate video creation by leveraging the FastPix API and reading data from a spreadsheet (like Google Sheets or Excel). By using the pandas library in Python, you can loop through each row of your spreadsheet, which holds video-specific data like titles, URLs, and other metadata. For each row, the script will generate an API request, sending the data to FastPix, which will create the videos accordingly.

What advanced media features can I integrate into bulk video creation using FastPix?

FastPix provides several advanced media manipulation features for bulk video creation, such as adding intros and outros, replacing audio tracks, expunging video segments, and overlaying additional audio. These features can be automated through the FastPix API, allowing you to customize videos dynamically based on spreadsheet data, such as including a consistent brand intro or swapping audio tracks for multilingual content.

How can I handle API responses when automating video creation with FastPix?

After sending API requests to FastPix, the system will return a response indicating whether the video creation was successful or if any errors occurred. You can handle the response in your script by checking the status code (e.g., a 201 status code means success). If there’s an error, the script will print the relevant error message to help troubleshoot the issue.

What are the benefits of bulk video creation with FastPix?

Bulk video creation with FastPix saves time by automating repetitive tasks, allowing you to generate hundreds of videos with just a few clicks. It also enhances scalability by enabling you to create videos for multiple products or campaigns simultaneously. Additionally, you can personalize each video, maintaining unique content while still managing large volumes efficiently.

What prerequisites do I need to use FastPix for bulk video creation?

To use FastPix for bulk video creation, you’ll need a basic understanding of spreadsheets (e.g., Google Sheets or Excel), access to the FastPix API (including an API key), and a general understanding of how to make API calls and handle responses. These prerequisites will ensure that you can effectively automate and customize video creation processes.

Get Started

Enjoyed reading? You might also like

Try FastPix today!

FastPix grows with you – from startups to growth stage and beyond.