Files
vrsub/workflows/ocr-subtitle.json
T
cat-shark 5ffa2ac39e feat: llm-filter 两级过滤(规则层+五类分类+去重+长文本保护),工作流单线程 v4
- 规则层(不调 LLM):横线装饰/HTML 水印 token/URL/邮箱/单双 ASCII 字符直接删
- LLM 五类分类:garbage/overlay/noise 删,repeat/dialogue 留,未识别回退保留
- 按文本去重:相同文本只调一次 LLM(忽略空白/大小写),判定一致并省调用
- 长文本保护:≥min_keep_len 时 noise 不构成删除依据
- 真实任务 run_ac7f480a3ccb 验证:非规则误删 350→193(-45%),呻吟/对话保留
- ocr-subtitle 工作流 v4:pool 钉死单线程(1/1)
- 回归夹具 testdata/ocr_srt_run_ac7f480a3ccb.srt(真实 1666 条 OCR 输出)
2026-08-17 23:20:16 +08:00

68 lines
1.4 KiB
JSON

{
"id": "ocr-subtitle",
"name": "字幕OCR提取",
"description": "抽帧并 OCR 提取视频烧录字幕,经 LLM 过滤无意义内容后生成带时间轴的 SRT 基准数据。",
"version": 4,
"definition": {
"name": "字幕OCR提取",
"version": 4,
"nodes": [
{
"id": "extract",
"node_type": "frame-extract",
"params": {
"interval_seconds": 0.5,
"crop": [
0,
0.82,
1,
0.18
]
},
"inputs": {
"video_uri": "input.video_uri"
}
},
{
"id": "ocr",
"node_type": "subtitle-ocr",
"params": {
"prompt": "提取图像中的文字,不要描述图片中的内容",
"pool_min_workers": 1,
"pool_max_workers": 1
},
"inputs": {
"frames_manifest": "extract.frames_manifest"
}
},
{
"id": "filter",
"node_type": "llm-filter",
"params": {
"pool_min_workers": 1,
"pool_max_workers": 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"
}
}
}