
Seedance Video Gen
- 8 installs
- 1 repo stars
- Updated July 11, 2026
- simonlee2/claude-plugins
Helps with ai & agent building tasks.
About
seedance-video-gen is a Claude Code skill for ai & agent building. It helps solo builders move faster with AI-assisted coding.
- seedance-video-gen
- AI & Agent Building
- AI-coding skill
Seedance Video Gen by the numbers
- 8 all-time installs (skills.sh)
- Ranked #12,339 of 16,546 AI & Agent Building skills by installs in the Skillselion catalog
- Data as of Aug 5, 2026 (Skillselion catalog sync)
npx skills add https://github.com/simonlee2/claude-plugins --skill seedance-video-genAdd your badge
Show developers this skill is listed on Skillselion. Paste this into your README.
| Installs | 8 |
|---|---|
| repo stars | ★ 1 |
| Last updated | July 11, 2026 |
| Repository | simonlee2/claude-plugins ↗ |
What it does
Helps with ai & agent building tasks.
Files
Seedance Video Generation
Overview
This skill enables AI video generation using ByteDance's Seedance 1.5 Pro model through the Replicate API. Generate videos from text prompts, animate still images, and create content with perfectly synchronized audio and lip-syncing.
Core Capabilities
1. Text-to-Video Generation
Generate videos from natural language descriptions.
Example requests:
- "Generate a video of waves crashing on a beach at sunset"
- "Create a video of a cat playing with a ball of yarn"
- "Make a 10-second video of a city skyline timelapse"
Process: 1. Extract the scene description from the user's request 2. Determine appropriate duration and aspect ratio 3. Execute scripts/generate_video.py with the prompt 4. Save the generated video to the user's working directory
2. Image-to-Video Animation
Animate still images into dynamic videos.
Example requests:
- "Animate this portrait photo with subtle movements"
- "Turn this landscape image into a video with moving clouds"
- "Make this product image come alive with gentle motion"
Process: 1. Ensure the input image is accessible (local file or URL) 2. Upload image to Replicate if needed 3. Execute scripts/generate_video.py with the image and prompt 4. Save the animated video to the user's working directory
3. Audio-Synchronized Video
Generate videos with perfectly synchronized audio and lip movements.
Key features:
- Audio and video generated simultaneously (not sequentially)
- Millisecond-precision lip-sync across multiple languages
- Supported languages: English, Mandarin, Japanese, Korean, Spanish, Portuguese, Indonesian
Example requests:
- "Generate a video of a person saying 'Hello, welcome to my channel'"
- "Create a talking head video explaining quantum physics"
- "Make a video with a character singing a song"
4. Camera Controls
Apply cinematic camera movements to generated videos.
Available movements:
- Pan - Horizontal camera sweep
- Tilt - Vertical camera movement
- Zoom - Move closer or farther from subject
- Tracking - Follow a moving subject
- Orbital - Circle around the subject
Example requests:
- "Generate a video with a slow zoom into the subject"
- "Create a video with the camera panning across a landscape"
- "Make a video with orbital camera movement around the character"
To fix the camera in place, specify "fixed camera" or use the camera_fixed parameter.
Parameters
| Parameter | Type | Default | Description |
|---|---|---|---|
prompt | string | required | Scene description |
duration | int | 5 | Video length in seconds (2-12) |
aspect_ratio | string | 16:9 | Output dimensions |
image | file/URL | none | Input image for image-to-video |
last_frame_image | file/URL | none | Target end frame |
camera_fixed | bool | false | Lock camera position |
generate_audio | bool | true | Include synchronized audio |
seed | int | random | For reproducible results |
Aspect Ratios
16:9- Widescreen (YouTube, presentations)9:16- Vertical (TikTok, Instagram Reels, Stories)1:1- Square (Instagram posts)4:3- Standard (traditional video)3:4- Portrait21:9- Ultra-wide (cinematic)9:21- Ultra-tall
Using the Generation Script
The scripts/generate_video.py script handles all Replicate API interactions.
Basic text-to-video:
python scripts/generate_video.py "a sunset over mountains" --output sunset.mp4With duration and aspect ratio:
python scripts/generate_video.py "a cat playing" \
--duration 8 \
--aspect-ratio 9:16 \
--output cat_playing.mp4Image-to-video:
python scripts/generate_video.py "gentle wind blowing through hair" \
--image portrait.jpg \
--output animated_portrait.mp4Fixed camera:
python scripts/generate_video.py "person talking to camera" \
--camera-fixed \
--output talking_head.mp4Without audio:
python scripts/generate_video.py "abstract visuals" \
--no-audio \
--output silent_video.mp4Reproducible output:
python scripts/generate_video.py "a forest scene" \
--seed 42 \
--output forest.mp4Output Format
- Format: MP4 (H.264 video, AAC audio)
- Frame rate: 24 fps (fixed)
- Audio: Synchronized stereo audio (when enabled)
- Resolution: Varies by aspect ratio (typically 1280x720 or similar)
Environment Setup
Ensure the REPLICATE_API_KEY environment variable is set:
export REPLICATE_API_KEY="your-api-key-here"Get an API key from https://replicate.com/account/api-tokens
Performance Considerations
- Video generation takes 30 seconds to 3 minutes depending on duration and complexity
- Longer videos (10-12 seconds) require more generation time
- Image-to-video may take slightly longer due to image processing
- The script displays progress updates during generation
Best Practices
1. Detailed prompts: More specific descriptions produce better results
- Good: "A golden retriever running through a sunlit meadow with wildflowers, slow motion"
- Less effective: "A dog running"
2. Match aspect ratio to platform: Use 9:16 for TikTok/Reels, 16:9 for YouTube
3. Duration selection: Start with shorter durations (5s) to iterate quickly, then increase
4. Camera guidance: Include camera movement in prompt or use camera_fixed for stability
5. Audio considerations: Disable audio (--no-audio) for videos where you'll add custom music/voiceover
6. Character consistency: For multi-clip narratives, use similar prompts and seed values
Common Use Cases
Social Media Content
# TikTok/Reels vertical video
python scripts/generate_video.py "trendy dance moves in neon-lit studio" \
--aspect-ratio 9:16 --duration 8 --output tiktok_content.mp4Product Showcase
# Animate product image
python scripts/generate_video.py "elegant rotation revealing product details" \
--image product.jpg --duration 6 --output product_showcase.mp4Talking Head / Avatar
# Generate speaking video
python scripts/generate_video.py "professional presenter explaining a concept, direct eye contact" \
--camera-fixed --duration 10 --output presenter.mp4Cinematic B-Roll
# Atmospheric footage
python scripts/generate_video.py "aerial view of misty mountains at dawn, slow pan" \
--aspect-ratio 21:9 --duration 12 --output broll.mp4Limitations
- Maximum duration: 12 seconds per generation
- Fixed frame rate: 24 fps (cannot be changed)
- Audio is generated, not from external source
- Character consistency across clips requires careful prompting
- Complex scenes with multiple characters may have reduced quality
Error Handling
The script handles common errors:
- Missing API key: Clear error message with setup instructions
- Invalid image URL/path: Helpful error with troubleshooting steps
- Rate limiting: Automatic retry with backoff
- Generation failures: Detailed error from Replicate API
Troubleshooting
Video generation stuck:
- Check API key is valid and has credits
- Try a shorter duration first
- Simplify the prompt
Poor lip-sync:
- Ensure prompt clearly describes speaking/dialogue
- Use
camera_fixedfor talking head videos - Keep subject centered in frame description
Unexpected camera movement:
- Add
camera_fixedflag for stable shots - Or specify desired movement explicitly in prompt
Image-to-video not working:
- Ensure image is accessible (valid URL or local path)
- Check image format (JPG, PNG supported)
- Try with a simpler, clearer image
#!/usr/bin/env python3
"""
Seedance Video Generation Script
Generate videos using ByteDance's Seedance 1.5 Pro model via Replicate API.
Supports text-to-video, image-to-video, and audio-synchronized generation.
"""
import argparse
import os
import sys
import time
import urllib.request
from datetime import datetime
from pathlib import Path
try:
import replicate
except ImportError:
print("Error: replicate package not installed.")
print("Install with: pip install replicate")
sys.exit(1)
MODEL_ID = "bytedance/seedance-1.5-pro"
VALID_ASPECT_RATIOS = ["16:9", "4:3", "1:1", "3:4", "9:16", "21:9", "9:21"]
def upload_image_to_replicate(image_path: str) -> str:
"""Upload a local image file to Replicate's file hosting."""
path = Path(image_path)
if not path.exists():
raise FileNotFoundError(f"Image file not found: {image_path}")
print(f"Uploading image: {path.name}...")
with open(path, "rb") as f:
file_output = replicate.files.create(f, filename=path.name)
print(f"Image uploaded successfully")
return file_output.urls["get"]
def get_image_input(image_arg: str) -> str:
"""Process image argument - upload if local file, return URL if already URL."""
if image_arg.startswith(("http://", "https://")):
return image_arg
return upload_image_to_replicate(image_arg)
def generate_video(
prompt: str,
duration: int = 5,
aspect_ratio: str = "16:9",
image: str = None,
last_frame_image: str = None,
camera_fixed: bool = False,
generate_audio: bool = True,
seed: int = None,
) -> str:
"""
Generate a video using Seedance 1.5 Pro.
Args:
prompt: Scene description
duration: Video length in seconds (2-12)
aspect_ratio: Output aspect ratio
image: Optional input image for image-to-video
last_frame_image: Optional target end frame
camera_fixed: Lock camera position
generate_audio: Include synchronized audio
seed: Random seed for reproducibility
Returns:
URL of the generated video
"""
# Validate parameters
if duration < 2 or duration > 12:
raise ValueError(f"Duration must be between 2 and 12 seconds, got {duration}")
if aspect_ratio not in VALID_ASPECT_RATIOS:
raise ValueError(
f"Invalid aspect ratio: {aspect_ratio}. "
f"Valid options: {', '.join(VALID_ASPECT_RATIOS)}"
)
# Build input parameters
input_params = {
"prompt": prompt,
"duration": duration,
"aspect_ratio": aspect_ratio,
"generate_audio": generate_audio,
}
if camera_fixed:
input_params["camera_fixed"] = True
if seed is not None:
input_params["seed"] = seed
# Handle image inputs
if image:
input_params["image"] = get_image_input(image)
if last_frame_image:
input_params["last_frame_image"] = get_image_input(last_frame_image)
print(f"\nGenerating video...")
print(f" Prompt: {prompt[:80]}{'...' if len(prompt) > 80 else ''}")
print(f" Duration: {duration}s")
print(f" Aspect ratio: {aspect_ratio}")
print(f" Audio: {'enabled' if generate_audio else 'disabled'}")
print(f" Camera: {'fixed' if camera_fixed else 'dynamic'}")
if image:
print(f" Input image: provided")
print()
# Run the model
start_time = time.time()
output = replicate.run(MODEL_ID, input=input_params)
elapsed = time.time() - start_time
print(f"\nGeneration completed in {elapsed:.1f} seconds")
# Convert FileOutput object to string URL
return str(output)
def download_video(url: str, output_path: str) -> str:
"""Download video from URL to local file."""
print(f"Downloading video to: {output_path}")
# Create directory if needed
output_dir = os.path.dirname(output_path)
if output_dir:
os.makedirs(output_dir, exist_ok=True)
urllib.request.urlretrieve(url, output_path)
file_size = os.path.getsize(output_path) / (1024 * 1024)
print(f"Downloaded: {file_size:.2f} MB")
return output_path
def main():
parser = argparse.ArgumentParser(
description="Generate videos using Seedance 1.5 Pro via Replicate",
formatter_class=argparse.RawDescriptionHelpFormatter,
epilog="""
Examples:
# Basic text-to-video
%(prog)s "a sunset over mountains" --output sunset.mp4
# Vertical video for TikTok
%(prog)s "trendy dance moves" --aspect-ratio 9:16 --output dance.mp4
# Image-to-video
%(prog)s "gentle motion" --image portrait.jpg --output animated.mp4
# Longer video with fixed camera
%(prog)s "person talking" --duration 10 --camera-fixed --output talking.mp4
# Silent video (no audio)
%(prog)s "abstract visuals" --no-audio --output silent.mp4
""",
)
parser.add_argument("prompt", help="Scene description for video generation")
parser.add_argument(
"--output",
"-o",
help="Output file path (default: generated_video_TIMESTAMP.mp4)",
)
parser.add_argument(
"--duration",
"-d",
type=int,
default=5,
choices=range(2, 13),
metavar="2-12",
help="Video duration in seconds (default: 5)",
)
parser.add_argument(
"--aspect-ratio",
"-a",
default="16:9",
choices=VALID_ASPECT_RATIOS,
help="Output aspect ratio (default: 16:9)",
)
parser.add_argument(
"--image",
"-i",
help="Input image for image-to-video (local path or URL)",
)
parser.add_argument(
"--last-frame",
help="Target end frame image (local path or URL)",
)
parser.add_argument(
"--camera-fixed",
action="store_true",
help="Lock camera position (no movement)",
)
parser.add_argument(
"--no-audio",
action="store_true",
help="Disable audio generation",
)
parser.add_argument(
"--seed",
type=int,
help="Random seed for reproducible results",
)
args = parser.parse_args()
# Check for API key
if not os.environ.get("REPLICATE_API_KEY"):
print("Error: REPLICATE_API_KEY environment variable not set.")
print("\nTo set it:")
print(" export REPLICATE_API_KEY='your-api-key-here'")
print("\nGet your API key at: https://replicate.com/account/api-tokens")
sys.exit(1)
# Generate default output filename if not specified
output_path = args.output
if not output_path:
timestamp = datetime.now().strftime("%Y%m%d_%H%M%S")
output_path = f"generated_video_{timestamp}.mp4"
# Ensure .mp4 extension
if not output_path.lower().endswith(".mp4"):
output_path += ".mp4"
try:
# Generate video
video_url = generate_video(
prompt=args.prompt,
duration=args.duration,
aspect_ratio=args.aspect_ratio,
image=args.image,
last_frame_image=args.last_frame,
camera_fixed=args.camera_fixed,
generate_audio=not args.no_audio,
seed=args.seed,
)
# Download to local file
download_video(video_url, output_path)
print(f"\n✓ Video saved to: {output_path}")
except replicate.exceptions.ReplicateError as e:
print(f"\nReplicate API error: {e}")
sys.exit(1)
except FileNotFoundError as e:
print(f"\nFile error: {e}")
sys.exit(1)
except ValueError as e:
print(f"\nInvalid parameter: {e}")
sys.exit(1)
except KeyboardInterrupt:
print("\n\nGeneration cancelled.")
sys.exit(130)
if __name__ == "__main__":
main()