How to save a video in mp4 format
Currently I am saving my video using VideoWriter oVideoWriter0(/home/MyVideo0.mp4", CV_FOURCC('M','P','4','2'), 20, frameSize);
But when I run the code (in C++) I am getting error message as
[mp4 @ 0x3b887c0] track 0: could not find tag, codec not currently supported in container
I have already installed ffmpeg. My machine has got Ubuntu 14.04. I wanted to save video file either as mp4 or WebM.
Can someone help me.
Try CV_FOURCC('A','V','C','1'). I youtube-dl downloaded a video in the mp4 format and then ran it through a identification program and it it came back A V C 1.
Sixteen line down: http://www.ftyps.com/
Down load command: youtube-dl -o destiny.mp4 -f 18 https://www.youtube.com/watch?v=9ZyQK...