How does rtp_forward work with audio only room?

387 views
Skip to first unread message

Syoichi Enya

unread,
Feb 23, 2017, 4:12:19 AM2/23/17
to meetecho-janus
Hi
I am testing the rtp_forward connection using audiobridgetest demo. ("https://localhost:8080/audiobridgetest.html")
And, I added two test users and sounded environmental sound.After that, rtp_forward was added with the following curl query using the admin function.

curl -k -H "Content-Type: application/json" -X POST -d '{"body":{"request":"rtp_forward","publisher_id":3153615434288867,"room": 1234, "host":"127.0.0.1","port":5000,"secret":"adminpwd" }, "janus":"message","apisecret" : "janusrocks","transaction":"o4vup0qoomd"}' https://localhost:9089/janus/6450635431658468/7252218939327619

The following results are obtained. 

publisher id :566295274170768
{
   "janus": "success",
   "session_id": 2768287721894382,
   "sender": 168860933099443,
   "transaction": "o4vup0qoomd",
   "plugindata": {
      "plugin": "janus.plugin.audiobridge",
      "data": {
         "audiobridge": "success",
         "room": 1234,
         "stream_id": 3608560882
      }
   }
}

I have created the following test.sdp file.
I think that the content of the sdp file is largely wrong because it is picked up from the sdp answer packet connected to the audiobridgetest.

v=0
o=- 1487838015334902 1487838015334902 IN IP4 127.0.0.1
s=Demo Room
t=0 0
a=group:BUNDLE audio
a=msid-semantic: WMS janus
m=audio 5000 UDP/TLS/RTP/SAVPF 111
c=IN IP4 127.0.0.1
a=sendrecv
a=mid:audio
a=rtcp-mux
a=rtpmap:111 opus/48000/2
a=fmtp:111 maxplaybackrate=16000; stereo=0; sprop-stereo=0; useinbandfec=0
a=extmap:1 urn:ietf:params:rtp-hdrext:ssrc-audio-level

I confirmed the result with ffplay to get the result of rtp, but I could not receive anything(no data...).
Could you give me some advice?
Sometimes it seems to cause SEGV when building and running the latest master.Is it related to this problem?

ffplay -protocol_whitelist "file,udp,rtp" test.sdp 

Lorenzo Miniero

unread,
Feb 23, 2017, 9:29:05 AM2/23/17
to meetecho-janus
You don't need the publisher_id here: it's not the VideoRoom. Anyway, people are using RTP forwarding from the AudioBridge for several things and it works for them (check older posts for examples).

L.

Syoichi Enya

unread,
Feb 27, 2017, 2:09:05 AM2/27/17
to meetecho-janus
Thx, I was able to confirm the operation by correcting the procedure to the following with reference to the advice.

1. I started ffmepg (ffplayer) for checking operation.
    (I have read janus_audiobridge.c. It seemed to be an implementation that audiobridge stops sending udp if there is no recipient in advance.)

2. After that, I threw the following query with excluding publisher_id and ptype (111) added.

curl -k -H "Content-Type: application/json" -X POST -d '{"body":{"request":"rtp_forward", "room": 1234, "host":"127.0.0.1","port":5000, "ptype": 111, "secret":"adminpwd" }, "janus":"message","apisecret" : "janusrocks","transaction":"o4vup0qoomd"}' https://localhost:9089/janus/6450635431658468/7252218939327619

3. Execute sending and receiving of data with ffplay and ffmpeg using the previous sdp definition file

By the way, "Floating - point exception" happens randomly when running for about 30 minutes. Is there something else wrong?

arigatou

Lorenzo Miniero

unread,
Feb 27, 2017, 5:00:18 AM2/27/17
to meetecho-janus
We really don't care if anybody's listening, RTP forwarders always forward even if nobody's receiving the packets. You do need to make sure that FFmpeg and the RTP forwarder use the same payload type, though, or otherwise FFmpeg will dump the packet I believe. Not sure what you mean by the float exception, is this something happening in Janus or FFmpeg?

L. 

Syoichi Enya

unread,
Feb 27, 2017, 8:20:25 PM2/27/17
to meetecho-janus
Thx i understand it.

The SEGV problem occurs in janus. Specifically, SIGFPE occurred and the following trace log taken from gdb bt log.

Thread 44 "mixer 1234 6479" received signal SIGFPE, Arithmetic exception.
[Switching to Thread 0x7fffaa7fc700 (LWP 13607)]
0x00007fffe43b0ba2 in ?? () from /usr/lib/x86_64-linux-gnu/libopus.so.0
(gdb) bt
#0  0x00007fffe43b0ba2 in ?? () from /usr/lib/x86_64-linux-gnu/libopus.so.0
#1  0x00007fffe43ad990 in ?? () from /usr/lib/x86_64-linux-gnu/libopus.so.0
#2  0x00007fffe43abb32 in ?? () from /usr/lib/x86_64-linux-gnu/libopus.so.0
#3  0x00007fffe439daa2 in ?? () from /usr/lib/x86_64-linux-gnu/libopus.so.0
#4  0x00007fffe43b7cb5 in ?? () from /usr/lib/x86_64-linux-gnu/libopus.so.0
#5  0x00007fffe43b97aa in opus_encode () from /usr/lib/x86_64-linux-gnu/libopus.so.0
#6  0x00007fffe45f3fea in janus_audiobridge_participant_thread (data=0x7fff980010c0) at plugins/janus_audiobridge.c:3671
#7  0x00007ffff769abb5 in ?? () from /lib/x86_64-linux-gnu/libglib-2.0.so.0
#8  0x00007ffff5eff6ba in start_thread (arg=0x7fffaa7fc700) at pthread_create.c:333
#9  0x00007ffff5c3582d in clone () at ../sysdeps/unix/sysv/linux/x86_64/clone.S:109

There is a possibility that it may be caused by my build environment. I'm preparing another environment now.

2017年2月27日月曜日 19時00分18秒 UTC+9 Lorenzo Miniero:

Lorenzo Miniero

unread,
Feb 28, 2017, 4:16:22 AM2/28/17
to meetecho-janus
That line corresponds to a "continue" on master:
what revision are you on?

Not sure what can cause an Arithmetic exception in opus_encode, especially considering all the symbols seem to have been stripped out in your setup.

L.

Syoichi Enya

unread,
Feb 28, 2017, 9:06:16 PM2/28/17
to meetecho-janus
I am involved until the ”e75a8bd6ba2475d20b2958769442a5cc45895e46” commit.
Retrieve up to commit "1e9c537e68a416571897cfb34d0c47ac913f9c73" and try again. Thank you.

2017年2月28日火曜日 18時16分22秒 UTC+9 Lorenzo Miniero:

Lorenzo Miniero

unread,
Mar 1, 2017, 3:08:07 AM3/1/17
to meetecho-janus
Oh ok, so not very old then. But yes, if you could try a more recent version it would help us keep aligned.

ありがとうございます!
Lorenzo
Reply all
Reply to author
Forward
0 new messages