feat(新功能): pose transform 部署
fix(修复bug): docs(文档变更): refactor(重构): test(增加测试):
This commit is contained in:
@@ -53,9 +53,8 @@ def upload_video(frames, user_id, category, file_name):
|
|||||||
object_name = f'{user_id}/{category}/{file_name}'
|
object_name = f'{user_id}/{category}/{file_name}'
|
||||||
# 创建视频写入器
|
# 创建视频写入器
|
||||||
fps = 24 # 帧率
|
fps = 24 # 帧率
|
||||||
video_path = "output.mp4"
|
|
||||||
fourcc = cv2.VideoWriter_fourcc(*'mp4v')
|
fourcc = cv2.VideoWriter_fourcc(*'mp4v')
|
||||||
video_writer = cv2.VideoWriter(video_path, fourcc, fps, (768, 512))
|
video_writer = cv2.VideoWriter(file_name, fourcc, fps, (768, 512))
|
||||||
|
|
||||||
# 逐帧写入
|
# 逐帧写入
|
||||||
for frame in frames:
|
for frame in frames:
|
||||||
@@ -65,7 +64,7 @@ def upload_video(frames, user_id, category, file_name):
|
|||||||
minio_client.fput_object(
|
minio_client.fput_object(
|
||||||
"aida-users",
|
"aida-users",
|
||||||
object_name,
|
object_name,
|
||||||
video_path,
|
file_name,
|
||||||
content_type="video/mp4" # 指定MIME类型确保可在线播放[9](@ref)
|
content_type="video/mp4" # 指定MIME类型确保可在线播放[9](@ref)
|
||||||
)
|
)
|
||||||
return f"aida-users/{object_name}"
|
return f"aida-users/{object_name}"
|
||||||
|
|||||||
Reference in New Issue
Block a user