View Source Membrane MP3 MAD plugin

CircleCI

MP3 decoder based on MAD.

This package is a part of Membrane Multimedia Framework.

Documentation is available at HexDocs

installation

Installation

Add the following line to your deps in mix.exs. Run mix deps.get.

{:membrane_mp3_mad_plugin, "~> 0.11.0"}

You also need to have MAD installed.

sample-usage

Sample usage

Playing below pipeline should read input.mp3, decode and save raw payload to output:

defmodule MadExamplePipeline do
  use Membrane.Pipeline
  alias Pipeline.Spec
  alias Membrane.MP3.MAD
  alias Membrane.Element.File

  @impl true
  def handle_init(_) do
    children = [
      src: %File.Source{location: "input.mp3"},
      decoder: MAD.Decoder,
      sink: %File.Sink{location: "output"},
    ]
    links = %{
      {:src, :source} => {:decoder, :sink},
      {:decoder, :source} => {:sink, :sink}
    }

    {{:ok, %Spec{children: children, links: links}}, %{}}
  end
end

Copyright 2018, Software Mansion

Software Mansion

Licensed under the Apache License, Version 2.0