diff --git a/src/video/actors.rs b/src/video/actors.rs index faad727..22ec1ac 100644 --- a/src/video/actors.rs +++ b/src/video/actors.rs @@ -159,8 +159,16 @@ pub async fn probe_video_stream_meta(video_path: &str) -> VideoStreamMeta { .arg("v:0") .arg("-print_format") .arg("json") + // NOTE: request `stream_side_data_list` (stream-level side data, read + // from the moov atom), NOT the bare `side_data_list` section. On modern + // ffprobe the latter is the *frame* side-data section, which forces + // ffprobe to enumerate every frame — reading the entire mdat over the + // network. For non-faststart phone clips on an SMB mount that turned a + // metadata probe into a full-file read (tens of seconds per open). The + // Display Matrix rotation we need is present at stream level, so this + // keeps codec/fps/rotation while reading only the header. .arg("-show_entries") - .arg("stream=codec_name,r_frame_rate,avg_frame_rate:stream_tags=rotate:side_data_list") + .arg("stream=codec_name,r_frame_rate,avg_frame_rate:stream_tags=rotate:stream_side_data_list") .arg(video_path) .output() .await;