feat: face fix deployment + trace_* regeneration + executor stderr filter fix
- swift_face.swift: frame rounding (.rounded()), conf 0.75, min_size 64 - trace_* directories regenerated for KOBA (37 traces, start_frame 5307) - executor.rs: stderr filter now logs all non-empty stderr (was discarding) - VAD not skippable in ASRX (main_fixed.py Step 2 always runs) - Step 2.5 sentence boundary refinement added - Cluster agent async endpoints + similarity transparency - Keyword search: relationship text extraction, priority ordering - Face fix handoff doc for Studio team
This commit is contained in:
+24
-19
@@ -23,8 +23,7 @@ pub fn proxy_output_path(file_path: &str) -> Result<PathBuf> {
|
||||
}
|
||||
|
||||
fn ffmpeg_cmd() -> Command {
|
||||
let ffmpeg_path = std::env::var("MOMENTRY_FFMPEG")
|
||||
.unwrap_or_else(|_| "ffmpeg".to_string());
|
||||
let ffmpeg_path = std::env::var("MOMENTRY_FFMPEG").unwrap_or_else(|_| "ffmpeg".to_string());
|
||||
let mut cmd = Command::new(&ffmpeg_path);
|
||||
let full_lib = "/opt/homebrew/opt/ffmpeg-full/lib";
|
||||
if std::path::Path::new(full_lib).exists() {
|
||||
@@ -52,15 +51,24 @@ pub async fn generate_proxy(file_path: &str, file_uuid: &str) -> Result<Option<S
|
||||
let status = tokio::task::spawn_blocking(move || {
|
||||
ffmpeg_cmd()
|
||||
.args([
|
||||
"-i", &file_path_owned,
|
||||
"-vf", &format!("scale=-2:{}", PROXY_HEIGHT),
|
||||
"-c:v", "libx264",
|
||||
"-preset", "fast",
|
||||
"-crf", &PROXY_CRF.to_string(),
|
||||
"-c:a", "aac",
|
||||
"-b:a", "128k",
|
||||
"-movflags", "+faststart",
|
||||
"-y", &out_str,
|
||||
"-i",
|
||||
&file_path_owned,
|
||||
"-vf",
|
||||
&format!("scale=-2:{}", PROXY_HEIGHT),
|
||||
"-c:v",
|
||||
"libx264",
|
||||
"-preset",
|
||||
"fast",
|
||||
"-crf",
|
||||
&PROXY_CRF.to_string(),
|
||||
"-c:a",
|
||||
"aac",
|
||||
"-b:a",
|
||||
"128k",
|
||||
"-movflags",
|
||||
"+faststart",
|
||||
"-y",
|
||||
&out_str,
|
||||
])
|
||||
.status()
|
||||
})
|
||||
@@ -153,10 +161,7 @@ pub async fn probe_audio_track(file_path: &str) -> Result<Option<AudioTrackResul
|
||||
.and_then(|v| v.as_i64())
|
||||
.unwrap_or(0) as i32;
|
||||
|
||||
let duration = json
|
||||
.get("duration")
|
||||
.and_then(|v| v.as_f64())
|
||||
.unwrap_or(0.0);
|
||||
let duration = json.get("duration").and_then(|v| v.as_f64()).unwrap_or(0.0);
|
||||
|
||||
tracing::info!(
|
||||
"[AUDIO_TRACK] {} -> {} (ratio: {:.2}, segments: {})",
|
||||
@@ -180,8 +185,7 @@ pub async fn extract_cut_key_frames(
|
||||
video_path: &str,
|
||||
output_dir: &str,
|
||||
) -> Result<Vec<String>> {
|
||||
let cut_json = PathBuf::from(output_dir)
|
||||
.join(format!("{}.cut.json", file_uuid));
|
||||
let cut_json = PathBuf::from(output_dir).join(format!("{}.cut.json", file_uuid));
|
||||
|
||||
if !cut_json.exists() {
|
||||
tracing::warn!("[CUT_KEY_FRAME] cut.json not found: {}", cut_json.display());
|
||||
@@ -244,7 +248,8 @@ pub async fn extract_cut_key_frames(
|
||||
arr.iter()
|
||||
.filter_map(|s| {
|
||||
if s.get("success").and_then(|b| b.as_bool()) == Some(true) {
|
||||
s.get("output_path").and_then(|p| p.as_str().map(|p| p.to_string()))
|
||||
s.get("output_path")
|
||||
.and_then(|p| p.as_str().map(|p| p.to_string()))
|
||||
} else {
|
||||
None
|
||||
}
|
||||
@@ -260,4 +265,4 @@ pub async fn extract_cut_key_frames(
|
||||
);
|
||||
|
||||
Ok(scenes)
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user