mat-hek
Membrane Core Team
Hi everyone,
I’d like to share with you a new library from the Membrane team - Boombox. It’s a simple streaming tool built on top of Membrane. It’s not as flexible as Membrane, but simpler to learn ![]()
For example, receiving an RTMP stream and broadcasting it via HLS is as simple as
Mix.install([:boombox])
Boombox.run(input: "rtmp://localhost:5432", output: "index.m3u8")
Boombox also allows you to interact with media in the Elixir code using a Stream-based API. For example, here’s how to generate a video and send it to a browser over WebRTC using Boombox and Image:
Mix.install([:boombox, :image, :req])
image =
Req.get!("https://avatars.githubusercontent.com/u/25247695?s=200&v=4").body
|> Image.open!()
angle = Stream.iterate(0, fn a -> rem(a + 3, 360) end)
timestamps =
Stream.iterate(0, fn pts -> pts + div(Membrane.Time.seconds(1), 60) end)
Stream.zip(angle, timestamps)
|> Stream.map(fn {angle, pts} ->
image = Image.rotate!(image, angle) |> Image.thumbnail!(200)
%Boombox.Packet{kind: :video, payload: image, pts: pts}
end)
|> Boombox.run(
input: {:stream, video: :image, audio: false},
output: {:webrtc, "ws://localhost:8830"}
)
And there’s much more - see examples.
More info in the blog post.
We hope that Boombox will make media streaming in Elixir easier for everyone and smooth out the learning curve for Membrane ![]()
Happy streaming!
Trending in News & Updates
Today we’re releasing Oban for Python. Not an Oban client in Python. Not a pythonx wrapper embedded in Elixir. Nope, it’s a fully operati...
New
I’ll be using this thread to share Hologram patch release announcements. Minor releases will continue to get dedicated threads with blog ...
New
This release unifies configuration for queues, repos, and services, swaps opaque timing integers for readable durations, and backports pe...
New
:heart::heart::heart::heart::heart::heart::heart::heart::heart::heart::heart::heart::heart::heart::heart::heart::heart::heart::heart::hea...
New
Bond brings Design by Contract to Elixir: preconditions, postconditions and invariants as executable specifications, checked at runtime a...
New
Aludel 0.7.0 is released :tada:
Since 0.5.0, Aludel has grown into a much more complete LLM evaluation toolkit for Elixir and Phoenix app...
New
Other Trending Topics
I am happy to introduce the very α version of the new programming language compiled to BEAM.
Welcome Cure.
It has literally three kille...
New
Hobbes is a low-level distributed database for the Elixir programming language.
Hobbes provides a simple, safe, and scalable storage lay...
New
Hi there! We created Gust: A task orchestrator inspired by Airflow.
For those who have never heard about Aiflow, it’s a Python-based wor...
New
Beam Bots (or just BB for short) is a framework for building fault-tolerant robotics applications in Elixir using familiar OTP patterns. ...
New
Xamal is a deployment tool for Elixir apps that deploys native releases to bare metal servers over SSH. It’s a port of GitHub - basecamp/...
New
Hello everyone. After busy few months I am happy to announce v0.1.0 of Emerge & Solve.
They are GUI (Emerge) and State management (S...
New
Categories:
Sub Categories:
Forums
Popular Tags
- #ecto
- #liveview
- #troubleshooting
- #learning-elixir
- #library
- #deployment
- #erlang
- #testing
- #genserver
- #mix
- #absinthe
- #remote-other
- #otp
- #plug
- #how-to-question
- #macros
- #postgres
- #elixirconf
- #channels
- #exunit
- #discussion
- #code-sync
- #podcasts
- #javascript
- #onsite
- #dialyzer
- #docker
- #authentication
- #umbrella
- #full-time-contract
- #podcasts-by-brainlid
- #ecto-query
- #elixirconf-us
- #blog-post
- #ai
- #elixir-ls
- #phoenix_html
- #iex
- #graphql
- #genstage
- #websockets
- #supervisor
- #advent-of-code
- #distillery
- #processes
- #api
- #forms
- #hex
- #security
- #metaprogramming










Showing Posts 1 to 10- Show Best Posts
- Show All (oldest first)
- Show All (newest first)
chrismccord
Fantastic work! I can’t wait to play with this.
mat-hek
Thanks! Specially for you, thumbnails
kip
You can just do
Image.open()on a binary too (at least for most common image formats).Great project, can’t wait to give this a spin!
mat-hek
Thanks, that’s much better! And thanks again for Image, it’s been a pleasure to use and docs are wonderful
zachallaun
This is very cool!
I have a locally-running project that’s using MediaMTX to convert some IP camera RTSP streams to WebRTC (WHEP), which I then display in-browser using LiveView JS hooks. It looks like Boombox doesn’t quite replace this yet, but I’m looking forward to the day when I can plug something like this into my application and Phoenix router and have everything done in Elixir-land.
mat-hek
Receiving RTSP and forwarding via WebRTC is already supported:
but it’s point-to-point and WHEP is not there yet. But it’s going to change soon
zachallaun
Yep! I was looking through some issues yesterday and saw that work was being done in
membrane_plugin_webrtcand elsewhereWhat I’d eventually love would be something like…
and be able to hit
. This is just be spitballing, though – everything y’all are doing is insanely cool regardless!
/cams/cam1/whepto get things goingmat-hek
This is very helpful, please keep doing it
I’d love to hear about more potential use cases that people have
rhcarvalho
Fantastic! Does Boombox support transcoding RTMP input to include multiple resolutions in the HLS output? Perhaps offloading the transcoding job to a different server/service?
mat-hek
Not yet. Added to the wishlist though
You may also check out this Membrane plugin: GitHub - membraneframework/membrane_abr_transcoder_plugin: ABR (adaptive bitrate) transcoder, that accepts an h.264 video and outputs multiple variants of it with different qualities. · GitHub