{"id":7236,"date":"2018-02-03T13:30:17","date_gmt":"2018-02-03T13:30:17","guid":{"rendered":"http:\/\/blog.bachi.net\/?p=7236"},"modified":"2018-07-02T18:22:04","modified_gmt":"2018-07-02T18:22:04","slug":"raspberry-pi-3-camera","status":"publish","type":"post","link":"https:\/\/blog.bachi.net\/?p=7236","title":{"rendered":"Raspberry Pi 3, Camera"},"content":{"rendered":"<p><a href=\"https:\/\/picamera.readthedocs.io\/en\/release-1.13\/fov.html\">Camera Hardware<\/a>, CPU -> VCHI -> GPU, shared RAM, MMAL<\/p>\n<p><a href=\"https:\/\/www.raspberrypi.org\/documentation\/usage\/camera\/\">Camera Module Usage<\/a><\/p>\n<ul>\n<li><a href=\"https:\/\/www.raspberrypi.org\/documentation\/usage\/camera\/raspicam\/raspistill.md\"><code>raspistill<\/code><\/a>, capturing still photographs with the camera module<\/li>\n<li><a href=\"https:\/\/www.raspberrypi.org\/documentation\/usage\/camera\/raspicam\/raspivid.md\"><code>raspivid<\/code><\/a>, capturing video with the camera module<\/li>\n<\/ul>\n<ul>\n<li><a href=\"https:\/\/en.wikipedia.org\/wiki\/Camera_Serial_Interface\">Camera Serial Interface (CSI)<\/a>\n<li>Broadcom 2835 camera driver (bcm2835-v4l2)<\/li>\n<li>VideoCore (VC)<\/li>\n<li>VideoCore Host Interface Queue (vchiq) driver => <a href=\"https:\/\/raspberrypi.stackexchange.com\/questions\/54571\/what-is-dev-vchiq-in-raspberry-pi\">What is \/dev\/vchiq in Raspberry Pi?<\/a><\/li>\n<li><a href=\"http:\/\/www.jvcref.com\/files\/PI\/documentation\/html\/\">Multi-Media Abstraction Layer (MMAL)<\/a><\/li>\n<\/ul>\n<h2>API \/ Programmierschnittstelle<\/h2>\n<h4>Wikipedia<\/h4>\n<p><a href=\"https:\/\/de.wikipedia.org\/wiki\/Video4Linux\">Video4Linux (V4L)<\/a> => V4L2 f\u00fcr Version 2<br \/>\n<a href=\"https:\/\/de.wikipedia.org\/wiki\/Video_for_Windows\">Video for Windows (VfW)<\/a> (alt) => Windows 3.1 (1992)<br \/>\n<a href=\"https:\/\/en.wikipedia.org\/wiki\/Windows_Driver_Model\">Windows Driver Model (WDM)<\/a> (alt)<br \/>\n<a href=\"https:\/\/en.wikipedia.org\/wiki\/Windows_Driver_Frameworks\">Windows Driver Frameworks (WDF, formerly Windows Driver Foundation)<\/a> (ab Windows 2000 bis Windows 10)<br \/>\n<a href=\"https:\/\/de.wikipedia.org\/wiki\/DirectX#DirectShow_.28ehemals_.E2.80.9EDirect_Media.E2.80.9C.29\">DirectShow<\/a> (war Teil von DirectX, ist nun Bestandteil der Windows-Plattform)<\/p>\n<h4>linuxtv.org (official)<\/h4>\n<p><a href=\"https:\/\/linuxtv.org\/wiki\/index.php\/Development:_Video4Linux_APIs\">Development: Video4Linux APIs<\/a> => Video4Linux2 V4L2<\/p>\n<h2>Tutorials<\/h2>\n<p><a href=\"https:\/\/blogs.s-osg.org\/use-v4l2-cameras-raspberry-pi-3-upstream-kernel\/\">How to use V4L2 Cameras on the Raspberry Pi 3 with an Upstream Kernel<\/a><br \/>\n<a href=\"https:\/\/stackoverflow.com\/questions\/2739376\/definition-of-downstream-and-upstream\">Definition of \u201cdownstream\u201d and \u201cupstream\u201d<\/a><\/p>\n<ul>\n<li>Staging<\/li>\n<li>Mainline<\/li>\n<li>Upstream<\/li>\n<li>Downstream<\/li>\n<ul>\n<a href=\"https:\/\/github.com\/raspberrypi\/linux\/wiki\/Upstreaming\">Raspberry PI Upstreaming<\/a><br \/>\n<a href=\"https:\/\/github.com\/torvalds\/linux\/commit\/7b3ad5abf027b7643b38c4006d7f4ce47a86dd3a\">staging: Import the BCM2835 MMAL-based V4L2 camera driver. <\/a><br \/>\n<a href=\"https:\/\/www.raspberrypi.org\/forums\/viewtopic.php?f=43&#038;t=110103\">Help learning MMAL\/contributing to userland utils<\/a><br \/>\n<a href=\"https:\/\/github.com\/techyian\/MMALSharp\/wiki\/What-is-MMAL%3F\">What is MMAL?<\/a><\/p>\n<h2>Programs<\/h2>\n<p><a href=\"https:\/\/github.com\/raspberrypi\/userland\/tree\/master\/host_applications\/linux\/apps\/raspicam\">github.com\/raspberrypi\/userland\/tree\/master\/host_applications\/linux\/apps\/raspicam<\/a><\/p>\n<h3>USB-Webcam<\/h3>\n<pre class=\"brush: plain; title: Kernel Output; notranslate\" title=\"Kernel Output\">\r\nLinux media interface\r\nLinux video capture interface\r\n<\/pre>\n<pre class=\"brush: plain; title: Snapshots\/Einzelbilder erstellen; notranslate\" title=\"Snapshots\/Einzelbilder erstellen\">\r\n$ sudo apt-get install fswebcam\r\n&#x5B;...]\r\nThe following NEW packages will be installed:\r\n  fontconfig-config fonts-dejavu-core fswebcam libfontconfig1 libgd3 libjbig0 libtiff5 libwebp6 libxpm4\r\n&#x5B;...]\r\n\r\n$ fswebcam &#x5B;&lt;options&gt;] &lt;filename&gt;\r\n$ fswebcam\r\n-r 640x480       # Aufl\u00f6sung festlegen\r\n-d \/dev\/video0   # Welches Device wird benutzt\r\n-v               # Verbose -&gt; Ausf\u00fchrliche Ausgabe\r\n\/tmp\/test.jpg    # Ausgabe-Datei \r\n<\/pre>\n<pre class=\"brush: plain; title: Video erstellen; notranslate\" title=\"Video erstellen\">\r\n\r\n$ sudo apt-get install motion\r\n&#x5B;...]\r\nThe following NEW packages will be installed:\r\n  ffmpeg libaacs0 libass5 libasyncns0 libavc1394-0 libavcodec57 libavdevice57 libavfilter6 libavformat57 libavresample3\r\n  libavutil55 libbdplus0 libbluray1 libbs2b0 libcaca0 libcairo2 libcdio-cdda1 libcdio-paranoia1 libcdio13\r\n  libchromaprint1 libdc1394-22 libdrm-amdgpu1 libdrm-freedreno1 libdrm-nouveau2 libdrm-radeon1 libebur128-1 libegl1-mesa\r\n  libfftw3-double3 libflac8 libflite1 libfribidi0 libgbm1 libgl1-mesa-dri libgl1-mesa-glx libglapi-mesa libgme0\r\n  libgraphite2-3 libgsm1 libharfbuzz0b libice6 libiec61883-0 libjack-jackd2-0 libllvm3.9 libmariadbclient18 libmp3lame0\r\n  libmpg123-0 libogg0 libopenal-data libopenal1 libopencv-core2.4v5 libopencv-imgproc2.4v5 libopenjp2-7 libopenmpt0\r\n  libopus0 libpgm-5.2-0 libpixman-1-0 libpostproc54 libpq5 libpulse0 libraw1394-11 librubberband2 libsdl2-2.0-0 libsensors4\r\n  libshine3 libsm6 libsnappy1v5 libsndfile1 libsndio6.1 libsodium18 libsoxr0 libspeex1 libssh-gcrypt-4\r\n  libswresample2 libswscale4 libtheora0 libtwolame0 libtxc-dxtn-s2tc libva-drm1 libva-x11-1 libva1 libvdpau-va-gl1 libvdpau1\r\n  libvorbis0a libvorbisenc2 libvorbisfile3 libvpx4 libwavpack1 libwayland-client0 libwayland-cursor0\r\n  libwayland-egl1-mesa libwayland-server0 libwebpmux2 libx11-xcb1 libx264-148 libx265-95 libxcb-dri2-0 libxcb-dri3-0 libxcb-glx0\r\n  libxcb-present0 libxcb-render0 libxcb-shape0 libxcb-shm0 libxcb-sync1 libxcb-xfixes0 libxcursor1\r\n  libxdamage1 libxfixes3 libxi6 libxinerama1 libxkbcommon0 libxrandr2 libxrender1 libxshmfence1 libxss1 libxtst6 libxv1 libxvidcore4\r\n  libxxf86vm1 libzmq5 libzvbi-common libzvbi0 mesa-va-drivers mesa-vdpau-drivers motion mysql-common va-driver-all vdpau-driver-all\r\n  x11-common\r\n&#x5B;...]\r\nSetting up motion (4.0-1) ...\r\nAdding group `motion' (GID 113) ...\r\nDone.\r\nWarning: The home dir \/var\/lib\/motion you specified already exists.\r\nAdding system user `motion' (UID 109) ...\r\nAdding new user `motion' (UID 109) with group `motion' ...\r\nThe home directory `\/var\/lib\/motion' already exists.  Not copying from `\/etc\/skel'.\r\nadduser: Warning: The home directory `\/var\/lib\/motion' does not belong to the user you are currently creating.\r\nAdding user `motion' to group `video' ...\r\nAdding user motion to group video\r\nDone.\r\n\r\n$ sudo vi \/etc\/default\/motion\r\nstart_motion_daemon=no =&gt; yes\r\n\r\n$ sudo mkdir \/srv\/motion\r\n$ sudo chown motion:motion \/srv\/motion\r\n<\/pre>\n","protected":false},"excerpt":{"rendered":"<p>Camera Hardware, CPU -> VCHI -> GPU, shared RAM, MMAL Camera Module Usage raspistill, capturing still photographs with the camera module raspivid, capturing video with the camera module Camera Serial Interface (CSI) Broadcom 2835 camera driver (bcm2835-v4l2) VideoCore (VC) VideoCore Host Interface Queue (vchiq) driver => What is \/dev\/vchiq in Raspberry Pi? Multi-Media Abstraction Layer [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[1],"tags":[],"class_list":["post-7236","post","type-post","status-publish","format-standard","hentry","category-uncategorized"],"_links":{"self":[{"href":"https:\/\/blog.bachi.net\/index.php?rest_route=\/wp\/v2\/posts\/7236","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/blog.bachi.net\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/blog.bachi.net\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/blog.bachi.net\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/blog.bachi.net\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=7236"}],"version-history":[{"count":19,"href":"https:\/\/blog.bachi.net\/index.php?rest_route=\/wp\/v2\/posts\/7236\/revisions"}],"predecessor-version":[{"id":7948,"href":"https:\/\/blog.bachi.net\/index.php?rest_route=\/wp\/v2\/posts\/7236\/revisions\/7948"}],"wp:attachment":[{"href":"https:\/\/blog.bachi.net\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=7236"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/blog.bachi.net\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=7236"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/blog.bachi.net\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=7236"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}