优化首帧功能,如果没传入首帧,则提取首帧。

This commit is contained in:
liuwei
2025-05-29 16:51:52 +08:00
parent 8da75ba329
commit c1ea58e770

View File

@@ -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