RaspberryPi: Difference between revisions

From base48
imported>Rmarko
(init)
 
imported>Rmarko
m (minor fix fmt)
Line 2: Line 2:
Using camera with v4l driver
Using camera with v4l driver


{{cmd|
{{cmd|code=
modprobe bcm2835-v4l2
modprobe bcm2835-v4l2



Revision as of 17:17, 10 January 2016

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>