back

Video recording with Raspberry Pi

created: 2025-6-25

Here are some pitfalls I encountered when trying to record videos with Raspberry Pi.

rpicam-vid's --segment, --split or --circular producing video files that don't work:
you must also pass --inline for them to work.

Video plays in slow motion or faster than the speed it was recorded in:
rpicam-vid produces an unpackaged video (perhaps with Raspberry Pi 5 being an exception).
It seems the video file does not include the framerate or duration of the video,
and the video player guesses the framerate, usually the guess is 30 or 25 FPS.
This can be fixed using the following ffmpeg command:

ffmpeg -r 50 -i input.h264 -c copy output.mp4

Adding "-r 50" before the input file tells ffmpeg its framerate, in this example 50 FPS.