This commit is contained in:
游雁 2024-03-18 15:01:42 +08:00
parent ee4bf7fba4
commit 27c7f88643

View File

@ -19,11 +19,9 @@ from subprocess import CalledProcessError, run
def is_ffmpeg_installed():
try:
# 尝试运行ffmpeg命令并获取其版本信息
output = subprocess.check_output(['ffmpeg', '-version'], stderr=subprocess.STDOUT)
return 'ffmpeg version' in output.decode('utf-8')
except (subprocess.CalledProcessError, FileNotFoundError):
# 若运行ffmpeg命令失败则认为ffmpeg未安装
return False
use_ffmpeg=False