Use Cases
Use this skill when you need to generate a video based on a text description. It supports controlling the video's starting frame through a first-frame image, which can be a URL or a local file path.
Steps
- Prepare the target filename (e.g.
output.mp4) and a clear and specificprompt。 - (Optional) Prepare a first-frame image, which can be an HTTP URL or a local file path (the script will automatically convert it to Base64).
- Run the script
python scripts/video_generate.py <filename> "<prompt>" [first_frame]. Before running, cd to the corresponding directory. - The script will output the video's TOS URL and automatically download it to the specified file.
Authentication and Credential Sources
- Preferentially read the
MODEL_VIDEO_API_KEYorARK_API_KEYenvironment variables. - If not configured, it will attempt to use
VOLCENGINE_ACCESS_KEYandVOLCENGINE_SECRET_KEYto obtain the Ark API Key.
Output Format
- The console outputs the generated video URL.
- The video file will be downloaded to the specified path.
Examples
Text-only generation:
python scripts/video_generate.py "cat.mp4" "一只可爱的猫"
Generation with a first-frame image (URL):
python scripts/video_generate.py "dog_run.mp4" "一只小狗在草地上奔跑" "https://example.com/dog_start.png"
Generation with a first-frame image (local file):
python scripts/video_generate.py "my_video.mp4" "图片中的人物动起来" "/path/to/local/image.jpg"