{"id":18352837,"url":"https://github.com/membraneframework/membrane_rpicam_plugin","last_synced_at":"2025-04-06T11:33:08.272Z","repository":{"id":209484524,"uuid":"721230399","full_name":"membraneframework/membrane_rpicam_plugin","owner":"membraneframework","description":"Membrane rpicam plugin","archived":false,"fork":false,"pushed_at":"2023-12-15T10:29:44.000Z","size":35,"stargazers_count":2,"open_issues_count":0,"forks_count":1,"subscribers_count":1,"default_branch":"master","last_synced_at":"2024-03-15T13:07:26.789Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"","language":"Elixir","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/membraneframework.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","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":"2023-11-20T16:12:50.000Z","updated_at":"2024-06-10T10:26:13.097Z","dependencies_parsed_at":"2023-12-15T11:32:57.035Z","dependency_job_id":null,"html_url":"https://github.com/membraneframework/membrane_rpicam_plugin","commit_stats":null,"previous_names":["membraneframework-labs/membrane_rpicam_plugin"],"tags_count":6,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/membraneframework%2Fmembrane_rpicam_plugin","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/membraneframework%2Fmembrane_rpicam_plugin/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/membraneframework%2Fmembrane_rpicam_plugin/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/membraneframework%2Fmembrane_rpicam_plugin/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/membraneframework","download_url":"https://codeload.github.com/membraneframework/membrane_rpicam_plugin/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":247478152,"owners_count":20945258,"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":[],"created_at":"2024-11-05T21:37:36.078Z","updated_at":"2025-04-06T11:33:07.929Z","avatar_url":"https://github.com/membraneframework.png","language":"Elixir","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Membrane Rpicam Plugin\n\n[![Hex.pm](https://img.shields.io/hexpm/v/membrane_rpicam_plugin.svg)](https://hex.pm/packages/membrane_rpicam_plugin)\n[![API Docs](https://img.shields.io/badge/api-docs-yellow.svg?style=flat)](https://hexdocs.pm/membrane_rpicam_plugin)\n[![CircleCI](https://circleci.com/gh/membraneframework/membrane_rpicam_plugin.svg?style=svg)](https://circleci.com/gh/membraneframework/membrane_rpicam_plugin)\n\nMembrane Rpicam Plugin allows capturing video from official RaspberryPi camera module using [rpicam-apps](https://github.com/raspberry-pi/rpicam-apps) (formerly libcamera-apps). This plugin can also be used on devices running [Nerves](https://nerves-project.org).\n\n## Installation\n\nThe package can be installed by adding `membrane_rpicam_plugin` to your list of dependencies in `mix.exs`:\n\n```elixir\ndef deps do\n  [\n    {:membrane_rpicam_plugin, \"~\u003e 0.1.5\"}\n  ]\nend\n```\n\nThe package depends on rpicam-apps that need to be present on the target system.\n\n## Usage\n\nThe following script creates and starts a pipeline capturing 5 seconds from the RaspberryPi camera module and saving it to `/data/output.h264`:\n\n```elixir\ndefmodule Rpicam.Pipeline do\n  use Membrane.Pipeline\n  \n  @impl true\n  def handle_init(_ctx, _opts) do\n    spec =   \n      child(:source, %Membrane.Rpicam.Source{timeout: 5000})\n      |\u003e child(:sink, %Membrane.File.Sink{location: \"/data/output.h264\"})\n\n    {[spec: spec], %{}}\n  end\n\n  @impl true\n  def handle_element_end_of_stream(:sink, _pad, _ctx, state) do\n    {[terminate: :normal], state}\n  end\n\n  @impl true\n  def handle_element_end_of_stream(_child, _pad, _ctx, state) do\n    {[], state}\n  end\nend\n\n# Start and monitor the pipeline\n{:ok, _supervisor_pid, pipeline_pid} = Membrane.Pipeline.start_link(Rpicam.Pipeline)\nref = Process.monitor(pipeline_pid)\n\n# Wait for the pipeline to finish\nreceive do\n  {:DOWN, ^ref, :process, _pipeline_pid, _reason} -\u003e\n    :ok\nend\n```\n\n## Copyright and License\n\nCopyright 2022, [Software Mansion](https://swmansion.com/?utm_source=git\u0026utm_medium=readme\u0026utm_campaign=membrane_rpicam_plugin)\n\n[![Software Mansion](https://logo.swmansion.com/logo?color=white\u0026variant=desktop\u0026width=200\u0026tag=membrane-github)](https://swmansion.com/?utm_source=git\u0026utm_medium=readme\u0026utm_campaign=membrane_rpicam_plugin)\n\nLicensed under the [Apache License, Version 2.0](LICENSE)","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmembraneframework%2Fmembrane_rpicam_plugin","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fmembraneframework%2Fmembrane_rpicam_plugin","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmembraneframework%2Fmembrane_rpicam_plugin/lists"}