RaspberryPi

From base48

Documentation

Using camera with v4l driver

<syntaxhighlight lang="bash">modprobe bcm2835-v4l2

  1. viewfinder

v4l2-ctl --overlay=1 # enable viewfinder v4l2-ctl --overlay=0 # disable viewfinder

  1. record video

v4l2-ctl --set-fmt-video=width=1920,height=1088,pixelformat=4 v4l2-ctl --stream-mmap=3 --stream-count=100 --stream-to=somefile.264

  1. capture jpeg

v4l2-ctl --set-fmt-video=width=2592,height=1944,pixelformat=3 v4l2-ctl --stream-mmap=3 --stream-count=1 --stream-to=somefile.jpg

  1. set bitrate

v4l2-ctl --set-ctrl video_bitrate=10000000

  1. list supported formats

v4l2-ctl --list-formats</syntaxhighlight>