-
Notifications
You must be signed in to change notification settings - Fork 0
Configuration Reference
SpyC0der77 edited this page Nov 23, 2024
·
1 revision
This document provides a detailed reference for all configuration options in VidKit.
{
"name": "string",
"format": "string",
"framerate": "number",
"resolution": "[width, height]",
"frames": "array",
"audio": "string (optional)"
}
- Type: string
- Description: Name of the video project
-
Example:
"my_video"
- Type: string
- Supported Values: Currently only "mp4"
-
Example:
"mp4"
- Type: number
- Description: Frames per second
- Range: 1-120
-
Example:
30
- Type: array [width, height]
- Description: Video dimensions in pixels
-
Format:
[width, height]
-
Example:
[1920, 1080]
- Type: array of frame objects
- Description: List of frames to include in the video
-
Example:
"frames": [ { "image": "frame1.jpg", "duration": 5 } ]
- Type: string
- Description: Path to audio file
- Supported Formats: mp3, wav
-
Example:
"background.mp3"
Each frame in the frames
array must have these properties:
- Type: string
- Description: Path to image file
- Supported Formats: jpg, jpeg, png
-
Example:
"frame1.jpg"
- Type: number
- Description: Duration in seconds
- Range: > 0
-
Example:
5
{
"name": "promotional_video",
"format": "mp4",
"framerate": 30,
"resolution": [1920, 1080],
"frames": [
{
"image": "intro.jpg",
"duration": 3
},
{
"image": "main_content.jpg",
"duration": 5
},
{
"image": "outro.jpg",
"duration": 2
}
],
"audio": "background_music.mp3"
}
- name: Must be a non-empty string
- format: Must be "mp4"
- framerate: Must be a positive number
- resolution: Both width and height must be positive integers
- frames: Must contain at least one frame
- audio: If provided, file must exist and be in a supported format
- Use consistent image resolutions matching your video resolution
- Keep frame durations reasonable (typically 1-10 seconds)
- Ensure total video duration matches audio duration if using audio
- Use relative paths for image and audio files
- Keep filenames simple and avoid special characters
- Advanced Usage for more complex configurations
- Error Handling for dealing with configuration errors
- Troubleshooting for common configuration issues