Files
vrsub/workflows/ocr-subtitle.json
T
cat-shark 5688f38d62 fix: frame-extract 默认裁切区域改为画面底部 1/4
- 默认 crop 由 [0,0.82,1,0.18] 调整为 [0,0.75,1,0.25]:字幕很少出现在
  画面上半部分,扩大裁切高度提升 OCR 召回
- 同步更新 ocr-subtitle 工作流 DAG 与参数覆盖测试
2026-08-23 16:25:17 +08:00

68 lines
1.5 KiB
JSON

{
"id": "ocr-subtitle",
"name": "字幕OCR提取",
"description": "抽帧并 OCR 提取视频烧录字幕,经 LLM 过滤无意义内容后生成带时间轴的 SRT 基准数据。",
"version": 7,
"definition": {
"name": "字幕OCR提取",
"version": 7,
"nodes": [
{
"id": "extract",
"node_type": "frame-extract",
"params": {
"interval_seconds": 0.5,
"crop": [
0,
0.75,
1,
0.25
]
},
"inputs": {
"video_uri": "input.video_uri"
}
},
{
"id": "ocr",
"node_type": "subtitle-ocr",
"params": {
"prompt": "提取图像中的文字,不要描述图片中的内容",
"pool_min_workers": 1,
"pool_max_workers": 20
},
"inputs": {
"frames_manifest": "extract.frames_manifest"
}
},
{
"id": "filter",
"node_type": "llm-filter",
"params": {
"pool_min_workers": 1,
"pool_max_workers": 20,
"pool_fast_threshold": 1
},
"inputs": {
"srt_uri": "ocr.srt_uri"
}
}
],
"edges": [
{
"from": "extract",
"to": "ocr"
},
{
"from": "ocr",
"to": "filter"
}
],
"entry_inputs": {
"video_uri": "file"
},
"final_outputs": {
"srt": "filter.srt_uri"
}
}
}