优化首帧功能,如果没传入首帧,则提取首帧。
This commit is contained in:
@@ -65,7 +65,7 @@ def _get_first_frame_bytes(video_bytes, output_path):
|
||||
temp_file.write(video_bytes)
|
||||
temp_file_path = temp_file.name # 获取临时文件路径
|
||||
# 打开视频文件
|
||||
_get_first_frame(temp_file_path, output_path)
|
||||
return _get_first_frame(temp_file_path, output_path)
|
||||
except Exception as e:
|
||||
logger.error(f"提取视频首帧时出错: {e}")
|
||||
return None
|
||||
|
||||
Reference in New Issue
Block a user