This guide covers key features and workflow parameters supported by LipDub API for flexible video generation, including looping, selective dubbing, frame indexing, quality options, and webhooks.
1. Loop Video
Description: Create videos that repeat or loop segments seamlessly. Parameter:
loop_count(integer) — Number of times to repeat the base video segment. Example:- To loop the input clip 3 times:
{
"input_video": "input.mp4",
"loop_count": 3
}
2. Start Frame Index
Description: Begin dubbing or processing from a specific frame in the input video, enabling precise synchronization or cropping. Parameter:
start_frame(integer) — Index of the first frame to process. Example:- To start dubbing from frame 150:
{
"input_video": "input.mp4",
"start_frame": 150
}
3. Selective Dubbing
Description: Target specific audio segments or time ranges for dubbing, leaving other parts of the video unchanged. Parameter:
segments(array) — List of time or frame intervals to dub. Example:- To dub only the section from 10s to 30s:
{
"input_video": "input.mp4",
"segments": [
{"start": 10, "end": 30}
]
}
4. Choose Output Video Quality
Description: Set the output video resolution or encoding for optimal balance of speed, file size, and visual quality. Parameters:
output_quality(enum) — Options like'480p','720p','1080p','custom'- Optional:
bitrate,codecExample: - To generate a 720p output:
{
"input_video": "input.mp4",
"output_quality": "720p"
}
5. Callback URL
Description: Receive asynchronous status updates and download links when video processing is complete. Parameter:
callback_url(string) — Your webhook endpoint. Example:- To specify a callback:
{
"input_video": "input.mp4",
"callback_url": "https://yourdomain.com/api/lipdub/callback"
}
Example Full Request
{
"input_video": "input.mp4",
"loop_count": 2,
"start_frame": 100,
"segments": [{"start": 20, "end": 40}],
"output_quality": "1080p",
"callback_url": "https://yourdomain.com/lipdub/notify"
}Notes & Tips
- Combine multiple features for advanced workflows.
- Ensure frame indices and time segments align with the input video’s actual length.
- Use callback URLs for scalable, asynchronous integrations.
See API reference for detailed parameter definitions and supported values.
