Minor rename in vision.py

This commit is contained in:
henryruhs
2025-05-20 15:48:55 +02:00
parent 94535ab9dc
commit 801108faca

View File

@@ -104,8 +104,8 @@ def count_video_frame_total(video_path : str) -> int:
def predict_video_frame_total(video_path : str, fps : Fps, trim_frame_start : int, trim_frame_end : int) -> int: def predict_video_frame_total(video_path : str, fps : Fps, trim_frame_start : int, trim_frame_end : int) -> int:
if is_video(video_path): if is_video(video_path):
target_video_fps = detect_video_fps(video_path) video_fps = detect_video_fps(video_path)
extract_frame_total = count_trim_frame_total(video_path, trim_frame_start, trim_frame_end) * fps / target_video_fps extract_frame_total = count_trim_frame_total(video_path, trim_frame_start, trim_frame_end) * fps / video_fps
return math.floor(extract_frame_total) return math.floor(extract_frame_total)
return 0 return 0