Run this notebook

Use Livebook to open this notebook and explore new ideas.

It is easy to get started, on your machine or the cloud.

Click below to open and run it in your Livebook at .

(or change your Livebook location)

# Membrane Quick Start ```elixir Logger.configure(level: :info) Mix.install([ :membrane_hackney_plugin, :membrane_mp3_mad_plugin, :membrane_portaudio_plugin ]) ``` ## Play mp3 ```elixir defmodule MyPipeline do use Membrane.Pipeline @impl true def handle_init(_ctx, mp3_url) do spec = child(%Membrane.Hackney.Source{ location: mp3_url, hackney_opts: [follow_redirect: true] }) |> child(Membrane.MP3.MAD.Decoder) |> child(Membrane.PortAudio.Sink) {[spec: spec], %{}} end end mp3_url = "https://raw.githubusercontent.com/membraneframework/membrane_demo/master/simple_pipeline/sample.mp3" {:ok, _supervisor, pipeline} = Membrane.Pipeline.start_link(MyPipeline, mp3_url) ``` ## Terminate the pipeline ```elixir Membrane.Pipeline.terminate(pipeline) ```
See source

Have you already installed Livebook?

If you already installed Livebook, you can configure the default Livebook location where you want to open notebooks.
Livebook up Checking status We can't reach this Livebook (but we saved your preference anyway)
Run notebook

Not yet? Install Livebook in just a minute

Livebook is open source, free, and ready to run anywhere.

Run on your machine

with Livebook Desktop

Run in the cloud

on select platforms

To run on Linux, Docker, embedded devices, or Elixir’s Mix, check our README.

PLATINUM SPONSORS
SPONSORS
Code navigation with go to definition of modules and functions Read More ×