From fbb7b451fd0f0080b4508297e07ea1409ea91c67 Mon Sep 17 00:00:00 2001 From: Zhichao Date: Sat, 3 Aug 2024 01:43:27 +0800 Subject: [PATCH] fix: `save_video` encoding should be `X264` (#188) use X264 as the fourcc encoding --- vision_agent/tools/tools.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/vision_agent/tools/tools.py b/vision_agent/tools/tools.py index c0af8b21..322a7f25 100644 --- a/vision_agent/tools/tools.py +++ b/vision_agent/tools/tools.py @@ -1069,7 +1069,7 @@ def save_video( ).name height, width, layers = frames[0].shape if frames else (0, 0, 0) - fourcc = cv2.VideoWriter_fourcc(*"mp4v") # type: ignore + fourcc = cv2.VideoWriter_fourcc(*"X264") # type: ignore video = cv2.VideoWriter(output_video_path, fourcc, fps, (width, height)) for frame in frames: video.write(cv2.cvtColor(frame, cv2.COLOR_RGB2BGR))