fix: use positional args for swift face/pose config-driven execution
The swift_face/swift_pose CLIs take positional <input> <output> paths,
but processor_tools_v3.json passed an unsupported --output flag, so the
config-driven path always failed (exit 64, 'Unknown option --output')
and fell back to hard-coded logic for every face/pose run.
- config/processor_tools_v3.json: drop --output, use positional args
- face.rs/pose.rs: expand {video_path}/{output_path}/{file_uuid}
placeholders in config args before executing
Verified: positional args exit 0 and produce face.json; old args exit 64.
This commit is contained in:
@@ -31,7 +31,6 @@
|
||||
"executable": "scripts/swift_processors/.build/release/swift_pose",
|
||||
"args": [
|
||||
"{video_path}",
|
||||
"--output",
|
||||
"{output_path}",
|
||||
"--uuid",
|
||||
"{file_uuid}"
|
||||
@@ -103,7 +102,6 @@
|
||||
"executable": "scripts/swift_processors/.build/release/swift_face",
|
||||
"args": [
|
||||
"{video_path}",
|
||||
"--output",
|
||||
"{output_path}",
|
||||
"--uuid",
|
||||
"{file_uuid}"
|
||||
|
||||
@@ -345,7 +345,14 @@ async fn run_face_with_config(
|
||||
|
||||
let args = if !tool.args.is_empty() {
|
||||
tracing::info!("[FACE] Using args from config: {:?}", tool.args);
|
||||
tool.args.clone()
|
||||
tool.args
|
||||
.iter()
|
||||
.map(|a| {
|
||||
a.replace("{video_path}", video_path)
|
||||
.replace("{output_path}", output_path)
|
||||
.replace("{file_uuid}", uuid.unwrap_or(""))
|
||||
})
|
||||
.collect()
|
||||
} else {
|
||||
let mut args = vec![video_path.to_string(), output_path.to_string()];
|
||||
if let Some(u) = uuid {
|
||||
|
||||
@@ -526,7 +526,14 @@ async fn run_pose_with_config(
|
||||
|
||||
let args = if !tool.args.is_empty() {
|
||||
tracing::info!("[POSE] Using args from config: {:?}", tool.args);
|
||||
tool.args.clone()
|
||||
tool.args
|
||||
.iter()
|
||||
.map(|a| {
|
||||
a.replace("{video_path}", video_path)
|
||||
.replace("{output_path}", output_path)
|
||||
.replace("{file_uuid}", uuid.unwrap_or(""))
|
||||
})
|
||||
.collect()
|
||||
} else {
|
||||
let mut args = vec![video_path.to_string(), output_path.to_string()];
|
||||
if let Some(u) = uuid {
|
||||
|
||||
Reference in New Issue
Block a user