I am trying to save a video as .avi format but i keep getting the error \"could not demultiplex stream\". I primarily want to save grayscale videos
.avi
\"could not demultiplex stream\"
For Windows OS try:
out = cv2.VideoWriter(outfilename, fourcc, fps, (width, height), 0)