raspivid
is the command line tool for capturing video with the camera module.
With the camera module connected and enabled, record a video using the following command:
raspivid -o vid.h264
Remember to use -hf
and -vf
to flip the image if required, like with raspistill
This will save a 5 second video file to the path given here as vid.h264
(default length of time).
To specify the length of the video taken, pass in the -t
flag with a number of milliseconds. For example:
raspivid -o video.h264 -t 10000
This will record 10 seconds of video.
For a full list of possible options, run raspivid
with no arguments, or pipe this command through less
and scroll through:
raspivid 2>&1 | less
Use the arrow keys to scroll and type q
to exit.
Full documentation of the camera can be found at hardware/camera.