def create_thumbnail(self, video_path, time, output_path):
try:
subprocess.check_call(['ffmpeg',
'-y',
'-ss',
time,
'-i',
b'{0}'.format(video_path.encode('utf-8')),
'-vframes',
'1',
output_path])
return output_path
except subprocess.CalledProcessError as error:
logger.error(error, exc_info=True)
return output_path
评论列表
文章目录