Using a Raspberry Pi Camera Board with FFmpeg

Open raspi-config (Enable Camera and change GPU Memory to 256)
raspi-config
Update Package List
sudo apt update
Install v4l-utils and ffmpeg
sudo apt install v4l-utils ffmpeg
List Formats (two techniques)
ffmpeg -f v4l2 -list_formats all -i /dev/video0<br>v4l2-ctl --list-formats-ext
Preview Camera
ffplay -fs -f v4l2 -input_format h264 -video_size 1920x1080 -framerate 30 -i /dev/video0
Record Camera
ffmpeg -f v4l2 -input_format h264 -video_size 1920x1080 -framerate 30 -i /dev/video0 -vcodec copy video.mp4
Play Video
ffplay video.mp4

Leave a comment

Your email address will not be published. Required fields are marked *