On my Linux system I tried to open the same Video file that was recorded the video previously using following line of code. out = cv2.VideoWriter.open("output.avi ...
This guide helps you install Python, OpenCV, and supporting libraries using Anaconda on any major OS.