Skip to content

Commit

Permalink
Modernize web app infrastructure for the demo
Browse files Browse the repository at this point in the history
  • Loading branch information
michaelfranzl committed Jan 6, 2024
1 parent a440d6a commit 2209100
Show file tree
Hide file tree
Showing 15 changed files with 1,618 additions and 1,985 deletions.
4 changes: 0 additions & 4 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,9 +1,5 @@
*.l[ao]

.kdev4
*.kdev4
*swp

# http://www.gnu.org/software/automake

Makefile
Expand Down
26 changes: 16 additions & 10 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -14,18 +14,25 @@ Four destination UDP addresses/ports are used:

`janus-rtpforward-plugin` release versions (tags) match `janus-gateway` release versions (tags). **Please make sure to check out the matching tags before compiling the plugin against the backend.**

````shell
./bootstrap
```sh
autoreconf --verbose --force --install
./configure --prefix=/opt/janus # or wherever your janus install lives
make
make install # installs into {prefix}/lib/janus/plugins
````
```


## Demo

See the [demo](demo).


## Licenses

* The plugin is under GPL-3.0-or-later
* The demo is licensed under AGPL-3.0-or-later


## Differences to the 'videoroom' plugin

The 'videoroom' plugin which is shipped with `janus-gateway` supports forwarding of RTP packets *as well*. However, the main purpose of `janus-rtpforward-plugin` is just the RTP forwarding, whereas the main purpose of the 'videoroom' plugin [is](https://github.com/meetecho/janus-gateway/blob/v0.9.2/plugins/janus_videoroom.c#L651) "getting media from WebRTC sources and relaying it to WebRTC destinations".
Expand Down Expand Up @@ -141,7 +148,7 @@ Hardware clocks of low-end consumer audio and video electronics (e.g. USB webcam

Note that you can lauch the same pipeline several times when you're multicasting.

````shell
```sh
gst-launch-1.0 -v \
rtpbin name=rtpbin latency=100 \
udpsrc address=225.0.0.37 auto-multicast=true multicast-iface=lo port=60000 caps="application/x-rtp, media=audio, encoding-name=OPUS, clock-rate=48000" ! rtpbin.recv_rtp_sink_0 \
Expand All @@ -150,15 +157,15 @@ udpsrc address=225.0.0.37 auto-multicast=true multicast-iface=lo port=60002 caps
udpsrc address=225.0.0.37 auto-multicast=true multicast-iface=lo port=60003 caps="application/x-rtcp" ! rtpbin.recv_rtcp_sink_1 \
rtpbin. ! rtpvp8depay ! vp8dec ! autovideosink \
rtpbin. ! rtpopusdepay ! queue ! opusdec ! pulsesink
````
```


### GStreamer dumping to file

The following GStreamer pipeline simply dumps the synchronized (by `rtpbin`) and already compressed media (by the client browser, conveniently!) into a Matroska container (note that the video will only start after a keyframe):


````shell
```sh
gst-launch-1.0 -v -e \
matroskamux name=mux streamable=1 ! filesink location=/tmp/dump.mkv \
rtpbin name=rtpbin latency=100 \
Expand All @@ -168,7 +175,7 @@ udpsrc address=225.0.0.37 auto-multicast=true multicast-iface=lo port=60002 caps
udpsrc address=225.0.0.37 auto-multicast=true multicast-iface=lo port=60003 caps="application/x-rtcp" ! rtpbin.recv_rtcp_sink_1 \
rtpbin. ! rtpopusdepay ! mux.audio_0 \
rtpbin. ! rtpvp8depay ! mux.video_0
````
```


### Combining janus-rtpforward-plugin and janus-streaming-plugin
Expand All @@ -184,7 +191,7 @@ Combining this plugin with the janus-streaming plugin (supplied with Janus) allo

... and then configure the janus-streaming plugin like so (in its configuration file) ...

````
```
[multicast-from-janus-rtpforward-plugin]
type = rtp
id = 1
Expand All @@ -199,12 +206,11 @@ videoport = 60002
videomcast = 225.0.0.37
videopt = 100
videortpmap = VP8/90000
````
```

... then all subscribers to this mountpoint (id=1) will receive realtime A/V from the rtpforward session.


## Acknowledgements

Thanks go to the authors of [janus-gateway](https://github.com/meetecho/janus-gateway) and mquander for the excellent "Simplest possible plugin for Janus" ([janus-helloworld-plugin](https://github.com/mquander/janus-helloworld-plugin)).

2 changes: 0 additions & 2 deletions bootstrap

This file was deleted.

4 changes: 0 additions & 4 deletions demo/.gitignore
Original file line number Diff line number Diff line change
@@ -1,5 +1 @@
jspm_packages
node_modules
*~
*tmp
doc
Loading

0 comments on commit 2209100

Please sign in to comment.