### Install Membrane MP3 MAD Plugin (Elixir) Source: https://hexdocs.pm/membrane_mp3_mad_plugin/index Add the Membrane MP3 MAD plugin dependency to your `mix.exs` file. After adding the line, run `mix deps.get` to fetch the dependency. This package relies on the MAD library, which is typically installed automatically. ```elixir {:membrane_mp3_mad_plugin, "~> 0.18.4"} ``` -------------------------------- ### Sample MP3 Decoding Pipeline (Elixir) Source: https://hexdocs.pm/membrane_mp3_mad_plugin/index Demonstrates how to create a Membrane pipeline to read an MP3 file, decode it using the MAD decoder, and save the raw audio payload to a file. This example defines a pipeline with a File source, MAD decoder, and File sink. ```elixir defmodule MadExamplePipeline do use Membrane.Pipeline alias Membrane.MP3.MAD alias Membrane.File @impl true def handle_init(_ctx, _opts) do structure = child(:src, %File.Source{location: "input.mp3"}) |> child(:decoder, MAD.Decoder) |> child(:sink, %File.Sink{location: "output.raw"}) {[spec: structure], %{}} end end ``` -------------------------------- ### Sample MP3 Decoding Pipeline using Membrane MP3 MAD Plugin Source: https://hexdocs.pm/membrane_mp3_mad_plugin/readme This Elixir code defines a sample pipeline using the Membrane Multimedia Framework and the MP3 MAD plugin. It sets up a pipeline that reads an MP3 file ('input.mp3'), decodes it using `Membrane.MP3.MAD.Decoder`, and saves the raw decoded payload to 'output.raw'. ```elixir defmodule MadExamplePipeline do use Membrane.Pipeline alias Membrane.MP3.MAD alias Membrane.File @impl true def handle_init(_ctx, _opts) do structure = child(:src, %File.Source{location: "input.mp3"}) |> child(:decoder, MAD.Decoder) |> child(:sink, %File.Sink{location: "output.raw"}) {[spec: structure], %{}} end end copy ``` -------------------------------- ### Add Membrane MP3 MAD Plugin Dependency in mix.exs Source: https://hexdocs.pm/membrane_mp3_mad_plugin/readme This snippet shows how to add the Membrane MP3 MAD plugin to your project's dependencies in the `mix.exs` file. After adding the line, you should run `mix deps.get` to fetch the package. This plugin requires the MAD library, which is usually linked automatically. ```elixir {:membrane_mp3_mad_plugin, "~> 0.18.4"}copy ``` -------------------------------- ### Membrane MP3 MAD Decoder - Source View Source: https://hexdocs.pm/membrane_mp3_mad_plugin/Membrane.MP3.MAD This entry provides a link to view the source code of the Membrane MP3 MAD decoder plugin. It highlights the plugin's version and its primary function of decoding MPEG audio into S24LE raw data format. ```elixir # View Source Membrane.MP3.MAD.Decoder (Membrane MP3 MAD plugin v0.18.4) # Decodes MPEG audio to raw data in S24LE format ``` === COMPLETE CONTENT === This response contains all available snippets from this library. No additional content exists. Do not make further requests.