Use VideoWriter class to save video in mp4 container.
From the openCV documentation i found out that it only supports avi container to store video captured from the webcam. Is there a way where I can use an mp4 container?