Frames to video using cv2.VideoWriter() in Python 3

Thank you for the reply. Is there a way in opencv python or ffmpeg python to assemble frames to a video in such a way that the size remains same as the original?