Skip to content
This repository has been archived by the owner on May 15, 2021. It is now read-only.

Commit

Permalink
A little change to fix "ERROR: No closing quotation" (#203)
Browse files Browse the repository at this point in the history
This will fix this https://nekobin.com/sayufenose error.

It is caused by the use of apostrophe + s ('s) in  the file name. 
You can reproduce this error by making a directory like `Newton's law of motion/lect1.mp4` . And after giving upload command.

(It will give you error while taking screenshot for lect1.mp4)
  • Loading branch information
gautamajay52 authored and code-rgb committed Nov 29, 2020
1 parent 15999be commit 8170cdf
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion userge/utils/tools.py
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down

0 comments on commit 8170cdf

Please sign in to comment.