fourcc = cv2.cv.CV_FOURCC(*\'XVID\')
The above line is used for avi video. In the same fashion, which codec do we use for mp4 videos in Ubuntu?
This is an old question. But, if anyone is facing an issue lately using the codec who can't get a saved video. They can use 0X00000021 as the codec value for OpenCV 3 and later.
0X00000021