diff --git a/comfy_api/latest/_input_impl/video_types.py b/comfy_api/latest/_input_impl/video_types.py index 57c6df656..6b6965d68 100644 --- a/comfy_api/latest/_input_impl/video_types.py +++ b/comfy_api/latest/_input_impl/video_types.py @@ -243,8 +243,8 @@ class VideoFromFile(VideoInput): audio = None container.seek(start_pts, stream=video_stream) # Use last stream for consistency - audio_stream = container.streams.audio[-1] - if audio_stream: + if len(container.streams.audio): + audio_stream = container.streams.audio[-1] audio_frames = [] resample = av.audio.resampler.AudioResampler(format='fltp').resample frames = itertools.chain.from_iterable(