Skip to main content
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

Intro Scenes

Add branded intro scenes with static images

Outro Scenes

Add outro scenes with video backgrounds

Duration Control

Set precise durations for intro/outro scenes

Scene Composition

Combine intro, content, and outro scenes

Before You Begin

Make sure you have:
  • A Pictory API key (get one here)
  • 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
npm install axios

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

Complete Example

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();

Scene Configuration Parameters

Background Configuration

ParameterTypeRequiredDescription
background.typestringYesType of background visual. Options: "image" or "video"
background.visualUrlstringYesPublic URL to the background image or video file

Scene Duration

ParameterTypeRequiredDescription
minimumDurationnumberYes*Duration in seconds for background-only scenes. *Required for scenes without story content.
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 won’t know how long to show the intro/outro.

Supported File Formats

Intro Images

FormatExtensionResolution RecommendationNotes
PNG.png1920x1080 or higherBest for transparency, logos
JPEG/JPG.jpg, .jpeg1920x1080 or higherBest for photographs, smaller files
WebP.webp1920x1080 or higherModern format, good compression

Outro Videos

FormatExtensionRecommendationNotes
MP4.mp4H.264 codec (recommended)Best compatibility
MOV.movH.264 codecApple format, widely supported
WebM.webmVP9 codecModern web format
AVI.aviVarious codecsLarger file sizes
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
Choose the right duration based on your content type and platform:
Scene TypeDuration RangeBest Used ForPlatform
Quick Intro2-3 secondsFast-paced social media, short videosTikTok, Instagram Reels
Standard Intro4-5 secondsMost general content, professional videosYouTube, LinkedIn
Detailed Intro6-8 secondsTutorials, educational contentYouTube, Course platforms
Short Outro3-5 secondsQuick call-to-action, social mediaInstagram, Twitter/X
Standard Outro5-8 secondsSubscribe prompts, contact informationYouTube, Facebook
Extended Outro10-15 secondsDetailed CTAs, credits, multiple linksYouTube, Webinars
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

Scene Types Explained

Background-Only Scene (Intro/Outro)

{
  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

{
  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

{
  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

{
  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

{
  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

{
  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

{
  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

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
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
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
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
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 won’t 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

Troubleshooting

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 don’t need minimumDuration
  • Verify you haven’t accidentally omitted this required field
Problem: Final video doesn’t 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
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)
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 isn’t already low quality
  • Ensure image aspect ratio matches video (16:9 for most platforms)
  • Test with different image files to isolate the issue
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
Problem: Intro appears at end, or scenes are in wrong order.Solution:
  • Scenes appear in the order they’re 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]
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

Advanced Configurations

Multiple Content Scenes with Intro/Outro

{
  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

{
  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

{
  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:

API Reference

For complete technical details, see: