🔧 Configuration
In this section, we delve into the advanced features and customization options available in the ZapCap API. The following guide will help you leverage the full potential of ZapCap, allowing for highly tailored and specific subtitle generation to meet your unique requirements.
Customizing the rendering task with renderOptions
When creating a video task, the renderOptions
property within the CreateVideoTaskRequestDto
allows you to control various aspects of subtitle appearance and behavior. Below, we provide detailed information on how to customize these options.
Render Options Overview
renderOptions:
subsOptions:
emoji: boolean
emojiAnimation: boolean
emphasizeKeywords: boolean
animation: boolean
punctuation: boolean
styleOptions:
top: number
fontUppercase: boolean
fontSize: number
fontWeight: number
fontColor: string
highlightOptions:
randomColourOne: string
randomColourTwo: string
randomColourThree: string
subsOptions
- emoji:
boolean
- Enables or disables emojis in the subtitles. - emojiAnimation:
boolean
- Enables or disables animation for emojis in the subtitles. - emphasizeKeywords:
boolean
- Highlights important words in the subtitles. Highlighting is styled according to the selected template. - animation:
boolean
- Toggles animation for the subtitles. For example, some themes may have moving subtitles to add a dynamic feel to the video. - punctuation:
boolean
- Determines whether punctuation should be added to the subtitles.
styleOptions
- top:
number
- The Y position of the subtitles as a percentage of the video's height. Higher values place the subtitles lower on the video. - fontUppercase:
boolean
- Converts subtitles text to uppercase. - fontSize:
number
- Specifies the font size of the subtitles. - fontWeight:
number
- Specifies the font weight of the subtitles. Refer to the numerical values for font-weight in css. - fontColor:
string
- Sets the base color of the subtitles using a hex color code.
highlightOptions
- randomColourOne:
string
- First random color option for highlighted keywords. - randomColourTwo:
string
- Second random color option for highlighted keywords. - randomColourThree:
string
- Third random color option for highlighted keywords.
Example: Creating a Video Task with Custom Render Options
Below is an example request to create a video task with customized render options.
POST /videos/{videoId}/task
Content-Type: application/json
x-api-key: YOUR_API_KEY
{
"templateId": "a51c5222-47a7-4c37-b052-7b9853d66bf6",
"autoApprove": false,
"language": "en",
"renderOptions": {
"subsOptions": {
"emoji": true,
"emojiAnimation": true,
"emphasizeKeywords": true,
"animation": true,
"punctuation": false
},
"styleOptions": {
"top": 40,
"fontUppercase": true,
"fontSize": 46,
"fontWeight": 900,
"fontColor": "#ffffff"
},
"highlightOptions": {
"randomColourOne": "#2bf82a",
"randomColourTwo": "#fdfa14",
"randomColourThree": "#f01916"
}
}
}
This request demonstrates how to fully customize your subtitles to align with your brand and video content requirements. By adjusting these options, you can create a unique and engaging viewer experience or allow your users to customize their subtitles to their liking.
Customizing the transcription task with transcribeSettings
In addition to rendering options, the ZapCap API allows you to customize the transcription process using the transcribeSettings
property when creating a video task. This currently includes configuring b-roll options to enhance your video content.
Transcribe Settings Overview
templateId: "a51c5222-47a7-4c37-b052-7b9853d66bf6",
transcribeSettings:
broll:
brollPercent: 50
broll
- brollPercent:
number
- Specifies the percentage of b-roll footage to include in the video. Acceptable values range from0
to100
. The default value is50
.
Allowing the modification of b-rolls is coming soon where you will be able to specify a list of b-roll clips to include in the video.