First time here? Check out the FAQ!
answered Jun 19 '13
You should write this part out of Loop
writer = cv2.VideoWriter(vidDir, fourcc, 30, (width,height))
because it construct a new video file at each iteration.