feat: add CUT processor config support
新增: - CUT 處理器配置 - Rust 原生實現(使用 ffmpeg) 工具優先級: 1. rust (priority=0, enabled=true) - Rust 原生實現 - 使用 ffmpeg 場景檢測 - use_ffmpeg: true - min_scene_duration: 0.5秒 2. python (priority=1, enabled=false) - Python 備用方案 配置參數: - ffmpeg 場景檢測配置 - 最小場景持續時間 ToolSelector: - cut 返回 Rust 原生標記 - 支持 python 備用 目的: - 統一所有處理器配置架構 - 支持 ffmpeg 參數配置
This commit is contained in:
@@ -201,6 +201,27 @@
|
|||||||
],
|
],
|
||||||
"default_tool": "rust",
|
"default_tool": "rust",
|
||||||
"enabled": true
|
"enabled": true
|
||||||
|
},
|
||||||
|
"cut": {
|
||||||
|
"tools": [
|
||||||
|
{
|
||||||
|
"name": "rust",
|
||||||
|
"priority": 0,
|
||||||
|
"enabled": true,
|
||||||
|
"parameters": {
|
||||||
|
"use_ffmpeg": true,
|
||||||
|
"min_scene_duration": 0.5
|
||||||
|
}
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "python",
|
||||||
|
"priority": 1,
|
||||||
|
"enabled": false,
|
||||||
|
"parameters": {}
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"default_tool": "rust",
|
||||||
|
"enabled": true
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -179,6 +179,17 @@ impl ToolSelector {
|
|||||||
Some(std::path::PathBuf::from("rust_vlm_summary"))
|
Some(std::path::PathBuf::from("rust_vlm_summary"))
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// CUT (Scene detection) tools
|
||||||
|
("cut", "rust") => {
|
||||||
|
// CUT is implemented in Rust using ffmpeg
|
||||||
|
// Return a placeholder path to indicate availability
|
||||||
|
Some(std::path::PathBuf::from("rust_cut"))
|
||||||
|
}
|
||||||
|
("cut", "python") => {
|
||||||
|
let script = executor.script_path("cut_processor.py");
|
||||||
|
if script.exists() { Some(script) } else { None }
|
||||||
|
}
|
||||||
|
|
||||||
_ => None,
|
_ => None,
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user