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.
This commit is contained in:
bymyself
2026-08-08 20:29:56 -07:00
parent 14dbb924e1
commit 69a724d10c

View File

@@ -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):