Ask Your Question

Revision history [back]

click to hide/show revision 1
initial version

Oh, you are right the webcam frame size is 1024, 1280. I used this

# Define the codec and create VideoWriter object
fourcc = cv2.VideoWriter_fourcc(*'XVID')
out = cv2.VideoWriter('output.avi',fourcc, 20.0, (int(cap.get(3)), int(cap.get(4))))

and video is saving now :) :) !!!. Thank you. But in website this code was given https://docs.opencv.org/3.0-beta/doc/py_tutorials/py_gui/py_video_display/py_video_display.html