{"id":13752459,"url":"https://github.com/kbingham/libcamera","last_synced_at":"2025-05-16T12:09:08.472Z","repository":{"id":39858718,"uuid":"184227280","full_name":"kbingham/libcamera","owner":"kbingham","description":"libcamera - Making complex cameras easy. This is a personal fork, please use the upstream repository at https://git.libcamera.org/libcamera/libcamera.git/","archived":false,"fork":false,"pushed_at":"2025-03-25T12:34:41.000Z","size":13014,"stargazers_count":175,"open_issues_count":19,"forks_count":69,"subscribers_count":9,"default_branch":"master","last_synced_at":"2025-03-26T08:03:01.978Z","etag":null,"topics":["ipu3","libcamera","linux","linux-surface","raspberry-pi-camera","rkisp1","v4l2"],"latest_commit_sha":null,"homepage":"https://libcamera.org","language":"C++","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"other","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/kbingham.png","metadata":{"files":{"readme":"README.rst","changelog":null,"contributing":null,"funding":null,"license":"COPYING.rst","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2019-04-30T08:53:34.000Z","updated_at":"2025-03-25T12:34:45.000Z","dependencies_parsed_at":"2023-09-23T13:53:27.959Z","dependency_job_id":"a8ecb195-61b3-4e8e-a272-0a7c395fb3d1","html_url":"https://github.com/kbingham/libcamera","commit_stats":null,"previous_names":[],"tags_count":12,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/kbingham%2Flibcamera","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/kbingham%2Flibcamera/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/kbingham%2Flibcamera/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/kbingham%2Flibcamera/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/kbingham","download_url":"https://codeload.github.com/kbingham/libcamera/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":246777832,"owners_count":20832032,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["ipu3","libcamera","linux","linux-surface","raspberry-pi-camera","rkisp1","v4l2"],"created_at":"2024-08-03T09:01:06.181Z","updated_at":"2025-05-16T12:09:08.465Z","avatar_url":"https://github.com/kbingham.png","language":"C++","readme":".. SPDX-License-Identifier: CC-BY-SA-4.0\n\n===========\n libcamera\n===========\n\n**A complex camera support library for Linux, Android, and ChromeOS**\n\nCameras are complex devices that need heavy hardware image processing\noperations. Control of the processing is based on advanced algorithms that must\nrun on a programmable processor. This has traditionally been implemented in a\ndedicated MCU in the camera, but in embedded devices algorithms have been moved\nto the main CPU to save cost. Blurring the boundary between camera devices and\nLinux often left the user with no other option than a vendor-specific\nclosed-source solution.\n\nTo address this problem the Linux media community has very recently started\ncollaboration with the industry to develop a camera stack that will be\nopen-source-friendly while still protecting vendor core IP. libcamera was born\nout of that collaboration and will offer modern camera support to Linux-based\nsystems, including traditional Linux distributions, ChromeOS and Android.\n\n.. section-begin-getting-started\n\nGetting Started\n---------------\n\nTo fetch the sources, build and install:\n\n.. code::\n\n  git clone https://git.libcamera.org/libcamera/libcamera.git\n  cd libcamera\n  meson setup build\n  ninja -C build install\n\nDependencies\n~~~~~~~~~~~~\n\nThe following Debian/Ubuntu packages are required for building libcamera.\nOther distributions may have differing package names:\n\nA C++ toolchain: [required]\n        Either {g++, clang}\n\nMeson Build system: [required]\n        meson (\u003e= 0.63) ninja-build pkg-config\n\nfor the libcamera core: [required]\n        libyaml-dev python3-yaml python3-ply python3-jinja2\n\nfor IPA module signing: [recommended]\n        Either libgnutls28-dev or libssl-dev, openssl\n\n        Without IPA module signing, all IPA modules will be isolated in a\n        separate process. This adds an unnecessary extra overhead at runtime.\n\nfor improved debugging: [optional]\n        libdw-dev libunwind-dev\n\n        libdw and libunwind provide backtraces to help debugging assertion\n        failures. Their functions overlap, libdw provides the most detailed\n        information, and libunwind is not needed if both libdw and the glibc\n        backtrace() function are available.\n\nfor device hotplug enumeration: [optional]\n        libudev-dev\n\nfor documentation: [optional]\n        python3-sphinx doxygen graphviz texlive-latex-extra\n\nfor gstreamer: [optional]\n        libgstreamer1.0-dev libgstreamer-plugins-base1.0-dev\n\nfor Python bindings: [optional]\n        libpython3-dev pybind11-dev\n\nfor cam: [optional]\n        libevent-dev is required to support cam, however the following\n        optional dependencies bring more functionality to the cam test\n        tool:\n\n        - libdrm-dev: Enables the KMS sink\n        - libjpeg-dev: Enables MJPEG on the SDL sink\n        - libsdl2-dev: Enables the SDL sink\n        - libtiff-dev: Enables writing DNG\n\nfor qcam: [optional]\n        libtiff-dev qt6-base-dev\n\nfor tracing with lttng: [optional]\n        liblttng-ust-dev python3-jinja2 lttng-tools\n\nfor android: [optional]\n        libexif-dev libjpeg-dev\n\nfor lc-compliance: [optional]\n        libevent-dev libgtest-dev\n\nfor abi-compat.sh: [optional]\n        abi-compliance-checker\n\nBasic testing with cam utility\n~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~\n\nThe ``cam`` utility can be used for basic testing. You can list the cameras\ndetected on the system with ``cam -l``, and capture ten frames from the first\ncamera and save them to disk with ``cam -c 1 --capture=10 --file``. See\n``cam -h`` for more information about the ``cam`` tool.\n\nIn case of problems, a detailed debug log can be obtained from libcamera by\nsetting the ``LIBCAMERA_LOG_LEVELS`` environment variable:\n\n.. code::\n\n    :~$ LIBCAMERA_LOG_LEVELS=*:DEBUG cam -l\n\nUsing GStreamer plugin\n~~~~~~~~~~~~~~~~~~~~~~\n\nTo use the GStreamer plugin from the source tree, use the meson ``devenv``\ncommand.  This will create a new shell instance with the ``GST_PLUGIN_PATH``\nenvironment set accordingly.\n\n.. code::\n\n  meson devenv -C build\n\nThe debugging tool ``gst-launch-1.0`` can be used to construct a pipeline and\ntest it. The following pipeline will stream from the camera named \"Camera 1\"\nonto the OpenGL accelerated display element on your system.\n\n.. code::\n\n  gst-launch-1.0 libcamerasrc camera-name=\"Camera 1\" ! queue ! glimagesink\n\nTo show the first camera found you can omit the camera-name property, or you\ncan list the cameras and their capabilities using:\n\n.. code::\n\n  gst-device-monitor-1.0 Video\n\nThis will also show the supported stream sizes which can be manually selected\nif desired with a pipeline such as:\n\n.. code::\n\n  gst-launch-1.0 libcamerasrc ! 'video/x-raw,width=1280,height=720' ! \\\n       queue ! glimagesink\n\nThe libcamerasrc element has two log categories, named libcamera-provider (for\nthe video device provider) and libcamerasrc (for the operation of the camera).\nAll corresponding debug messages can be enabled by setting the ``GST_DEBUG``\nenvironment variable to ``libcamera*:7``.\n\nPresently, to prevent element negotiation failures it is required to specify\nthe colorimetry and framerate as part of your pipeline construction. For\ninstance, to capture and encode as a JPEG stream and receive on another device\nthe following example could be used as a starting point:\n\n.. code::\n\n   gst-launch-1.0 libcamerasrc ! \\\n        video/x-raw,colorimetry=bt709,format=NV12,width=1280,height=720,framerate=30/1 ! \\\n        queue ! jpegenc ! multipartmux ! \\\n        tcpserversink host=0.0.0.0 port=5000\n\nWhich can be received on another device over the network with:\n\n.. code::\n\n   gst-launch-1.0 tcpclientsrc host=$DEVICE_IP port=5000 ! \\\n        multipartdemux ! jpegdec ! autovideosink\n\nThe GStreamer element also supports multiple streams. This is achieved by\nrequesting additional source pads. Downstream caps filters can be used\nto choose specific parameters like resolution and pixel format. The pad\nproperty ``stream-role`` can be used to select a role.\n\nThe following example displays a 640x480 view finder while streaming JPEG\nencoded 800x600 video. You can use the receiver pipeline above to view the\nremote stream from another device.\n\n.. code::\n\n   gst-launch-1.0 libcamerasrc name=cs src::stream-role=view-finder src_0::stream-role=video-recording \\\n       cs.src ! queue ! video/x-raw,width=640,height=480 ! videoconvert ! autovideosink \\\n       cs.src_0 ! queue ! video/x-raw,width=800,height=600 ! videoconvert ! \\\n       jpegenc ! multipartmux ! tcpserversink host=0.0.0.0 port=5000\n\n.. section-end-getting-started\n\nTroubleshooting\n~~~~~~~~~~~~~~~\n\nSeveral users have reported issues with meson installation, crux of the issue\nis a potential version mismatch between the version that root uses, and the\nversion that the normal user uses. On calling `ninja -C build`, it can't find\nthe build.ninja module. This is a snippet of the error message.\n\n::\n\n  ninja: Entering directory `build'\n  ninja: error: loading 'build.ninja': No such file or directory\n\nThis can be solved in two ways:\n\n1. Don't install meson again if it is already installed system-wide.\n\n2. If a version of meson which is different from the system-wide version is\n   already installed, uninstall that meson using pip3, and install again without\n   the --user argument.\n","funding_links":[],"categories":["Open Source Camera Driver"],"sub_categories":["Examples"],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fkbingham%2Flibcamera","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fkbingham%2Flibcamera","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fkbingham%2Flibcamera/lists"}