视频烧录
POST
/302/vt/subtitle/burn将srt字幕烧录进视频,生成带字幕的新视频
价格:0.005PTC/min
请求参数
Header 参数
Authorization
string
可选
示例值:
Bearer {{YOUR_API_KEY}}
Body 参数application/json
src_subtitle
array [object {4}]
原文字幕
index
integer
必需
start_time
string
必需
end_time
string
必需
text
string
必需
trans_subtitle
array [object {4}]
翻译字幕
index
integer
必需
start_time
string
必需
end_time
string
必需
text
string
必需
url
string
视频链接
output_width
integer
烧录输出的视频宽度
output_width,output_height任意一个不传时会使用原视频宽高
output_height
integer
烧录输出的视频高度
src_font_size
integer
原文字幕字体大小
默认值:
15
src_font_name
string
原文字幕字体
不传或者传的字体找不到会使用NotoSansCJK-Regular字体
src_font_color
string
原文字幕字体颜色
默认值:
&HFFFFFF
src_outline_width
integer
原文字幕外边宽度
默认值:
1
src_shadow_color
string
原文字幕阴影颜色
默认值:
&H80000000
src_margin_v
integer
原文字幕垂直高度
可以与trans_margin_v两个字段一起使用控制字幕的上下关系
默认值:
0
trans_font_size
integer
译文字幕字体大小
默认值:
17
trans_font_name
string
译文字幕字体
trans_font_color
string
译文字幕颜色
默认值:
&H00FFFF
trans_outline_color
string
译文外边颜色
默认值:
&H000000
trans_outline_width
integer
译文外边宽度
默认值:
1
trans_back_color
string
译文背景颜色
默认值:
&H33000000
trans_margin_v
integer
译文字幕垂直高度
默认值:
27
adjusted_video_speed_list
array[string]
局部视频速度调整信息
示例1
{
"src_subtitle": [
{
"index": 1,
"start_time": "00:00:00,521",
"end_time": "00:00:01,722",
"text": "哈喽大家好,我是张艺兴"
},
{
"index": 2,
"start_time": "00:00:01,722",
"end_time": "00:00:03,644",
"text": "祝哈喽的十三岁生日快乐"
},
{
"index": 3,
"start_time": "00:00:03,644",
"end_time": "00:00:05,785",
"text": "十三,这是闯荡的年纪啊"
},
{
"index": 4,
"start_time": "00:00:05,785",
"end_time": "00:00:08,307",
"text": "未来可期看好你哦,哈"
},
{
"index": 5,
"start_time": "00:00:08,307",
"end_time": "00:00:13,111",
"text": "我是紫棋祝哈喽的十三岁生日快乐。"
},
{
"index": 6,
"start_time": "00:00:13,111",
"end_time": "00:00:17,355",
"text": "哈喽哈喽的小伙伙伴们,我是杨丞琳"
},
{
"index": 7,
"start_time": "00:00:17,355",
"end_time": "00:00:21,378",
"text": "祝哈喽的十三岁生日快乐,一往无前"
},
{
"index": 8,
"start_time": "00:00:21,378",
"end_time": "00:00:22,619",
"text": "一路升华爱你们哦。"
},
{
"index": 9,
"start_time": "00:00:23,629",
"end_time": "00:00:25,571",
"text": "哈喽大家好,我是孟佳"
},
{
"index": 10,
"start_time": "00:00:25,571",
"end_time": "00:00:27,593",
"text": "祝我最爱的哈喽"
},
{
"index": 11,
"start_time": "00:00:27,593",
"end_time": "00:00:34,641",
"text": "十三岁生日快乐十三十三稳如泰山,加油。"
},
{
"index": 12,
"start_time": "00:00:34,641",
"end_time": "00:00:36,203",
"text": "哈喽大家好,我是李斯丹妮"
},
{
"index": 13,
"start_time": "00:00:36,203",
"end_time": "00:00:39,407",
"text": "祝哈喽十三岁生日快乐"
}
],
"trans_subtitle": [
{
"index": 1,
"start_time": "00:00:00,521",
"end_time": "00:00:01,722",
"text": "Hey everyone! Zhang Yixing here."
},
{
"index": 2,
"start_time": "00:00:01,722",
"end_time": "00:00:03,644",
"text": "Happy 13th birthday, Hello!"
},
{
"index": 3,
"start_time": "00:00:03,644",
"end_time": "00:00:05,785",
"text": "Thirteen's the perfect age for new adventures!"
},
{
"index": 4,
"start_time": "00:00:05,785",
"end_time": "00:00:08,307",
"text": "Your future's looking bright! Rooting for you, Hello!"
},
{
"index": 5,
"start_time": "00:00:08,307",
"end_time": "00:00:13,111",
"text": "G.E.M. here! Happy 13th birthday, Hello!"
},
{
"index": 6,
"start_time": "00:00:13,111",
"end_time": "00:00:17,355",
"text": "Hey, Hello fans! It's Rainie Yang."
},
{
"index": 7,
"start_time": "00:00:17,355",
"end_time": "00:00:21,378",
"text": "Wishing Hello a fantastic 13th! Keep pushing forward!"
},
{
"index": 8,
"start_time": "00:00:21,378",
"end_time": "00:00:22,619",
"text": "Keep growing, Hello! Lots of love to you all!"
},
{
"index": 9,
"start_time": "00:00:23,629",
"end_time": "00:00:25,571",
"text": "Hi, Hello fans! Meng Jia here."
},
{
"index": 10,
"start_time": "00:00:25,571",
"end_time": "00:00:27,593",
"text": "To my dear Hello,"
},
{
"index": 11,
"start_time": "00:00:27,593",
"end_time": "00:00:34,641",
"text": "Happy 13th! Stay strong and keep thriving!"
},
{
"index": 12,
"start_time": "00:00:34,641",
"end_time": "00:00:36,203",
"text": "Hey there, everyone! Lisa here."
},
{
"index": 13,
"start_time": "00:00:36,203",
"end_time": "00:00:39,407",
"text": "Wishing Hello a fantastic 13th anniversary!"
}
],
"url": "https://www.bilibili.com/video/BV1JeqNY1EAZ/?t=6&spm_id_from=333.1007.tianma.8-3-29.click&vd_source=5bb6431b41657fc431319b843c1579d5"
}
示例代码
返回响应
成功(200)
HTTP 状态码: 200
内容格式: JSONapplication/json
数据结构
object {0}
示例
{}
最后修改时间: 2 个月前