def findBackends() -> Munch:
tools = Munch(ffmpeg=None, ffprobe=None, mediainfo=None)
for backend in tools.keys():
for exe in VideoService.config.binaries[os.name][backend]:
binpath = QDir.toNativeSeparators('{0}/bin/{1}'.format(VideoService.getAppPath(), exe))
if binpath is not None and os.path.isfile(binpath):
tools[backend] = binpath
break
else:
binpath = find_executable(exe)
if binpath is not None and os.path.isfile(binpath):
tools[backend] = binpath
break
if tools.ffmpeg is None:
raise FFmpegNotFoundException('Could not locate any ffmpeg or libav executable on your operating system')
return tools
评论列表
文章目录