mirror of
https://github.com/Comfy-Org/ComfyUI.git
synced 2026-08-17 06:56:07 +08:00
fix: divide by av.time_base when deriving container-level video duration
This commit is contained in:
@@ -52,7 +52,7 @@ def extract_video_metadata(
|
||||
if stream.duration is not None and stream.time_base is not None:
|
||||
duration = float(stream.duration * stream.time_base)
|
||||
elif container.duration is not None:
|
||||
duration = float(container.duration * av.time_base)
|
||||
duration = float(container.duration / av.time_base)
|
||||
frame_count = stream.frames or None
|
||||
if frame_count is None and duration is not None and fps is not None:
|
||||
frame_count = round(duration * fps)
|
||||
|
||||
Reference in New Issue
Block a user