Skip to content

Commit

Permalink
fix: save_video encoding should be X264 (#188)
Browse files Browse the repository at this point in the history
use X264 as the fourcc encoding
  • Loading branch information
yzld2002 authored Aug 2, 2024
1 parent d30253e commit fbb7b45
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion vision_agent/tools/tools.py
Original file line number Diff line number Diff line change
Expand Up @@ -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))
Expand Down

0 comments on commit fbb7b45

Please sign in to comment.