Ask Your Question

frakman1's profile - activity

2016-03-19 00:44:42 -0600 commented answer How to record video using OpenCV and Python?

Furthermore, I had to change 'XVID' to 'MJPG' before it would play back the recorded file correctly.

fourcc = cv2.VideoWriter_fourcc(*'MJPG')
2016-03-19 00:44:26 -0600 commented answer How to record video using OpenCV and Python?

sigh I wish people would post more complete, helpful answers. I was able to get this to work by explicitly changing the widthxheight of the captured stream like this:

# find the webcam
capture = cv2.VideoCapture(0)

capture.set(3,640)
capture.set(4,480)

MAC OS :10.10.5 Python: 2.7.9 OpenCV: 3.1.0