AudioBridge Plain RTP

194 views
Skip to first unread message

jeff carman

unread,
Sep 6, 2022, 9:58:40 PM9/6/22
to meetecho-janus
Hello All! 
We are trying to interface Janus with Touchdesigner via gstreamer
So far we've been able to do the RTP-forward & Video Streaming, but are having trouble getting audio into the audiobridge plugin example. 
Seemed to interface with API to create the rtp instance.
but can't seem to get external audio into it.
 
"janus" : "message",
                "transaction" : "12345",    
    "body" : {
                "request" : "join" ,
                "room" : 1234,
                "active" : true,
                "muted" : false,
                "secret" : "adminpwd",
                "codec" : "opus",
                "payload_type" : 100 ,
                "display" : "jeffJoeOPUS",
                "id" : 1123344,
                "rtp" : {   "ip" : "10.0.0.4", "port" : 8111,
                "fec" : false
                }
        }

from handles:
{ "session_id": 622430824387935, "session_last_activity": 273061572963, "session_timeout": 1800, "session_transport": "janus.transport.http", "handle_id": 6234439410210544, "loop-running": true, "created": 272793930330, "current_time": 273141713100, "plugin": "janus.plugin.audiobridge", 

 "plugin_specific": { "state": "inroom", "room": 1234, "id": 1123344, "display": "jeffJoeOPUS", "admin": true, "muted": false, "active": false, "pre-buffering": true, "prebuffer-count": 6, "queue-out": -1, "fec": false, "plain-rtp": { "local-ip": "162.193.105.237", "local-port": 10008, "remote-ip": "10.0.0.4", "remote-port": 8111 }, "started": false, "hangingup": false, "destroyed": false }, 

"flags": { "got-offer": false, "got-answer": false, "negotiated": false, "processing-offer": false, "starting": false, "ice-restart": false, "ready": false, "stopped": false, "alert": false, "trickle": false, "all-trickles": false, "resend-trickles": false, "trickle-synced": false, "data-channels": false, "has-audio": false, "has-video": false, "new-datachan-sdp": false, "rfc4588-rtx": false, "cleaning": false, "e2ee": false }, "sdps": {}, "queued-packets": 0 }

And our Gstreamer cmd:
gst-launch-1.0  rtspsrc location=rtsp://10.0.0.4:8555/tdaudio latency=0 ! rtpmpadepay ! mpegaudioparse ! mpg123audiodec ! audioconvert ! audioresample ! opusenc ! rtpopuspay pt=100 ! udpsink host=162.193.105.237 port=8111

Have tried localhost, 127.0.0.1, and port = 10008, in various combinations with pcma & pcmu, but haven't been successful. 

None of the Flags have ever gone true, unless we force a "got-offer'  
I'm sure we've missed something simple, but can't seem to figure it out.

Help?

Lorenzo Miniero

unread,
Sep 7, 2022, 4:45:13 AM9/7/22
to meetecho-janus
You're making a couple of mistakes. In the "join" request you specify port 8111, which the AudioBridge interprets as YOUR port (the one you bound to). In the GStreamer example, though, you're setting 8111 as the SINK port, the one you'll send media to, which is clearly wrong. The sink port should be the one the plugin sends in the response (10008 in this case). That said, the socket in the AudioBridge is also currently mapped to the remote address via a connect, meaning that it will ignore any packet that is not coming from the remote address you specified initially (that is, packets not coming from port 8111). As such, you should configure GStreamer to send from that port (which I think is bind-port in udpsink). Notice that the plugin will also send media back to that port.

L.

Joe Daleki

unread,
Nov 6, 2022, 8:06:11 PM11/6/22
to meetecho-janus
Hi Lorenzo,

I'm working with Jeff on this project, and we are now injecting the audio into the room successfully. When you say that the plugin will send media back to the originating port, does that include audio from the other participants? We see that an RTP stream exists (in wireshark) but are not receiving any audio on that path.

Thank you for your help,
Joe

Lorenzo Miniero

unread,
Nov 7, 2022, 5:57:03 AM11/7/22
to meetecho-janus
Audio is mixed when using the AudioBridge, so you should receive a single stream including a mix of everyone except you on that path. If you have a Wireshark capture, and can see RTP packets going in both directions, you can convert the pcap file to an .mjr file, and convert that one to Opus to check what you hear (of course, since there's two directions, you'll need to either save a separate pcap file for each SSRC, or tell the tool which SSRC to filter). Notice that if yoy're alone in the room, no audio is normal, as the mixer will only send you silence (since again you're excluded from your own mix).

L.
Reply all
Reply to author
Forward
0 new messages