cap = cv2.VideoCapture('vtest.avi') ... out = cv2.VideoWriter('output.avi',fourcc, 20.0,(int(cap.get(3)),int(cap.get(4)))) make output size same as input size