{"id":18352763,"url":"https://github.com/membraneframework/membrane_raw_audio_parser_plugin","last_synced_at":"2025-04-10T00:39:05.523Z","repository":{"id":169431746,"uuid":"643857523","full_name":"membraneframework/membrane_raw_audio_parser_plugin","owner":"membraneframework","description":"Membrane element for parsing raw audio","archived":false,"fork":false,"pushed_at":"2024-04-03T15:16:15.000Z","size":396,"stargazers_count":0,"open_issues_count":0,"forks_count":1,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-04-10T00:39:02.600Z","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-05-22T09:53:22.000Z","updated_at":"2023-09-15T10:25:06.000Z","dependencies_parsed_at":"2023-05-30T09:00:10.698Z","dependency_job_id":"33fdd1a1-cd2d-4d81-b015-80be7b287de8","html_url":"https://github.com/membraneframework/membrane_raw_audio_parser_plugin","commit_stats":null,"previous_names":["membraneframework-labs/membrane_raw_audio_parser_plugin"],"tags_count":4,"template":false,"template_full_name":"membraneframework/membrane_template_plugin","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/membraneframework%2Fmembrane_raw_audio_parser_plugin","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/membraneframework%2Fmembrane_raw_audio_parser_plugin/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/membraneframework%2Fmembrane_raw_audio_parser_plugin/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/membraneframework%2Fmembrane_raw_audio_parser_plugin/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/membraneframework","download_url":"https://codeload.github.com/membraneframework/membrane_raw_audio_parser_plugin/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248138003,"owners_count":21053775,"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:14.958Z","updated_at":"2025-04-10T00:39:05.505Z","avatar_url":"https://github.com/membraneframework.png","language":"Elixir","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Membrane Raw Audio Parser Plugin\n\n[![Hex.pm](https://img.shields.io/hexpm/v/membrane_raw_audio_parser_plugin.svg)](https://hex.pm/packages/membrane_raw_audio_parser_plugin)\n[![API Docs](https://img.shields.io/badge/api-docs-yellow.svg?style=flat)](https://hexdocs.pm/membrane_raw_audio_parser_plugin)\n[![CircleCI](https://circleci.com/gh/membraneframework/membrane_raw_audio_parser_plugin.svg?style=svg)](https://circleci.com/gh/membraneframework/membrane_raw_audio_parser_plugin)\n\nPlugin providing element for parsing raw audio. \nIt will ensure that buffers contain full samples and can overwrite timestamps additionally.\n\nIt is part of [Membrane Multimedia Framework](https://membraneframework.org).\n\n## Installation\n\nThe package can be installed by adding `membrane_raw_audio_parser_plugin ` to your list of dependencies in `mix.exs`:\n\n```elixir\ndef deps do\n  [\n    {:membrane_raw_audio_parser_plugin, \"~\u003e 0.4.0\"}\n  ]\nend\n```\n\n## Usage\n\nIn this example, two audio sources from the internet are mixed and then passed to the player in real-time.\nTo link the audio source to LiveMixer each buffer has to have pts.\nSource 1 is delayed by 5 seconds from source 2.\n\n```elixir\ndefmodule Mixing.Pipeline do\n  use Membrane.Pipeline\n\n  @impl true\n  def handle_init(_ctx, _options) do\n    spec = [\n      child({:source, 1}, %Membrane.Hackney.Source{\n        location:\n          \"https://raw.githubusercontent.com/membraneframework/static/gh-pages/samples/beep-s16le-48kHz-stereo.raw\",\n        hackney_opts: [follow_redirect: true]\n      })\n      |\u003e child({:parser, 1}, %Membrane.RawAudioParser{\n        stream_format: %Membrane.RawAudio{\n          channels: 2,\n          sample_format: :s16le,\n          sample_rate: 48_000\n        },\n        overwrite_pts?: true,\n        pts_offset: Membrane.Time.seconds(5)\n      })\n      |\u003e get_child(:mixer),\n      child({:source, 2}, %Membrane.Hackney.Source{\n        location:\n          \"https://raw.githubusercontent.com/membraneframework/static/gh-pages/samples/beep-s16le-48kHz-stereo.raw\",\n        hackney_opts: [follow_redirect: true]\n      })\n      |\u003e child({:parser, 2}, %Membrane.RawAudioParser{\n        stream_format: %Membrane.RawAudio{\n          channels: 2,\n          sample_format: :s16le,\n          sample_rate: 48_000\n        },\n        overwrite_pts?: true\n      })\n      |\u003e get_child(:mixer),\n      child(:mixer, Membrane.LiveAudioMixer)\n      |\u003e child(:player, Membrane.PortAudio.Sink)\n    ]\n\n    {[spec: spec], %{}}\n  end\nend\n```\n\n## Copyright and License\n\nCopyright 2023, [Software Mansion](https://swmansion.com/?utm_source=git\u0026utm_medium=readme\u0026utm_campaign=membrane)\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)\n\nLicensed under the [Apache License, Version 2.0](LICENSE)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmembraneframework%2Fmembrane_raw_audio_parser_plugin","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fmembraneframework%2Fmembrane_raw_audio_parser_plugin","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmembraneframework%2Fmembrane_raw_audio_parser_plugin/lists"}