Working version of recording avi with opencv2 without display.