From 69a724d10cf597dda8eac2a3e574fa40cdaffac1 Mon Sep 17 00:00:00 2001 From: bymyself Date: Sat, 8 Aug 2026 20:29:56 -0700 Subject: [PATCH] Name the real cause when an audio-only source cannot be stored The transcode fallback needs a video stream, so an audio-only source whose codec the destination cannot store failed with "No video stream found in file", hiding the codec that actually stopped the save. --- comfy_api/latest/_input_impl/video_types.py | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/comfy_api/latest/_input_impl/video_types.py b/comfy_api/latest/_input_impl/video_types.py index b08a6fc9a..6a0b6afae 100644 --- a/comfy_api/latest/_input_impl/video_types.py +++ b/comfy_api/latest/_input_impl/video_types.py @@ -494,6 +494,11 @@ class VideoFromFile(VideoInput): if self._save_remuxed(container, path, open_kwargs, metadata): return + if video_stream is None: + raise ValueError( + f"Cannot store the audio of '{self.__file}' in this container, and there is no video " + "stream to re-encode it alongside." + ) if bit_depth is None: bit_depth = source_bit_depth if isinstance(path, io.BytesIO):