import cv2

clip = cv2.VideoCapture("Left.mp4")

frame_width = int(4000)
frame_height = int(3000)

out = cv2.VideoWriter(
    "outpy.avi",
    cv2.VideoWriter_fourcc("M", "J", "P", "G"),
    25,
    (frame_width, frame_height),
)

index = 0

while 1:
    ret, frame = clip.read()
    if not ret:
        break
    if index == 100:
        break
    index += 1
    out.write(frame)


clip.release()
out.release()

# cv2.destroyAllWindows()
