diff --git a/userge/utils/tools.py b/userge/utils/tools.py index 9e839e026..5bee87a20 100644 --- a/userge/utils/tools.py +++ b/userge/utils/tools.py @@ -94,7 +94,7 @@ async def take_screen_shot(video_file: str, duration: int, path: str = '') -> Op _LOG.info('[[[Extracting a frame from %s ||| Video duration => %s]]]', video_file, duration) ttl = duration // 2 thumb_image_path = path or os.path.join(userge.Config.DOWN_PATH, f"{basename(video_file)}.jpg") - command = f"ffmpeg -ss {ttl} -i '{video_file}' -vframes 1 '{thumb_image_path}'" + command = f'''ffmpeg -ss {ttl} -i "{video_file}" -vframes 1 "{thumb_image_path}"''' err = (await runcmd(command))[1] if err: _LOG.error(err)