Skip to content

Commit

Permalink
update examples
Browse files Browse the repository at this point in the history
  • Loading branch information
mat-hek committed Jul 31, 2024
1 parent 8812bd4 commit 5f6c646
Showing 1 changed file with 6 additions and 6 deletions.
12 changes: 6 additions & 6 deletions examples.livemd
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ out_dir = "#{__DIR__}/examples_outputs"
To receive the stream, visit http://localhost:1234/stream_to_browser/index.html after running the cell below

```elixir
Boombox.run(input: bbb_mp4, output: [:webrtc, "ws://localhost:8830"])
Boombox.run(input: bbb_mp4, output: {:webrtc, "ws://localhost:8830"})
```

<!-- livebook:{"branch_parent_index":0} -->
Expand All @@ -47,7 +47,7 @@ Boombox.run(input: bbb_mp4, output: [:webrtc, "ws://localhost:8830"])
To send the stream, visit http://localhost:1234/stream_from_browser/index.html

```elixir
Boombox.run(input: [:webrtc, "ws://localhost:8829"], output: "#{out_dir}/webrtc_to_mp4.mp4")
Boombox.run(input: {:webrtc, "ws://localhost:8829"}, output: "#{out_dir}/webrtc_to_mp4.mp4")
```

```elixir
Expand All @@ -61,7 +61,7 @@ System.shell("ffplay #{out_dir}/webrtc_to_mp4.mp4")
Visit http://localhost:1234/stream_from_browser/index.html to send the stream and http://localhost:1234/stream_to_browser/index.html to receive it

```elixir
Boombox.run(input: [:webrtc, "ws://localhost:8829"], output: [:webrtc, "ws://localhost:8830"])
Boombox.run(input: {:webrtc, "ws://localhost:8829"}, output: {:webrtc, "ws://localhost:8830"})
```

<!-- livebook:{"branch_parent_index":0} -->
Expand Down Expand Up @@ -96,7 +96,7 @@ uri = "rtmp://localhost:5432"

t =
Task.async(fn ->
Boombox.run(input: uri, output: [:webrtc, "ws://localhost:8830"])
Boombox.run(input: uri, output: {:webrtc, "ws://localhost:8830"})
end)

{_output, 0} = System.shell("ffmpeg -re -i #{bbb_mp4} -c copy -f flv #{uri}")
Expand All @@ -113,10 +113,10 @@ signaling = Membrane.WebRTC.SignalingChannel.new()

t =
Task.async(fn ->
Boombox.run(input: bbb_mp4, output: [:webrtc, signaling])
Boombox.run(input: bbb_mp4, output: {:webrtc, signaling})
end)

Boombox.run(input: [:webrtc, signaling], output: "#{out_dir}/mp4_webrtc_mp4.mp4")
Boombox.run(input: {:webrtc, signaling}, output: "#{out_dir}/mp4_webrtc_mp4.mp4")

Task.await(t)
```
Expand Down

0 comments on commit 5f6c646

Please sign in to comment.