Check is audio file at least 1024 bytes to use it

This commit is contained in:
Zen 2021-04-28 17:00:47 +03:00
parent 5b5f74c7e0
commit 6b3353423e

View file

@ -50,7 +50,7 @@ def concatenate_ffmpeg(temp: Path, output: Path, encoder: str):
# Add the audio/subtitles/else file if one was extracted from the input # Add the audio/subtitles/else file if one was extracted from the input
audio_file = temp / "audio.mkv" audio_file = temp / "audio.mkv"
if audio_file.exists(): if audio_file.exists() and audio_file.size() > 1024:
audio = ("-i", audio_file.as_posix(), "-c", "copy", "-map", "1") audio = ("-i", audio_file.as_posix(), "-c", "copy", "-map", "1")
else: else:
audio = () audio = ()