RaspberryPi: Difference between revisions

From base48
imported>Rmarko
m (minor fix fmt)
imported>Rmarko
(add link to peripherals pdf)
 
Line 1: Line 1:


Using camera with v4l driver
== Documentation ==
 
* http://elinux.org/RPi_Low-level_peripherals
* http://www.raspberrypi.org/documentation/hardware/raspberrypi/bcm2835/BCM2835-ARM-Peripherals.pdf
 
== Using camera with v4l driver ==


{{cmd|code=
{{cmd|code=

Latest revision as of 16:05, 4 February 2016

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>