> ## 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.

# Intro and Outro Scenes

> Add branded intro images and outro videos to create professional, polished videos with consistent branding

This guide shows you how to add professional intro and outro scenes to your videos. Use static images for branded intros and video clips for dynamic outros, perfect for creating consistent, professional-looking content across all your videos.

## What You'll Learn

<CardGroup cols={2}>
  <Card title="Intro Scenes" icon="photo-film">
    Add branded intro scenes with static images
  </Card>

  <Card title="Outro Scenes" icon="video">
    Add outro scenes with video backgrounds
  </Card>

  <Card title="Duration Control" icon="clock">
    Set precise durations for intro/outro scenes
  </Card>

  <Card title="Scene Composition" icon="layer-group">
    Combine intro, content, and outro scenes
  </Card>
</CardGroup>

## 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
* Intro image and/or outro video accessible via public URLs
* Basic understanding of scene configuration in Pictory API

<CodeGroup>
  ```bash npm theme={null}
  npm install axios
  ```

  ```bash pip theme={null}
  pip install requests
  ```
</CodeGroup>

## How Intro and Outro Scenes Work

When you add intro and outro scenes to your video:

1. **Scene Definition** - You define scenes with background visuals (images or videos)
2. **Duration Setting** - Specify minimum duration for background-only scenes
3. **Scene Ordering** - Scenes are arranged in order: intro → content → outro
4. **Visual Processing** - Background images and videos are processed and prepared
5. **Audio Integration** - Background music and audio tracks are synchronized
6. **Scene Assembly** - All scenes are combined into a single video
7. **Video Rendering** - Final video is rendered with intro, content, and outro

<Note>
  Background-only scenes (intro/outro without text) require a `minimumDuration` to specify how long they should display. Content scenes with text calculate duration automatically based on voice-over and text length.
</Note>

## Complete Example

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

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

  // URLs to your intro image and outro video (must be publicly accessible)
  const INTRO_IMAGE_URL = "https://example.com/your-intro-image.png";
  const OUTRO_VIDEO_URL = "https://example.com/your-outro-video.mp4";

  const STORY_TEXT =
    "AI is poised to significantly impact educators and course creators on social media. " +
    "By automating tasks like content generation, visual design, and video editing, " +
    "AI will save time and enhance consistency.";

  async function createVideoWithIntroOutro() {
    try {
      console.log("Creating video with intro and outro scenes...");

      const response = await axios.post(
        `${API_BASE_URL}/v2/video/storyboard/render`,
        {
          videoName: "video_with_intro_outro",

          scenes: [
            // INTRO SCENE: Branded intro with static image
            {
              background: {
                type: "image",                   // Use static image
                visualUrl: INTRO_IMAGE_URL,      // Your intro image URL
              },
              minimumDuration: 5,                // Display for 5 seconds
            },

            // MAIN CONTENT SCENE: Generated from text
            {
              story: STORY_TEXT,
              createSceneOnNewLine: true,
              createSceneOnEndOfSentence: true,
            },

            // OUTRO SCENE: Outro with video background
            {
              background: {
                type: "video",                   // Use video background
                visualUrl: OUTRO_VIDEO_URL,      // Your outro video URL
              },
              minimumDuration: 5,                // Display for 5 seconds
            },
          ],
        },
        {
          headers: {
            "Content-Type": "application/json",
            Authorization: API_KEY,
          },
        }
      );

      const jobId = response.data.data.jobId;
      console.log("✓ Video creation 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✓ Video with intro and outro is ready!");
          console.log("Video URL:", jobResult.data.videoURL);
        } 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;
    }
  }

  createVideoWithIntroOutro();
  ```

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

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

  # URLs to your intro image and outro video (must be publicly accessible)
  INTRO_IMAGE_URL = "https://example.com/your-intro-image.png"
  OUTRO_VIDEO_URL = "https://example.com/your-outro-video.mp4"

  STORY_TEXT = (
      "AI is poised to significantly impact educators and course creators on social media. "
      "By automating tasks like content generation, visual design, and video editing, "
      "AI will save time and enhance consistency."
  )

  def create_video_with_intro_outro():
      try:
          print("Creating video with intro and outro scenes...")

          response = requests.post(
              f'{API_BASE_URL}/v2/video/storyboard/render',
              json={
                  'videoName': 'video_with_intro_outro',

                  'scenes': [
                      # INTRO SCENE: Branded intro with static image
                      {
                          'background': {
                              'type': 'image',                   # Use static image
                              'visualUrl': INTRO_IMAGE_URL       # Your intro image URL
                          },
                          'minimumDuration': 5                   # Display for 5 seconds
                      },

                      # MAIN CONTENT SCENE: Generated from text
                      {
                          'story': STORY_TEXT,
                          'createSceneOnNewLine': True,
                          'createSceneOnEndOfSentence': True
                      },

                      # OUTRO SCENE: Outro with video background
                      {
                          'background': {
                              'type': 'video',                   # Use video background
                              'visualUrl': OUTRO_VIDEO_URL       # Your outro video URL
                          },
                          'minimumDuration': 5                   # Display for 5 seconds
                      }
                  ]
              },
              headers={
                  'Content-Type': 'application/json',
                  'Authorization': API_KEY
              }
          )
          response.raise_for_status()

          job_id = response.json()['data']['jobId']
          print("✓ Video creation 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✓ Video with intro and outro is ready!")
                  print(f"Video URL: {job_result['data']['videoURL']}")
              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_with_intro_outro()
  ```
</CodeGroup>

## Scene Configuration Parameters

### Background Configuration

| Parameter              | Type   | Required | Description                                                |
| ---------------------- | ------ | -------- | ---------------------------------------------------------- |
| `background.type`      | string | Yes      | Type of background visual. Options: `"image"` or `"video"` |
| `background.visualUrl` | string | Yes      | Public URL to the background image or video file           |

### Scene Duration

| Parameter         | Type   | Required | Description                                                                                    |
| ----------------- | ------ | -------- | ---------------------------------------------------------------------------------------------- |
| `minimumDuration` | number | Yes\*    | Duration in seconds for background-only scenes. \*Required for scenes without `story` content. |

<Warning>
  **minimumDuration Required:** Scenes with only background visuals (no `story` text) must include `minimumDuration` to specify how long the scene should display. Without it, the API will not know how long to show the intro/outro.
</Warning>

## Supported File Formats

### Intro Images

| Format   | Extension       | Resolution Recommendation | Notes                               |
| -------- | --------------- | ------------------------- | ----------------------------------- |
| PNG      | `.png`          | 1920x1080 or higher       | Best for transparency, logos        |
| JPEG/JPG | `.jpg`, `.jpeg` | 1920x1080 or higher       | Best for photographs, smaller files |
| WebP     | `.webp`         | 1920x1080 or higher       | Modern format, good compression     |

### Outro Videos

| Format | Extension | Recommendation            | Notes                          |
| ------ | --------- | ------------------------- | ------------------------------ |
| MP4    | `.mp4`    | H.264 codec (recommended) | Best compatibility             |
| MOV    | `.mov`    | H.264 codec               | Apple format, widely supported |
| WebM   | `.webm`   | VP9 codec                 | Modern web format              |
| AVI    | `.avi`    | Various codecs            | Larger file sizes              |

<Tip>
  **Best Practices:**

  * **Intro images**: Use PNG with 1920x1080 resolution for crisp, professional branding
  * **Outro videos**: Use MP4 with H.264 codec at 1080p for best quality and compatibility
  * **File size**: Keep images under 5MB and videos under 50MB for faster processing
</Tip>

## Recommended Durations

Choose the right duration based on your content type and platform:

| Scene Type     | Duration Range | Best Used For                             | Platform                  |
| -------------- | -------------- | ----------------------------------------- | ------------------------- |
| Quick Intro    | 2-3 seconds    | Fast-paced social media, short videos     | TikTok, Instagram Reels   |
| Standard Intro | 4-5 seconds    | Most general content, professional videos | YouTube, LinkedIn         |
| Detailed Intro | 6-8 seconds    | Tutorials, educational content            | YouTube, Course platforms |
| Short Outro    | 3-5 seconds    | Quick call-to-action, social media        | Instagram, Twitter/X      |
| Standard Outro | 5-8 seconds    | Subscribe prompts, contact information    | YouTube, Facebook         |
| Extended Outro | 10-15 seconds  | Detailed CTAs, credits, multiple links    | YouTube, Webinars         |

<Note>
  **Platform-Specific Recommendations:**

  * **TikTok/Instagram Reels**: Keep intro under 3 seconds (viewers scroll quickly)
  * **YouTube**: 4-6 second intro is ideal (establishes brand without losing viewers)
  * **Professional/Corporate**: 5-8 seconds works well for polished presentation
  * **Educational**: Can use longer intros (6-8 seconds) for course branding
</Note>

## Scene Types Explained

### Background-Only Scene (Intro/Outro)

```javascript theme={null}
{
  background: {
    type: "image",           // or "video"
    visualUrl: "https://..."
  },
  minimumDuration: 5         // Required
}
```

**Characteristics:**

* No `story` text content
* Static visual display
* Fixed duration via `minimumDuration`
* Perfect for branded intros and outros

### Content Scene with Text

```javascript theme={null}
{
  story: "Your content text here...",
  createSceneOnNewLine: true,
  createSceneOnEndOfSentence: true
}
```

**Characteristics:**

* Has `story` text content
* Duration calculated automatically from text length
* AI selects background visuals automatically
* `minimumDuration` not needed (optional)

### Content Scene with Custom Background

```javascript theme={null}
{
  story: "Your content text here...",
  background: {
    type: "video",
    visualUrl: "https://..."
  }
  // minimumDuration optional - calculated from text
}
```

**Characteristics:**

* Has both text and custom background
* Duration calculated from text length
* Custom visual instead of AI-selected
* Combines both approaches

## Common Use Cases

### YouTube Videos with Branding

```javascript theme={null}
{
  scenes: [
    // Intro: Channel branding
    {
      background: {
        type: "image",
        visualUrl: "https://storage.example.com/youtube-intro.png"
      },
      minimumDuration: 4         // Standard YouTube intro
    },

    // Main content
    { story: "Your video content...", createSceneOnNewLine: true },

    // Outro: Subscribe prompt
    {
      background: {
        type: "video",
        visualUrl: "https://storage.example.com/subscribe-outro.mp4"
      },
      minimumDuration: 8         // Time for subscribe animation
    }
  ]
}
```

**Result:** Professional YouTube video with channel intro and subscribe outro.

### Social Media Quick Posts

```javascript theme={null}
{
  scenes: [
    // Quick brand flash
    {
      background: {
        type: "image",
        visualUrl: "https://storage.example.com/brand-logo.png"
      },
      minimumDuration: 2         // Fast intro for social
    },

    // Content
    { story: "Quick tip or announcement...", createSceneOnNewLine: true },

    // No outro - keep it short for social media
  ]
}
```

**Result:** Quick social media video with brief brand intro, no outro for maximum engagement retention.

### Educational Course Videos

```javascript theme={null}
{
  scenes: [
    // Course branding intro
    {
      background: {
        type: "video",
        visualUrl: "https://storage.example.com/course-intro.mp4"
      },
      minimumDuration: 6         // Establish course branding
    },

    // Lesson content
    { story: "Today's lesson content...", createSceneOnEndOfSentence: true },

    // Outro with next lesson prompt
    {
      background: {
        type: "image",
        visualUrl: "https://storage.example.com/next-lesson.png"
      },
      minimumDuration: 10        // Time to read next steps
    }
  ]
}
```

**Result:** Professional educational video with course branding and next-lesson call-to-action.

### Marketing Videos with CTA

```javascript theme={null}
{
  scenes: [
    // Product/brand intro
    {
      background: {
        type: "image",
        visualUrl: "https://storage.example.com/product-intro.png"
      },
      minimumDuration: 5
    },

    // Marketing message
    { story: "Discover our amazing new product...", createSceneOnNewLine: true },

    // Strong CTA outro
    {
      background: {
        type: "video",
        visualUrl: "https://storage.example.com/cta-outro.mp4"
      },
      minimumDuration: 7         // Time for CTA to register
    }
  ]
}
```

**Result:** Marketing video with product intro and compelling call-to-action outro.

## Best Practices

<AccordionGroup>
  <Accordion title="Keep Intros Short and Engaging">
    Viewers have short attention spans - make intros count:

    * **3-5 Seconds Ideal**: Most viewers will tolerate a 3-5 second intro
    * **Front-Load Value**: Show what the video is about quickly
    * **Branded but Brief**: Establish brand without being tedious
    * **Platform Matters**: Social media needs shorter intros (2-3s) than YouTube (4-6s)
    * **Skip Option**: Consider if viewers can skip long intros on your platform
    * **Test Retention**: Monitor if long intros cause viewer drop-off
  </Accordion>

  <Accordion title="Design Effective Outros">
    Use outros strategically to drive action:

    * **Clear Call-to-Action**: Tell viewers exactly what to do next
    * **Single Focus**: One primary CTA (subscribe, visit website, next video)
    * **Sufficient Duration**: 5-8 seconds for viewers to read and act
    * **Visual Hierarchy**: Make the CTA visually prominent
    * **End Screens**: For YouTube, align with end screen timing (last 20 seconds)
    * **Contact Info**: Include relevant links, social handles, or contact details
  </Accordion>

  <Accordion title="Optimize File Quality and Size">
    Balance quality with processing speed:

    * **Resolution**: Use 1920x1080 (Full HD) for professional quality
    * **Image Size**: Keep images under 5MB for faster upload/processing
    * **Video Size**: Keep outro videos under 50MB when possible
    * **Compression**: Use appropriate compression without sacrificing quality
    * **Format**: MP4 for videos, PNG/JPEG for images for best compatibility
    * **Test First**: Verify files render correctly before using in production
  </Accordion>

  <Accordion title="Maintain Brand Consistency">
    Create a cohesive brand experience:

    * **Reuse Assets**: Use the same intro/outro across video series
    * **Brand Colors**: Match intro/outro to brand color palette
    * **Logo Placement**: Consistent logo positioning across videos
    * **Typography**: Use brand fonts in intro/outro designs
    * **Style Guide**: Maintain visual consistency across all branded elements
    * **Template Library**: Build a library of reusable intro/outro templates
  </Accordion>

  <Accordion title="Ensure File Accessibility">
    Make sure your files can be accessed by the API:

    * **Public URLs**: Upload to cloud storage (AWS S3, Google Drive, Dropbox)
    * **Direct Links**: Use direct download URLs, not streaming or preview links
    * **Stable URLs**: Ensure links will not expire during processing
    * **Test Access**: Verify URLs work in incognito browser
    * **Permissions**: Check file sharing permissions are set to public
    * **HTTPS**: Use HTTPS URLs for security and reliability
  </Accordion>
</AccordionGroup>

## Troubleshooting

<AccordionGroup>
  <Accordion title="Error: minimumDuration required">
    **Problem:** API returns error about missing `minimumDuration` for intro/outro scene.

    **Solution:**

    * Background-only scenes (no `story` text) require `minimumDuration`
    * Add `minimumDuration` in seconds to your intro/outro scenes
    * Example: `{ background: {...}, minimumDuration: 5 }`
    * Content scenes with `story` text do not need `minimumDuration`
    * Verify you have not accidentally omitted this required field
  </Accordion>

  <Accordion title="Intro/outro visual not appearing">
    **Problem:** Final video does not include intro or outro scene.

    **Solution:**

    * Verify the `visualUrl` is publicly accessible (test in incognito browser)
    * Check file format is supported (PNG, JPEG for images; MP4, MOV for videos)
    * Ensure URL is a direct link, not a preview or sharing page
    * For Google Drive: Use "Anyone with link" sharing and get direct download URL
    * For Dropbox: Change "dl=0" to "dl=1" at end of share URL
    * Verify file hasn't been deleted or moved
    * Check API response for any error messages about the visual
  </Accordion>

  <Accordion title="Intro/outro duration too short or too long">
    **Problem:** Intro or outro displays for incorrect amount of time.

    **Solution:**

    * Check the `minimumDuration` value is in seconds, not milliseconds
    * Verify you set the intended duration (e.g., 5 for 5 seconds)
    * For video backgrounds, duration cannot exceed the video file's length
    * Scene will use the longer of `minimumDuration` or actual video length
    * Test different duration values to find the right timing
    * Consider platform norms (social media = shorter, YouTube = longer)
  </Accordion>

  <Accordion title="Image quality is poor or pixelated">
    **Problem:** Intro image appears blurry or low quality in final video.

    **Solution:**

    * Use high-resolution images (minimum 1920x1080 for Full HD)
    * Avoid upscaling small images - create them at target resolution
    * Use PNG format for graphics and logos (lossless)
    * For JPEG, use high quality settings (90%+ quality)
    * Check source image is not already low quality
    * Ensure image aspect ratio matches video (16:9 for most platforms)
    * Test with different image files to isolate the issue
  </Accordion>

  <Accordion title="Outro video has no audio">
    **Problem:** Outro video clip plays without sound in final video.

    **Solution:**

    * Background videos in intro/outro scenes may not include audio by default
    * Add background music separately using the `backgroundMusic` parameter
    * Verify outro video file actually contains audio track
    * Check if audio is being mixed correctly with other audio layers
    * Consider that outro visuals and audio may be handled separately
    * Use background music for consistent audio across all scenes
  </Accordion>

  <Accordion title="Scene order is incorrect">
    **Problem:** Intro appears at end, or scenes are in wrong order.

    **Solution:**

    * Scenes appear in the order they are listed in the `scenes` array
    * Ensure intro scene is first in the array
    * Ensure outro scene is last in the array
    * Content scenes go between intro and outro
    * Double-check array order in your code
    * Example order: `[intro_scene, content_scene, outro_scene]`
  </Accordion>

  <Accordion title="Cannot access intro/outro file URLs">
    **Problem:** API cannot download your intro image or outro video.

    **Solution:**

    * Verify files are publicly accessible (test URL in incognito browser)
    * Check file sharing permissions are set correctly
    * Ensure URLs are direct download links, not web pages
    * For cloud storage, verify sharing settings allow public access
    * Test URL with curl or browser to confirm it downloads the file
    * Check for expired sharing links or restricted access
    * Try uploading to different hosting service if issues persist
  </Accordion>
</AccordionGroup>

## Advanced Configurations

### Multiple Content Scenes with Intro/Outro

```javascript theme={null}
{
  scenes: [
    // Intro
    {
      background: { type: "image", visualUrl: "..." },
      minimumDuration: 5
    },

    // Multiple content scenes
    { story: "First section...", createSceneOnNewLine: true },
    { story: "Second section...", createSceneOnEndOfSentence: true },
    { story: "Third section...", createSceneOnNewLine: true },

    // Outro
    {
      background: { type: "video", visualUrl: "..." },
      minimumDuration: 8
    }
  ]
}
```

### Intro/Outro with Background Music

```javascript theme={null}
{
  backgroundMusic: {
    enabled: true,
    musicUrl: "https://storage.example.com/background-music.mp3",
    volume: 0.3
  },
  scenes: [
    // Intro scene
    {
      background: { type: "image", visualUrl: "..." },
      minimumDuration: 5
    },

    // Content
    { story: "...", createSceneOnNewLine: true },

    // Outro scene
    {
      background: { type: "video", visualUrl: "..." },
      minimumDuration: 7
    }
  ]
}
```

### Intro/Outro with Branding

```javascript theme={null}
{
  brandName: "Your Brand Name",      // Apply brand settings
  scenes: [
    // Intro
    {
      background: { type: "image", visualUrl: "..." },
      minimumDuration: 4
    },

    // Content (branded)
    { story: "...", createSceneOnNewLine: true },

    // Outro
    {
      background: { type: "video", visualUrl: "..." },
      minimumDuration: 6
    }
  ]
}
```

## Next Steps

Enhance your intro/outro videos with these complementary features:

<CardGroup cols={2}>
  <Card title="Brand Settings" icon="palette" href="/guides/branding-customization/brand-settings">
    Apply consistent branding to all video elements
  </Card>

  <Card title="Background Music" icon="music" href="/guides/advanced-features/background-music">
    Add music to complement intro/outro scenes
  </Card>

  <Card title="Logo Overlay" icon="image" href="/guides/branding-customization/logo">
    Add logo watermarks to your videos
  </Card>

  <Card title="Custom Subtitle Styling" icon="closed-captioning" href="/guides/branding-customization/custom-subtitle-style">
    Style subtitles to match your brand
  </Card>
</CardGroup>

## API Reference

For complete technical details, see:

* [Render Storyboard Video](/api-reference/videos/render-storyboard-video) - Full API specification including scene configuration
* [Get Job Status](/api-reference/jobs/get-video-render-job-by-id) - Monitor job status and get video URLs
