fix: correct frame number expression in trace video
This commit is contained in:
@@ -312,9 +312,10 @@ async fn trace_video(
|
||||
let mut parts: Vec<String> = Vec::new();
|
||||
|
||||
// Global frame number overlay (top-left corner, always visible)
|
||||
let frame_offset = first_frame as i64 - (padding * fps) as i64;
|
||||
let global_frame_text = format!(
|
||||
"drawtext=text='Frame\\: %{{n}}+{}':fontsize=16:fontcolor=white:box=1:boxcolor=black@0.6:x=10:y=10",
|
||||
first_frame as i64 - (padding * fps) as i64
|
||||
"drawtext=text='Frame\\: %{{eif:n+{}:d}}':fontsize=16:fontcolor=white:box=1:boxcolor=black@0.6:x=10:y=10",
|
||||
frame_offset
|
||||
);
|
||||
parts.push(global_frame_text);
|
||||
for (i, (frame, x, y, w, h)) in rows.iter().enumerate() {
|
||||
|
||||
Reference in New Issue
Block a user