I want to capture video from a webcam and save it to an mp4 file using opencv. I found example code on stackoverflow (below) that works great. The only hitch is that I\'m trying
This worked for me.
self._name = name + '.mp4' self._cap = VideoCapture(0) self._fourcc = VideoWriter_fourcc(*'MP4V') self._out = VideoWriter(self._name, self._fourcc, 20.0, (640,480))