How to Build a Long Form Video Repurposing Tool
Learn how we built a pipeline to generate shorter highlight videos from longer content such as podcasts and educational videos.
/blog-assets/authors/dikshant.jpeg
by Dikshant Shah
Cover Image for How to Build a Long Form Video Repurposing Tool

Automated video content repurposing is revolutionizing how creators and businesses maximize their content's reach. By intelligently transforming long-form videos into engaging short-form content with optimized face detection and aspect ratios, you can effectively redistribute your content across platforms like LinkedIn, TikTok, and Instagram. OpusClip has mastered this automated content repurposing process, helping creators generate viral short-form video highlights.

In this tutorial, I'll show you how to build an automated video content repurposing pipeline that:

  1. Uses AI to identify and extract the most engaging highlights from long-form videos
  2. Automatically generates social media-optimized clips with smart face detection and aspect ratio adjustment

Benefits of Automated Video Content Repurposing

  • Transform single long-form videos into multiple platform-specific short clips
  • Save hours of manual editing with AI-powered highlight detection and face tracking
  • Increase viewer retention with perfectly-timed, engaging video highlights
  • Scale your content strategy across multiple social platforms efficiently

Building Your Video Repurposing Pipeline

Let's break down each step of the automated content repurposing process with detailed code examples.

Step 1: AI-Powered Highlight Detection

First, we'll use the sieve/transcript-analysis function to automatically identify the most engaging segments of your video:

file = sieve.File("your_file_url_or_path") #Required
transcript_analysis = sieve.function.get("sieve/transcript-analysis")
transcript_analysis_output = transcript_analysis.push(file, generate_highlights = True)

HIGHLIGHTS_INDEX = 5
transcript_analysis_objects = transcript_analysis_output.result()
highlights = list(transcript_analysis_objects)[HIGHLIGHTS_INDEX]['highlights']

Step 2: Automated Short-Form Video Generation

Next, we'll use sieve/autocrop to transform these highlights into platform-optimized short-form videos with intelligent face detection and framing:

autocrop = sieve.function.get("sieve/autocrop")
aspect_ratio = '9:16'  # Optimal for platforms like TikTok and Instagram Stories
autocrop_outputs = []
for highlight in highlights:
    output = autocrop.push(
        file,
        return_video = True,
        start_time = highlight['start_time'],
        end_time = highlight['end_time'],
        aspect_ratio = aspect_ratio
    )
    autocrop_outputs.append((output, highlight))

for autocrop_output, highlight in autocrop_outputs:
        for autocrop_output_object in autocrop_output.result():
            print(sieve.File(path = autocrop_output_object.path), highlight) #Generated short-form clips

Key Components of the Content Repurposing Pipeline

Process AI Function
Intelligent Highlight Extraction sieve/transcript-analysis
Smart Video Reformatting & Face Detection sieve/autocrop

Example Output

Below is a sample short-form video generated from this YouTube podcast about AI Agent Startups, demonstrating our automated content repurposing pipeline in action:

Advanced Content Repurposing Features

To enhance your video repurposing pipeline further, consider adding the following capabilities:

  • Automated Subtitle Generation: Leverage sieve/transcript-analysis to create and embed captions automatically.
  • Smart B-roll Integration: Enhance engagement by automatically incorporating relevant B-roll footage.
  • Multi-Language Content Repurposing: Expand reach with automated dubbing and translation features.

Conclusion

This tutorial demonstrates how to build a powerful video content repurposing pipeline using AI-powered tools like transcript-analysis and autocrop. By automating the highlight detection and video optimization process, you can efficiently transform long-form content into engaging short-form videos for multiple platforms.