check for ffprobe

This commit is contained in:
rany 2022-03-10 15:26:04 +02:00
parent e08b94c6ac
commit 843e6b4b38

View File

@ -13,6 +13,10 @@ if shutil.which("ffmpeg") is None:
print("ffmpeg is not installed")
exit(1)
if shutil.which("ffprobe") is None:
print("ffprobe (part of ffmpeg) is not installed")
exit(1)
def parse_srt(srt_file):
with open(srt_file, "r", encoding="utf-8") as f:
@ -156,8 +160,8 @@ async def _main(srt_data, voice_name, out_file):
["ffmpeg", "-y", "-i", mother_temp_file.name]
+ ffmpeg_opts
+ [temporary_file2.name],
#stdout=subprocess.DEVNULL,
#stderr=subprocess.DEVNULL,
# stdout=subprocess.DEVNULL,
# stderr=subprocess.DEVNULL,
)
if process != 0:
raise Exception("ffmpeg failed")