Multi-Shot Sequences

Create cinematic sequences with multiple shots while maintaining consistency

Planning Your Sequence

Before generating, plan your sequence like a script:

  • 1.Define the location and environment
  • 2.Introduce your characters and their appearance
  • 3.Plan shot transitions and camera movements
  • 4.Write detailed prompts that reference previous shots

Complete Example

import asyncio
from ministudio import VideoOrchestrator, VideoGenerationRequest
from ministudio.providers import VertexAIProvider

async def main():
    # Initialize
    provider = VertexAIProvider()
    orchestrator = VideoOrchestrator(provider)
    
    # Define sequence
    shots = [
        VideoGenerationRequest(
            prompt="Wide shot of a modern glass skyscraper at sunrise, golden light reflecting off the windows",
            duration_seconds=6,
            aspect_ratio="16:9",
            quality="high"
        ),
        VideoGenerationRequest(
            prompt="Inside a sleek office conference room. A woman in business attire stands by a window overlooking the city",
            duration_seconds=8,
            aspect_ratio="16:9",
            quality="high"
        ),
        VideoGenerationRequest(
            prompt="Close-up of the same woman looking confident, city skyline visible through window behind her",
            duration_seconds=5,
            aspect_ratio="16:9",
            quality="high"
        ),
        VideoGenerationRequest(
            prompt="The woman walks toward a table with laptop and documents, the cityscape still visible",
            duration_seconds=6,
            aspect_ratio="16:9",
            quality="high"
        ),
    ]
    
    # Generate sequence
    results = await orchestrator.generate_sequence(shots)
    
    # Process results
    for i, result in enumerate(results):
        if result.success:
            print(f"Shot {i+1}: {result.video_path}")
            print(f"Duration: {result.duration_seconds}s")
        else:
            print(f"Shot {i+1} failed: {result.error}")
    
    print(f"Sequence complete! Total duration: {orchestrator.get_state().total_duration}s")

if __name__ == "__main__":
    asyncio.run(main())
The orchestrator automatically extracts the last frame from each shot to maintain continuity in the next shot.

Tips for Better Sequences

Maintain Consistency

  • Use the same character descriptions across shots
  • Reference visual elements from previous shots
  • Mention time of day or lighting consistency

Camera Work

  • Start with wide shots to establish location
  • Move to medium shots for interactions
  • Use close-ups for emotional moments

Pacing

  • Longer shots (8-10s) for establishing scenes
  • Medium shots (6-8s) for action
  • Short shots (3-5s) for emphasis or dialogue

Managing State Between Sequences

# Complete first sequence
results1 = await orchestrator.generate_sequence(indoor_shots)

# Reset state for different location
orchestrator.reset()

# Generate new sequence without interference
results2 = await orchestrator.generate_sequence(outdoor_shots)