Skip to content

Latest commit

 

History

History
52 lines (32 loc) · 1.62 KB

README.md

File metadata and controls

52 lines (32 loc) · 1.62 KB

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

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

	{:membrane_mp3_mad_plugin, "~> 0.18.4"}

This package depends on the MAD library. The precompiled build will be pulled and linked automatically. However, should there be any problems, consider installing it manually.

Sample usage

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

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

Copyright and License

Copyright 2018, Software Mansion

Software Mansion

Licensed under the Apache License, Version 2.0