> ## Documentation Index
> Fetch the complete documentation index at: https://docs.pictory.ai/llms.txt
> Use this file to discover all available pages before exploring further.

# Video to Short Clips

> Repurpose long-form videos into short, engaging clips for social media

This guide shows you how to transform long-form videos into short, engaging clips perfect for social media. Use AI to automatically extract the most impactful moments from webinars, interviews, lectures, or any long video content.

## What You'll Learn

> [card] Video Repurposing
>
> Convert long videos into short clips

> [card] AI Highlights
>
> Automatically detect key moments

> [card] Social Ready
>
> Perfect for TikTok, Reels, Shorts

> [card] Auto Captions
>
> Subtitles generated automatically

## Before You Begin

Make sure you have:

* A [Pictory API key](https://app.pictory.ai/api-access)
* Node.js or Python installed on your machine
* Long-form video accessible via public URL
* Understanding of target platform requirements

```bash npm theme={null}
npm install axios
```

```bash pip theme={null}
pip install requests
```

## How Video-to-Shorts Works

When you convert a long video to short clips:

1. **Video Access** - Your source video is downloaded and analyzed
2. **Audio Transcription** - AI transcribes the audio content
3. **Content Analysis** - Speech patterns, visual changes, and content relevance are analyzed
4. **Highlight Detection** - Key moments and engaging segments are identified
5. **Clip Extraction** - Short clips are generated from the highlights
6. **Enhancement** - Clips are optimized with captions and formatting
7. **Video Rendering** - Final short clips are ready for download

> [!NOTE]
>
> The source video must be accessible via a public URL. Processing time depends on video length - expect approximately 1-2 minutes of processing for every minute of source video.

## Complete Example

```javascript Node.js theme={null}
import axios from "axios";

const API_BASE_URL = "https://api.pictory.ai/pictoryapis";
const API_KEY = "YOUR_API_KEY";

// Sample video URL - replace with your own long-form video URL
const VIDEO_URL = "https://pictory-static.pictorycontent.com/sample_long_video.mp4";

async function createVideoToShorts() {
  try {
    console.log("Creating short clips from long video...");

    const response = await axios.post(
      `${API_BASE_URL}/v2/video/storyboard/render`,
      {
        videoName: "video_to_shorts",
        scenes: [
          {
            videoUrl: VIDEO_URL,           // Long-form video URL at scene level
            audioLanguage: "en-US",        // Required for video processing
          }
        ],
      },
      {
        headers: {
          "Content-Type": "application/json",
          Authorization: API_KEY,
        },
      }
    );

    const jobId = response.data.data.jobId;
    console.log("✓ Video processing started!");
    console.log("Job ID:", jobId);

    // Monitor progress
    console.log("\nMonitoring video creation...");
    let jobCompleted = false;
    let jobResult = null;

    while (!jobCompleted) {
      const statusResponse = await axios.get(
        `${API_BASE_URL}/v1/jobs/${jobId}`,
        {
          headers: { Authorization: API_KEY },
        }
      );

      const status = statusResponse.data.data.status;
      console.log("Status:", status);

      if (status === "completed") {
        jobCompleted = true;
        jobResult = statusResponse.data;
        console.log("\n✓ Short clips are ready!");
        console.log("Video URL:", jobResult.data.videoURL);

        if (jobResult.data.highlights) {
          console.log("Highlight clips:", jobResult.data.highlights);
        }
      } else if (status === "failed") {
        throw new Error("Video creation failed: " + JSON.stringify(statusResponse.data));
      }

      await new Promise(resolve => setTimeout(resolve, 5000));
    }

    return jobResult;
  } catch (error) {
    console.error("Error:", error.response?.data || error.message);
    throw error;
  }
}

createVideoToShorts();
```

```python Python theme={null}
import requests
import time
import json

API_BASE_URL = 'https://api.pictory.ai/pictoryapis'
API_KEY = 'YOUR_API_KEY'

# Sample video URL - replace with your own long-form video URL
VIDEO_URL = "https://pictory-static.pictorycontent.com/sample_long_video.mp4"

def create_video_to_shorts():
    try:
        print("Creating short clips from long video...")

        response = requests.post(
            f'{API_BASE_URL}/v2/video/storyboard/render',
            json={
                'videoName': 'video_to_shorts',
                'scenes': [
                    {
                        'videoUrl': VIDEO_URL,       # Long-form video URL at scene level
                        'audioLanguage': 'en-US'     # Required for video processing
                    }
                ]
            },
            headers={
                'Content-Type': 'application/json',
                'Authorization': API_KEY
            }
        )
        response.raise_for_status()

        job_id = response.json()['data']['jobId']
        print("✓ Video processing started!")
        print(f"Job ID: {job_id}")

        # Monitor progress
        print("\nMonitoring video creation...")
        job_completed = False
        job_result = None

        while not job_completed:
            status_response = requests.get(
                f'{API_BASE_URL}/v1/jobs/{job_id}',
                headers={'Authorization': API_KEY}
            )
            status_response.raise_for_status()

            status = status_response.json()['data']['status']
            print(f"Status: {status}")

            if status == 'completed':
                job_completed = True
                job_result = status_response.json()
                print("\n✓ Short clips are ready!")
                print(f"Video URL: {job_result['data']['videoURL']}")

                if 'highlights' in job_result['data']:
                    print(f"Highlight clips: {job_result['data']['highlights']}")
            elif status == 'failed':
                raise Exception(f"Video creation failed: {status_response.json()}")

            time.sleep(5)

        return job_result

    except requests.exceptions.RequestException as error:
        print(f"Error: {error}")
        if hasattr(error, 'response') and error.response is not None:
            print(f"Response: {error.response.text}")
        raise

if __name__ == '__main__':
    create_video_to_shorts()
```

## Understanding the Parameters

### Main Request Parameters

| Parameter | Type | Required | Description |
| - | - | - | - |
| `videoName` | string | Yes | A descriptive name for your video project |
| `scenes` | array | Yes | Array of scene objects |

### Scene Parameters

| Parameter | Type | Required | Description |
| - | - | - | - |
| `videoUrl` | string | Yes | Public URL to the long-form source video file |
| `audioLanguage` | string | Yes | Language code for audio transcription (e.g., "en-US") |
| `mediaRepurposeSettings` | object | No | Optional settings for highlight extraction |

### Media Repurpose Settings (Optional)

| Parameter | Type | Description |
| - | - | - |
| `highlightLength` | number | Target highlight duration in seconds (5-180) |
| `removeFillerWords` | boolean | Remove filler words from transcription |
| `removeSilences` | boolean | Remove silent portions from video |
| `silenceThresholdSeconds` | number | Silence threshold in seconds (0-10) |

## Supported Video Formats

| Format | Extension | Description | Quality |
| - | - | - | - |
| MP4 | `.mp4` | Most common format (recommended) | Excellent |
| MOV | `.mov` | Apple QuickTime format | Excellent |
| AVI | `.avi` | Windows video format | Good |
| MKV | `.mkv` | Matroska multimedia container | Excellent |
| WebM | `.webm` | Web video format | Good |
| WMV | `.wmv` | Windows Media Video | Good |

> [!TIP]
>
> **Best Format:** Use MP4 (H.264 codec) for the best balance of quality, compatibility, and processing speed.

## Ideal Clip Durations by Platform

| Platform | Ideal Duration | Maximum Length | Notes |
| - | - | - | - |
| TikTok | 15-60 seconds | 10 minutes | Shorter is better (under 60s) |
| Instagram Reels | 15-90 seconds | 90 seconds | Sweet spot: 30-60 seconds |
| YouTube Shorts | 15-60 seconds | 60 seconds | Must be vertical or square |
| Twitter/X | 15-45 seconds | 2 minutes 20 seconds | Concise content performs best |
| LinkedIn | 30-90 seconds | 10 minutes | Professional, value-focused |
| Facebook | 30-90 seconds | 240 minutes | Attention span: first 3 seconds crucial |

## Common Use Cases

### Webinar Highlights for LinkedIn

```javascript theme={null}
{
  videoName: "webinar_key_moments",
  scenes: [{
    videoUrl: "https://storage.example.com/full-webinar.mp4",
    audioLanguage: "en-US"
  }]
}
```

**Result:** Key insights extracted as 30-90 second clips perfect for LinkedIn.

### Podcast to Social Media Clips

```javascript theme={null}
{
  videoName: "podcast_episode_highlights",
  scenes: [{
    videoUrl: "https://storage.example.com/podcast-ep-042.mp4",
    audioLanguage: "en-US"
  }]
}
```

**Result:** Best moments from podcast as shareable social clips.

### Interview Highlights for YouTube Shorts

```javascript theme={null}
{
  videoName: "interview_best_moments",
  scenes: [{
    videoUrl: "https://storage.example.com/full-interview.mp4",
    audioLanguage: "en-US",
    mediaRepurposeSettings: {
      highlightLength: 60,     // 60-second highlights
      removeFillerWords: true
    }
  }]
}
```

**Result:** Most engaging interview segments as short-form content.

### Educational Content for TikTok

```javascript theme={null}
{
  videoName: "lecture_key_points",
  scenes: [{
    videoUrl: "https://storage.example.com/full-lecture.mp4",
    audioLanguage: "en-US",
    mediaRepurposeSettings: {
      highlightLength: 30,     // 30-second highlights for TikTok
      removeSilences: true
    }
  }]
}
```

**Result:** Educational highlights perfect for TikTok's short format.

## Best Practices

> [accordion] Choose Quality Source Videos
>
> Start with high-quality source material:
>
> * **Resolution:** 1080p or higher recommended
> * **Audio Quality:** Clear speech with minimal background noise
> * **Lighting:** Well-lit content produces better clips
> * **Composition:** Centered subjects work best for crops
> * **Engagement:** Videos with natural segment breaks work better

> [accordion] Optimize Video Length
>
> Select appropriate source video duration:
>
> * **10-30 Minutes:** Ideal length for extracting multiple clips
> * **Under 10 Minutes:** May produce fewer highlight options
> * **Over 60 Minutes:** Consider splitting into segments first
> * **Clear Sections:** Videos with distinct topics produce better clips
> * **Pacing:** Varied pacing helps AI identify engaging moments

> [accordion] Ensure Clean Audio
>
> Audio quality directly affects clip selection:
>
> * **Clear Speech:** AI relies on transcription for context
> * **Minimal Noise:** Reduce background sounds
> * **Good Microphones:** Use quality recording equipment
> * **One Speaker:** Single speaker is easier to process
> * **Natural Pauses:** Helps AI identify segment boundaries

> [accordion] Make Videos Publicly Accessible
>
> Ensure your video file can be accessed:
>
> * **Cloud Storage:** Upload to Google Drive, Dropbox, AWS S3, or CDN
> * **Public Link:** Generate direct, public download URL
> * **No Authentication:** URL must work without login
> * **Test Access:** Open in incognito browser to verify
> * **Stable URL:** Ensure link will not expire during processing

> [accordion] Plan for Platform Requirements
>
> Consider your target platform:
>
> * **Aspect Ratio:** 9:16 (vertical) for TikTok, Reels, Shorts
> * **Duration:** Match platform limits (15-60s typical)
> * **Captions:** Auto-generated captions included
> * **Branding:** Add logos and brand elements
> * **Hook:** First 3 seconds crucial for retention

## Troubleshooting

> [accordion] Error: Unable to access video file
>
> **Problem:** The API cannot download or process your video.
>
> **Solution:**
>
> * Verify URL is publicly accessible (test in incognito browser)
> * Ensure it is a direct download link, not streaming or preview link
> * For Google Drive: Share → "Anyone with the link" → Copy link
> * For Dropbox: Create link → change "dl=0" to "dl=1" in URL
> * Check file hasn't been deleted or moved
> * Verify video format is supported (MP4, MOV, AVI, MKV, WebM)

> [accordion] Processing takes very long
>
> **Problem:** Job status shows "in-progress" for extended periods.
>
> **Solution:**
>
> * Processing time is proportional to video length
> * Expected times:
>   * 10-minute video: 15-20 minutes processing
>   * 30-minute video: 30-45 minutes processing
>   * 60-minute video: 60-90 minutes processing
> * Large file sizes take longer to download
> * Check status every 5-10 seconds (not more frequently)
> * If stuck for 2x expected time, contact support with job ID

> [accordion] Generated clips miss important moments
>
> **Problem:** AI does not extract the segments you expected.
>
> **Solution:**
>
> * AI identifies engaging moments based on multiple factors
> * Ensure important moments have:
>   * Clear, distinct speech
>   * Visual changes or action
>   * Natural pauses before/after
>   * Energy in delivery
> * Consider manually selecting specific segments instead
> * Longer source videos give more clip options

> [accordion] Clips have poor audio quality
>
> **Problem:** Generated clips have muffled or unclear audio.
>
> **Solution:**
>
> * Check source video audio quality
> * Use higher bitrate audio in source (128kbps minimum)
> * Reduce background noise in source video
> * Ensure consistent audio levels throughout
> * Re-export source video with better audio settings
> * Try audio enhancement tools before uploading

> [accordion] Transcription is inaccurate
>
> **Problem:** Auto-generated captions do not match audio.
>
> **Solution:**
>
> * Improve source audio quality
> * Reduce background music volume
> * Ensure clear speech (not too fast)
> * Minimize overlapping speakers
> * Check for audio distortion or clipping
> * Consider professional audio editing

> [accordion] No clips generated
>
> **Problem:** API completes but does not return highlight clips.
>
> **Solution:**
>
> * Verify videoToVideo parameter is set to true
> * Check source video contains clear speech
> * Ensure video is not purely music or sound effects
> * Try with different source video to test
> * Verify source video is not corrupted
> * Contact support if issue persists with valid content

## Next Steps

Enhance your short-form videos with these features:

> [card] [Background Music](https://docs.pictory.ai/guides/advanced-features/background-music.md)
>
> Add music to your short clips

> [card] [Custom Captions](https://docs.pictory.ai/guides/text-to-video/text-to-video-captions.md)
>
> Customize auto-generated captions

> [card] [Brand Settings](https://docs.pictory.ai/guides/branding-customization/brand-settings.md)
>
> Apply consistent branding to clips

> [card] [Logo Watermark](https://docs.pictory.ai/guides/branding-customization/logo.md)
>
> Add your logo to all clips

## API Reference

For complete technical details, see:

* [Render Storyboard Video](https://docs.pictory.ai/api-reference/videos/render-storyboard-video.md) - Full API specification
* [Get Job Status](https://docs.pictory.ai/api-reference/jobs/get-video-render-job-by-id.md) - Monitor job status and progress


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.