How can I record my usb webcam to an mp4 format?

30 views Asked by At

I have been trying for hours to record my USB webcam to a .mp4 file format. The only format that works is .avi right now. I am on a RPi using video4linux2.

This code does not work:

ffmpeg -f video4linux2 -framerate 30 -s 1280x720 -i /dev/video0 /home/pi/videos/output.mp4

When opening the file, it gives me an error in my video player. I also tried adding "-f mp4" but that does not work either. Please help. Thanks!

0

There are 0 answers