This package provides an element for parsing FLAC encoded audio stream. More info can be found in the docs for element module.
The package can be installed by adding membrane_flac_plugin
to your list of dependencies in mix.exs
:
def deps do
[
{:membrane_flac_plugin, "~> 0.12.0"}
]
end
defmodule Membrane.Demo.FlacPipeline do
use Membrane.Pipeline
alias Membrane.{Fake}
@impl true
def handle_init(_opts) do
links = [
child(:file, %Membrane.File.Source{location: "sample.flac"})
|> child(:parser, %Membrane.FLAC.Parser{streaming?: false})
|> child(:fake_sink, Fake.Sink.Buffers)
]
{[spec: links], %{}}
end
end
To run the example:
alias Membrane.Demo.FlacPipeline
{:ok, pid} = FlacPipeline.start_link_supervised!("sample.flac")
FlacPipeline.play(pid)
Dependencies for the example above:
{:membrane_file_plugin, "~> 0.14.0"},
{:membrane_fake_plugin, "~> 0.10.0"},
{:membrane_flac_plugin, "~> 0.12.0"}
This project is sponsored by Abridge AI, Inc.
Copyright 2019, Software Mansion
Licensed under the Apache License, Version 2.0