Skip to content

Commit

Permalink
standardize fps to 1
Browse files Browse the repository at this point in the history
  • Loading branch information
dillonalaird committed Sep 22, 2024
1 parent 44fef88 commit 5f013c8
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion vision_agent/utils/video.py
Original file line number Diff line number Diff line change
Expand Up @@ -61,6 +61,7 @@ def video_writer(
stream.height = height - (height % 2)
stream.width = width - (width % 2)
stream.pix_fmt = "yuv420p"
stream.options = {"crf": "10"}
for frame in frames:
# Remove the alpha channel (convert RGBA to RGB)
frame_rgb = frame[:, :, :3]
Expand All @@ -77,7 +78,7 @@ def video_writer(


def frames_to_bytes(
frames: List[np.ndarray], fps: float = 10, file_ext: str = ".mp4"
frames: List[np.ndarray], fps: float = 1.0, file_ext: str = ".mp4"
) -> bytes:
r"""Convert a list of frames to a video file encoded into a byte string.
Expand Down

0 comments on commit 5f013c8

Please sign in to comment.