Advanced Operations
The advanced operations category provides sophisticated video production tools for complex composition, effects, and professional video creation workflows. These tools enable you to create professional-quality content with multiple video sources, advanced effects, and automated processing.
🎬 Available Tools
Section titled “🎬 Available Tools”create_video_slideshow
Section titled “create_video_slideshow”Generate dynamic slideshows from image collections with customizable transitions.
create_video_slideshow( image_folder: str, output_path: str, duration_per_image: float = 3.0, transition_duration: float = 1.0, fps: int = 30, resolution: str = "1920x1080", audio_path: str = None, ctx: Context = None) -> str
Parameters:
Parameter | Type | Description |
---|---|---|
image_folder | str | Directory containing images for slideshow |
output_path | str | Path for the output slideshow video |
duration_per_image | float | Display time per image in seconds (default: 3.0) |
transition_duration | float | Transition duration between images (default: 1.0) |
fps | int | Frame rate of output video (default: 30) |
resolution | str | Output resolution (default: "1920x1080") |
audio_path | str | Optional background audio file |
ctx | Context | Optional context for progress reporting |
Example Usage:
# Basic slideshow from wedding photosresult = await session.call_tool("create_video_slideshow", { "image_folder": "wedding_photos/", "output_path": "wedding_slideshow.mp4", "duration_per_image": 4.0, "transition_duration": 1.5, "resolution": "1920x1080"})
# Slideshow with background musicresult = await session.call_tool("create_video_slideshow", { "image_folder": "vacation_pics/", "output_path": "vacation_memories.mp4", "duration_per_image": 3.5, "transition_duration": 1.0, "audio_path": "background_music.mp3", "fps": 30})
# Quick preview slideshowresult = await session.call_tool("create_video_slideshow", { "image_folder": "product_shots/", "output_path": "product_preview.mp4", "duration_per_image": 2.0, "transition_duration": 0.5, "resolution": "1280x720"})
Supported Image Formats:
- JPG/JPEG
- PNG
- BMP
- TIFF
- WebP
create_video_mosaic
Section titled “create_video_mosaic”Create sophisticated multi-video grid layouts with customizable arrangements.
create_video_mosaic( input_paths: list[str], output_path: str, layout: str = "2x2", width: int = 1920, height: int = 1080, border_width: int = 2, border_color: str = "black", audio_source: str = "mix", ctx: Context = None) -> str
Parameters:
Parameter | Type | Description |
---|---|---|
input_paths | list[str] | List of video file paths for mosaic |
output_path | str | Path for the output mosaic video |
layout | str | Grid layout format (e.g., "2x2", "3x1", "4x2") |
width | int | Output video width in pixels (default: 1920) |
height | int | Output video height in pixels (default: 1080) |
border_width | int | Border width between videos in pixels (default: 2) |
border_color | str | Border color name or hex code (default: "black") |
audio_source | str | "mix", "first", "none", or index number (default: "mix") |
ctx | Context | Optional context for progress reporting |
Example Usage:
# Security camera grid (2x2)result = await session.call_tool("create_video_mosaic", { "input_paths": [ "camera1.mp4", "camera2.mp4", "camera3.mp4", "camera4.mp4" ], "output_path": "security_grid.mp4", "layout": "2x2", "border_width": 4, "border_color": "white", "audio_source": "none"})
# Comparison layout (1x3)result = await session.call_tool("create_video_mosaic", { "input_paths": [ "original.mp4", "version_a.mp4", "version_b.mp4" ], "output_path": "comparison.mp4", "layout": "1x3", "width": 1920, "height": 640, "border_width": 2, "audio_source": "first" # Use audio from first video})
# Social media split screen (2x1)result = await session.call_tool("create_video_mosaic", { "input_paths": [ "presenter.mp4", "screen_share.mp4" ], "output_path": "presentation.mp4", "layout": "2x1", "width": 1920, "height": 1080, "border_color": "#333333", "audio_source": "mix"})
Layout Options:
- Square: 2x2, 3x3, 4x4
- Horizontal: 1x2, 1x3, 1x4
- Vertical: 2x1, 3x1, 4x1
- Mixed: 2x3, 3x2, custom arrangements
create_picture_in_picture
Section titled “create_picture_in_picture”Create professional picture-in-picture overlays with precise positioning and effects.
create_picture_in_picture( main_video: str, overlay_video: str, output_path: str, position: str = "top-right", scale: float = 0.25, opacity: float = 1.0, x_offset: int = 10, y_offset: int = 10, border_width: int = 0, border_color: str = "white", start_time: float = 0.0, duration: float = None, ctx: Context = None) -> str
Parameters:
Parameter | Type | Description |
---|---|---|
main_video | str | Main background video path |
overlay_video | str | Overlay video path (picture-in-picture) |
output_path | str | Path for the output composed video |
position | str | Overlay position: "top-left", "top-right", "bottom-left", "bottom-right", "center" |
scale | float | Overlay scale factor (0.1 to 1.0, default: 0.25) |
opacity | float | Overlay opacity (0.0 to 1.0, default: 1.0) |
x_offset | int | Horizontal offset from position in pixels (default: 10) |
y_offset | int | Vertical offset from position in pixels (default: 10) |
border_width | int | Border width around overlay in pixels (default: 0) |
border_color | str | Border color name or hex code (default: "white") |
start_time | float | When overlay appears in seconds (default: 0.0) |
duration | float | How long overlay appears (optional, full video if not specified) |
ctx | Context | Optional context for progress reporting |
Example Usage:
# Webcam overlay for presentationresult = await session.call_tool("create_picture_in_picture", { "main_video": "screen_recording.mp4", "overlay_video": "webcam_feed.mp4", "output_path": "presentation_with_webcam.mp4", "position": "bottom-right", "scale": 0.2, "x_offset": 20, "y_offset": 20, "border_width": 3, "border_color": "#0066cc"})
# Commentary overlayresult = await session.call_tool("create_picture_in_picture", { "main_video": "gameplay.mp4", "overlay_video": "commentary.mp4", "output_path": "gameplay_with_commentary.mp4", "position": "top-left", "scale": 0.3, "opacity": 0.9, "start_time": 5.0, "duration": 120.0 # 2 minutes})
# Centered watermark overlayresult = await session.call_tool("create_picture_in_picture", { "main_video": "main_content.mp4", "overlay_video": "logo_animation.mp4", "output_path": "branded_content.mp4", "position": "center", "scale": 0.15, "opacity": 0.7, "start_time": 0.0, "duration": 10.0 # Logo appears for first 10 seconds})
create_time_lapse
Section titled “create_time_lapse”Convert normal-speed footage into dynamic time-lapse videos with stabilization options.
create_time_lapse( input_path: str, output_path: str, speed_factor: float = 10.0, stabilize: bool = True, smoothing: float = 15.0, final_fps: int = 30, ctx: Context = None) -> str
Parameters:
Parameter | Type | Description |
---|---|---|
input_path | str | Source video file path |
output_path | str | Path for the time-lapse output video |
speed_factor | float | Speed multiplier (default: 10.0 = 10x faster) |
stabilize | bool | Whether to apply stabilization (default: True) |
smoothing | float | Stabilization smoothing strength (default: 15.0) |
final_fps | int | Output frame rate (default: 30) |
ctx | Context | Optional context for progress reporting |
Example Usage:
# Construction time-lapseresult = await session.call_tool("create_time_lapse", { "input_path": "construction_8hours.mp4", "output_path": "construction_timelapse.mp4", "speed_factor": 60.0, # 60x speed = 8 hours in 8 minutes "stabilize": True, "smoothing": 20.0, "final_fps": 30})
# Sunset time-lapseresult = await session.call_tool("create_time_lapse", { "input_path": "sunset_2hours.mp4", "output_path": "sunset_timelapse.mp4", "speed_factor": 30.0, # 30x speed = 2 hours in 4 minutes "stabilize": True, "smoothing": 10.0})
# Fast cooking demoresult = await session.call_tool("create_time_lapse", { "input_path": "cooking_1hour.mp4", "output_path": "cooking_fast.mp4", "speed_factor": 15.0, # 15x speed = 1 hour in 4 minutes "stabilize": False, # No stabilization for handheld cooking video "final_fps": 24})
Speed Factor Guidelines:
- 2-5x: Slow activities (painting, gardening)
- 10-20x: Medium activities (cooking, setup)
- 30-60x: Long processes (construction, events)
- 100x+: Very long processes (plant growth, weather)
create_video_transitions
Section titled “create_video_transitions”Add professional transitions between video clips for seamless storytelling.
create_video_transitions( input_paths: list[str], output_path: str, transition_type: str = "crossfade", transition_duration: float = 1.0, ctx: Context = None) -> str
Parameters:
Parameter | Type | Description |
---|---|---|
input_paths | list[str] | List of video file paths to connect with transitions |
output_path | str | Path for the output video with transitions |
transition_type | str | Type of transition: "crossfade", "fade", "slide", "wipe" (default: "crossfade") |
transition_duration | float | Duration of each transition in seconds (default: 1.0) |
ctx | Context | Optional context for progress reporting |
Example Usage:
# Smooth crossfade between scenesresult = await session.call_tool("create_video_transitions", { "input_paths": [ "scene1_intro.mp4", "scene2_action.mp4", "scene3_conclusion.mp4" ], "output_path": "smooth_story.mp4", "transition_type": "crossfade", "transition_duration": 2.0})
# Quick cuts with fade transitionsresult = await session.call_tool("create_video_transitions", { "input_paths": [ "clip1.mp4", "clip2.mp4", "clip3.mp4", "clip4.mp4" ], "output_path": "montage.mp4", "transition_type": "fade", "transition_duration": 0.5})
# Professional slide transitionsresult = await session.call_tool("create_video_transitions", { "input_paths": [ "interview_part1.mp4", "broll_footage.mp4", "interview_part2.mp4" ], "output_path": "documentary_sequence.mp4", "transition_type": "slide", "transition_duration": 1.5})
Transition Types:
- crossfade: Gradual blend between clips
- fade: Fade to black between clips
- slide: Sliding motion transition
- wipe: Directional wipe effect
create_loop_video
Section titled “create_loop_video”Create seamlessly looping videos with automatic crossfade blending.
create_loop_video( input_path: str, output_path: str, loop_count: int = 3, crossfade_duration: float = 1.0, trim_ends: bool = True, ctx: Context = None) -> str
Parameters:
Parameter | Type | Description |
---|---|---|
input_path | str | Source video file path |
output_path | str | Path for the looped output video |
loop_count | int | Number of loops (default: 3) |
crossfade_duration | float | Crossfade duration between loops in seconds (default: 1.0) |
trim_ends | bool | Whether to trim start/end for better looping (default: True) |
ctx | Context | Optional context for progress reporting |
Example Usage:
# Background loop for presentationsresult = await session.call_tool("create_loop_video", { "input_path": "abstract_motion.mp4", "output_path": "background_loop.mp4", "loop_count": 5, "crossfade_duration": 2.0, "trim_ends": True})
# Product showcase loopresult = await session.call_tool("create_loop_video", { "input_path": "product_rotation.mp4", "output_path": "product_loop.mp4", "loop_count": 4, "crossfade_duration": 0.5, "trim_ends": False})
# Ambient video loopresult = await session.call_tool("create_loop_video", { "input_path": "nature_scene.mp4", "output_path": "ambient_loop.mp4", "loop_count": 10, "crossfade_duration": 3.0})
🎬 Advanced Workflow Examples
Section titled “🎬 Advanced Workflow Examples”Multi-Camera Production
Section titled “Multi-Camera Production”async def multi_camera_edit(): """Create a multi-camera production with advanced techniques"""
# Step 1: Create picture-in-picture for main + reaction cam await session.call_tool("create_picture_in_picture", { "main_video": "main_camera.mp4", "overlay_video": "reaction_cam.mp4", "output_path": "main_with_reaction.mp4", "position": "bottom-right", "scale": 0.25, "border_width": 2, "border_color": "white" })
# Step 2: Create comparison mosaic for analysis await session.call_tool("create_video_mosaic", { "input_paths": [ "camera_angle_1.mp4", "camera_angle_2.mp4", "camera_angle_3.mp4", "camera_angle_4.mp4" ], "output_path": "all_angles_comparison.mp4", "layout": "2x2", "audio_source": "first" })
# Step 3: Create smooth transitions between best angles await session.call_tool("create_video_transitions", { "input_paths": [ "angle1_best_part.mp4", "angle2_best_part.mp4", "angle3_best_part.mp4" ], "output_path": "final_multicam_edit.mp4", "transition_type": "crossfade", "transition_duration": 1.5 })
print("✅ Multi-camera production complete!")
await multi_camera_edit()
Automated Content Creation
Section titled “Automated Content Creation”async def automated_social_content(): """Automatically create social media content from source material"""
# Step 1: Create slideshow from product images await session.call_tool("create_video_slideshow", { "image_folder": "product_photos/", "output_path": "product_slideshow.mp4", "duration_per_image": 2.5, "transition_duration": 0.8, "resolution": "1080x1080", # Square for Instagram "audio_path": "upbeat_music.mp3" })
# Step 2: Create time-lapse of behind-the-scenes await session.call_tool("create_time_lapse", { "input_path": "behind_scenes_2hours.mp4", "output_path": "bts_timelapse.mp4", "speed_factor": 30.0, "stabilize": True })
# Step 3: Combine with picture-in-picture await session.call_tool("create_picture_in_picture", { "main_video": "product_slideshow.mp4", "overlay_video": "bts_timelapse.mp4", "output_path": "social_content_final.mp4", "position": "top-left", "scale": 0.3, "opacity": 0.8, "start_time": 5.0, "duration": 15.0 })
print("✅ Social media content generated!")
await automated_social_content()
Professional Video Mosaic Dashboard
Section titled “Professional Video Mosaic Dashboard”async def create_video_dashboard(): """Create a professional video monitoring dashboard"""
# Security camera layout security_feeds = [ "camera_entrance.mp4", "camera_parking.mp4", "camera_warehouse.mp4", "camera_office.mp4" ]
await session.call_tool("create_video_mosaic", { "input_paths": security_feeds, "output_path": "security_dashboard.mp4", "layout": "2x2", "width": 1920, "height": 1080, "border_width": 4, "border_color": "#00ff00", # Green borders "audio_source": "none" # No audio for security feed })
# Performance monitoring layout performance_videos = [ "cpu_usage_graph.mp4", "memory_usage_graph.mp4", "network_traffic.mp4" ]
await session.call_tool("create_video_mosaic", { "input_paths": performance_videos, "output_path": "performance_dashboard.mp4", "layout": "1x3", "width": 1920, "height": 640, "border_width": 2, "border_color": "#333333", "audio_source": "none" })
print("✅ Video dashboards created!")
await create_video_dashboard()
🔧 Advanced Tips and Techniques
Section titled “🔧 Advanced Tips and Techniques”Optimizing for Different Platforms
Section titled “Optimizing for Different Platforms”# Platform-specific mosaic configurationsPLATFORM_CONFIGS = { "youtube": { "resolution": (1920, 1080), "layout": "2x2", "border_width": 2 }, "instagram": { "resolution": (1080, 1080), "layout": "2x2", "border_width": 4 }, "tiktok": { "resolution": (1080, 1920), "layout": "2x1", # Vertical stack "border_width": 6 }, "dashboard": { "resolution": (3840, 2160), # 4K for large displays "layout": "3x3", "border_width": 1 }}
Performance Considerations
Section titled “Performance Considerations”- Memory Usage: Complex compositions use more memory
- Processing Time: Multiple video streams take longer to process
- File Size: Output files can be large - consider compression
- Audio Handling: Be mindful of audio mixing in multi-video compositions
Creative Applications
Section titled “Creative Applications”- Educational Content: Multi-angle demonstrations
- Security Systems: Real-time monitoring layouts
- Sports Analysis: Multiple camera angle comparisons
- Live Streaming: Picture-in-picture for commentary
- Marketing: Product showcase combinations
- Training Materials: Step-by-step process documentation
🎯 Next Steps
Section titled “🎯 Next Steps”Ready to explore more advanced video production techniques?
- Specialized Effects - Professional VFX and cinematic effects
- Text & Graphics - Add text overlays and animations
- Analysis & Extraction - Video content analysis
- VFX Compositing Guide - Advanced compositing workflows
Questions about advanced operations? Check our FAQ or explore the examples section for more creative ideas.