使用此流水线的配方
关于此流水线的文章
字幕 API
从你自己的代码调用此流水线。一次请求即可发起运行;模型是一个输入字段,而不是独立的接口。
bun add @pipe2-ai/sdk import { createClient } from "@pipe2-ai/sdk";
const client = createClient(process.env.PIPE2_TOKEN!);
const { run_pipeline } = await client.RunPipeline({
pipeline_slug: "captions",
input: {
source_asset_id: "a1b2c3d4-0000-4000-8000-000000000001",
transcript_asset_id: "a1b2c3d4-0000-4000-8000-000000000002",
},
});pip install pipe2 import asyncio
import os
from pipe2 import Pipe2Client
client = Pipe2Client(token=os.environ["PIPE2_TOKEN"])
run = asyncio.run(client.run_pipeline(
pipeline_slug="captions",
input={
"source_asset_id": "a1b2c3d4-0000-4000-8000-000000000001",
"transcript_asset_id": "a1b2c3d4-0000-4000-8000-000000000002",
},
))go get github.com/pipe2-ai/sdk-go client := pipe2.NewClient(os.Getenv("PIPE2_TOKEN"))
input := json.RawMessage(`{
"source_asset_id": "a1b2c3d4-0000-4000-8000-000000000001",
"transcript_asset_id": "a1b2c3d4-0000-4000-8000-000000000002"
}`)
run, err := pipe2.RunPipeline(context.Background(), client, "captions", input)
if err != nil {
log.Fatal(err)
}brew install pipe2-ai/tap/pipe2 pipe2 pipelines run \
--pipeline captions \
--input-json '{"source_asset_id": "a1b2c3d4-0000-4000-8000-000000000001", "transcript_asset_id": "a1b2c3d4-0000-4000-8000-000000000002"}' \
--wait参数
-
source_asset_id必填 -
Video to burn captions into. Asset id returned by an upload. See /docs/api/ for the upload flow.
string -
transcript_asset_id必填 -
Transcript to caption from, produced by the transcription pipeline. Asset id returned by an upload. See /docs/api/ for the upload flow.
string -
position -
烧录文字的垂直锚点。选择“自动”时,若上游重构提供了提示,流程会挑选与主体相反的一半(否则回退到“底部”)。“底部”是 TikTok 的标准位置;当主体占据画面下半部分时选择“顶部”。
autobottomtopmiddle默认auto
显示全部 4 个输入
-
preset_name -
Caption style preset — controls font, size, colour and placement of the burned-in captions.
tiktok-bold-yellowminimal-whitesubtle-dropkaraoke-gradientbig-serifserif-editorial默认serif-editorial
在 AI 智能体中使用
将任意 MCP 客户端指向 pipe2,你的智能体就能获得这些工具。它会找到这条流水线,读取上方相同的 schema,然后运行它。
- list_pipelines
- get_pipeline_schema
- run_pipeline
- get_pipeline_run_status
- request_upload
https://mcp.pipe2.ai/mcp {
"mcpServers": {
"pipe2ai": {
"url": "https://mcp.pipe2.ai/mcp",
"headers": { "Authorization": "Bearer YOUR_TOKEN" }
}
}
}字幕: 将带样式的字幕烧录进任意视频
附上一段视频和一份 SRT 转录文本,选择一种样式,即可得到一个字幕已直接烧录进画面的 MP4。无需 CapCut、无需 Premiere、无需安装任何字幕插件,只需一个针对 TikTok、Reels 和 Shorts 尺寸优化、可直接发布的文件。
还需要先获取转录文本?在任意视频或音频上运行 Transcription 流水线,生成的 SRT 会进入你的素材库,并可直接接入此步骤。烧录之前,如有需要更正之处,可在那里编辑。
工作原理
- 附上你的视频: 从设备上传,或从素材库中选择一个。
- 附上 SRT 转录文本: 用 Transcription 流水线生成,或从任意来源上传现有的 .srt。
- 选择字幕样式: 五种为不同受众调校的、可直接用于制作的预设。
- 下载结果: 一个已烧录字幕的新 MP4,外加一张用于缩略图的封面帧。
字幕样式预设
- TikTok Bold Yellow: 粗字重、黑色描边、TikTok 安全区定位。人人效仿的默认样式。
- Minimal White: 简洁的无衬线字体配柔和阴影。适合口播播客和访谈。
- Subtle Drop Shadow: 低对比度字幕,适合以画面为主导的电影感剪辑。
- Karaoke Gradient: 当前朗读的词以紫→粉渐变高亮显示。在短视频上留存率高。
- Big Serif: 富有编辑质感的衬线字体,适合品牌纪录、案例研究和长篇教育短片。
为何采用两步流程
- 烧录前编辑转录文本: 在 SRT 中修正人名、术语或说话人标签,而不必将就 STT 给出的原始结果。
- 一份转录文本复用于多种样式: 用五种不同预设烧录同一份 SRT 进行 A/B 测试,无需重新转录。
- 自带 SRT: 如果你已有来自其他工具的转录文本,直接附上即可,完全省去转录成本。
- TikTok 安全区定位: 字幕避开各大主流平台底部三分之一的 UI 遮挡。
适合谁
- 每天产出 Reels / Shorts / TikTok 的短视频创作者
- 将长篇节目改制成可分享短片的播客主
- 为教程增加无障碍能力的课程创作者和教育者
- 规模化产出品牌社媒内容的代理机构
- 任何已有 SRT、只想将其干净地渲染进视频的人
将它接在 Transcription 流水线之后,构成完整的可交付流程;或将输出直接送入 Video Reel 流水线,制作多片段合辑。
常见问题
支持哪些文件格式?
我从哪里获取 SRT 转录文本?
字幕是烧录进画面,还是叠加在上层?
我可以在烧录前编辑转录文本吗?
我可以将一份转录文本复用于多种字幕样式吗?
字幕烧录需要多长时间?
探索更多流水线
查看全部 →根据文本提示、图像或参考片段生成 AI 视频。电影感镜头、产品揭晓、生活方式广告,配以同步音频和自然运动。
根据文本或参考照片生成 AI 图像。产品图、角色美术、带可读文字的海报、照片级人像,数秒即得高分辨率成品。
将文本转换为自然语音,提供数十种音色、70+ 种语言,并可自定义语气、口音和节奏的风格指令。
生成原创背景音乐,匹配你描述的任意情绪、风格和时长。免版税,数秒即得。