diff --git a/config/processor_tools_v3.json b/config/processor_tools_v3.json index 6b30b3eb..6ede33a3 100644 --- a/config/processor_tools_v3.json +++ b/config/processor_tools_v3.json @@ -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}" diff --git a/src/core/processor/face.rs b/src/core/processor/face.rs index f240fc00..0488a293 100644 --- a/src/core/processor/face.rs +++ b/src/core/processor/face.rs @@ -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 { diff --git a/src/core/processor/pose.rs b/src/core/processor/pose.rs index 6e46e22c..13f2f891 100644 --- a/src/core/processor/pose.rs +++ b/src/core/processor/pose.rs @@ -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 {