How to generate a 2hour-long blank video

opencv, shell, video

Solution

You can use ffmpeg for this:

ffmpeg -t 7200 -s 640x480 -f rawvideo -pix_fmt rgb24 -r 25 -i /dev/zero empty.mpeg

UPDATE:

-t:       length of the video (in H:m:s format 00:00:00 or in seconds 0.000)
-s:       frame size
-f:       video format
-pix_fmt: pixel format
-r:       fps
-i:       input

Problem

I'd like to generate a video with a black or white background (or even nothing at all) that lasts for a specific duration (e.g. 2 hour long). Can you please suggest a fast way to do it programatically (e.g. command line, OpenCV)? Thanks.

Original source