Membrane Framework

Membrane is a versatile multimedia streaming & processing framework. You can use it to build a media server of your need, that can:
- stream via WebRTC, RTSP, RTMP, HLS, HTTP and other protocols,
- transcode, mix and apply custom processing of video & audio,
- accept and generate / record to MP4, MKV, FLV and other containers,
- handle dynamically connecting and disconnecting streams,
- seamlessly scale and recover from errors,
- do whatever you imagine if you implement it yourself :D Membrane makes it easy to plug in your code at almost any point of processing.
The abbreviations above don't ring any bells? Visit membrane.stream/learn and let Membrane introduce you to the multimedia world!
If you have questions or need consulting, we're for you at our Discord, forum, GitHub discussions, X (Twitter) and via e-mail.
You can also follow Membrane on X (Twitter) or join our Discord to be up to date and get involved in the community.
If you already had a chance to use Membrane, we will be grateful if you could fill out a quick survey to help us improve framework and decide on what to do next.
For people who write Membrane code with AI assistants, we ship a dedicated skill for them.
Membrane is maintained by Software Mansion.
Quick start
Mix.install([
:membrane_hackney_plugin,
:membrane_mp3_mad_plugin,
:membrane_portaudio_plugin,
])
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"
Membrane.Pipeline.start_link(MyPipeline, mp3_url)
This is an Elixir snippet, that streams an mp3 via HTTP and plays it on your speaker. Here's how to run it:
-
Option 1: Click the button below:

It will install Livebook, an interactive notebook similar to Jupyter, and it'll open the snippet in there for you. Then just click the 'run' button in there.
-
Option 2: If you don't want to use Livebook, you can install Elixir, type iex to run the interactive shell and paste the snippet there.
After that, you should hear music playing on your speaker :tada:
To learn step-by-step what exactly happens here, follow this tutorial.
Learning
The best place to learn Membrane is the membrane.stream/learn website and the membrane_demo repository. Try them out, then hack something exciting!
Membrane skill for AI assistants
This repo includes skills/membrane-framework/SKILL.md, a structured guide that helps AI coding assistants write Membrane code.
If you use Claude Code, install it via the plugin system:
/plugin marketplace add membraneframework/membrane_core
/plugin install membrane-framework@membrane
After install, Claude automatically pulls in the skill whenever you work on Membrane code (mentioning Membrane.Pipeline, Bin, Filter, Pad, etc).