janusvrwebrtcsink

The JanusVRWebRTCSink is a plugin that integrates with the Video Room plugin of the Janus Gateway. It basically streams whatever data you pipe to it (video, audio) into WebRTC using Janus as the signaller.

How to use it

You'll need to have:

  • A Janus server endpoint;
  • Any WebRTC browser application that uses Janus as the signaller, eg: the html folder of janus-gateway repository.

You can pipe the video like this (if you don't happen to run Janus locally, you can set the endpoint like this: signaller::janus-endpoint=ws://127.0.0.1:8188):

$ gst-launch-1.0 videotestsrc ! janusvrwebrtcsink signaller::room-id=1234

And for audio (yes you can do both at the same time, you just need to pipe it properly).

$ gst-launch-1.0 audiotestsrc ! janusvrwebrtcsink signaller::room-id=1234

And you can set the display name via signaller::display-name, eg:

$ gst-launch-1.0 videotestsrc ! janusvrwebrtcsink signaller::room-id=1234 signaller::display-name=ana

You should see the GStreamer videotestsrc/audiotestsrc output in your browser now!

If for some reason you can't run Janus locally, you can use their open demo webpage, and point to its WebSocket server:

$ gst-launch-1.0 videotestsrc ! janusvrwebrtcsink signaller::room-id=1234 signaller::janus-endpoint=wss://janus.conf.meetecho.com/ws

By default Janus uses u64 ids to identitify the room, the feed, etc. But it can be changed to strings using the strings_ids option in janus.plugin.videoroom.jcfg. In such case, janusvrwebrtcsink has to be created using use-string-ids=true so its signaller uses the right types for such ids and properties:

$ gst-launch-1.0 videotestsrc ! janusvrwebrtcsink signaller::room-id=1234 use-string-ids=true

Notes

  • This plugin supports both the legacy Video Room plugin as well as the multistream one;
  • If you see a warning in the logs related to rtpgccbwe, you're probably missing the gst-plugin-rtp in your system.

Hierarchy

GObject
    ╰──GInitiallyUnowned
        ╰──GstObject
            ╰──GstElement
                ╰──GstBin
                    ╰──GstBaseWebRTCSink
                        ╰──janusvrwebrtcsink

Implemented interfaces

Factory details

Authors: – Eva Pace

Classification:Sink/Network/WebRTC

Rank – none

Plugin – rswebrtc

Package – gst-plugin-webrtc

Pad Templates

audio_%u

audio/x-raw:
audio/x-opus:

Presencerequest

Directionsink

Object typeGstWebRTCSinkPad


video_%u

video/x-raw:

video/x-raw(memory:CUDAMemory):

video/x-raw(memory:GLMemory):

video/x-raw(memory:NVMM):

video/x-raw(memory:D3D11Memory):
video/x-vp8:
video/x-h264:
video/x-vp9:
video/x-h265:
video/x-av1:

Presencerequest

Directionsink

Object typeGstWebRTCSinkPad


Properties

janus-state

“janus-state” Janus-vrweb-rtcjanus-state *

The current state of the signaller.

Flags : Read

Default value : initialized (0)

Since : plugins-rs-0.14.0


use-string-ids

“use-string-ids” gboolean

By default Janus uses u64 ids to identify the room, the feed, etc. But it can be changed to strings using the strings_ids option in janus.plugin.videoroom.jcfg. In such case, janusvrwebrtcsink has to be created using use-string-ids=true so its signaller uses the right types for such ids and properties.

Flags : Read / Write / Construct Only

Default value : false

Since : plugins-rs-0.13.0


Named constants

Janus-vrweb-rtcjanus-state

Members

initialized (0) – Initialized
session-created (1) – SessionCreated
videoroom-attached (2) – VideoroomAttached
room-joined (3) – RoomJoined
negotiating (4) – Negotiating
webrtc-up (5) – WebrtcUp

The results of the search are