View Source Boombox (Boombox v0.1.0)
Boombox is a tool for audio and video streaming.
See run/1
for details and examples.livemd for examples.
Summary
Types
@type input() :: (path_or_uri :: String.t()) | {:mp4, location :: String.t(), [{:transport, :file | :http}]} | {:webrtc, webrtc_signaling()} | {:rtmp, (uri :: String.t()) | (client_handler :: pid())} | {:rtsp, url :: String.t()} | {:stream, in_stream_opts()}
@type out_stream_opts() :: [ audio: :binary | boolean(), video: :image | boolean(), audio_format: Membrane.RawAudio.SampleFormat.t(), audio_rate: Membrane.RawAudio.sample_rate_t(), audio_channels: Membrane.RawAudio.channels_t() ]
@type output() :: (path_or_uri :: String.t()) | {:mp4, location :: String.t()} | {:webrtc, webrtc_signaling()} | {:hls, location :: String.t()} | {:stream, out_stream_opts()}
@type webrtc_signaling() :: Membrane.WebRTC.SignalingChannel.t() | String.t()
Functions
@spec run(Enumerable.t() | nil, input: input(), output: output()) :: :ok | Enumerable.t()
Runs boombox with given input and output.
Example
Boombox.run(input: "rtmp://localhost:5432", output: "index.m3u8")
See input/0
and output/0
for available outputs and examples.livemd
for examples.
If the input is {:stream, opts}
, a Stream
or other Enumerable
is expected
as the first argument.
@spec run_cli([String.t()]) :: :ok
Runs boombox with CLI arguments.
Example
# boombox.exs
Mix.install([:boombox])
Boombox.run_cli()
elixir boombox.exs -i "rtmp://localhost:5432" -o "index.m3u8"