Send video and audio stream from 1 Janus to adifferent janus (in a different AWS region..)

317 views
Skip to first unread message

be...@newrow.com

unread,
May 1, 2018, 11:14:03 AM5/1/18
to meetecho-janus
How can something like this be done with and without a middle agent?


thanks in advance!

Geige

unread,
May 1, 2018, 2:16:35 PM5/1/18
to meetecho-janus
Without a "middle agent", you simply use rtp_forward and set the other aws instance running Janus as the destination (https://janus.conf.meetecho.com/docs/janus__videoroom_8c.html). WIth a middle agent (not 100% sure what you mean by this), you simply rtp_forward to the middle agent and do whatever you want with the stream from there.

be...@newrow.com

unread,
May 3, 2018, 4:23:17 AM5/3/18
to meetecho-janus
Thanks for the reply Geige, in addition to this question, once I forward the stream from Janus A to Janus B, will the stream exist in both media servers ?
if not, is there any elegant way to keep the streams in both servers ?

Ju Ju

unread,
May 3, 2018, 4:58:42 AM5/3/18
to meetecho-janus
Hi be,

in your case Janus B is a "client" of Janus A like any browser from janus A perspective.

Of course the difference is that Janus B can have his own clients too.


regards,

JJ

be...@newrow.com

unread,
May 10, 2018, 9:12:18 AM5/10/18
to meetecho-janus
The payload from the documentation is returning error 456

I'm trying every possible payload

created a videoroom via websocket:

 {"janus":"create","transaction":"{viewer:false,room:\"ymc-749\",roomId:487,userId:228,stream:\"228\"}"}

then trying to send via REST the rtp+forward 
 {
  "request":"rtp_forward",
  "publisher_id":228,
  "room":487,
  "host":"192.168.45.116:8188",
  "video_port":10030,
  "secret":"password"
 
 }


response:

{
    "janus": "error",
    "error": {
        "code": 456,
        "reason": "Missing mandatory element (transaction)"
    }
}

i added "transaction" and "janus" fields, failed


note: i added the streaming plugin to get a video and audio stream ports.


this is driving me crazy, what am I doing wrong?????
note that in the videoroom.c file theere is a payload documentation for rtp_forward

the fields "transaction" and "janus" dont appear ?????



huge thanks in advance to any reply !!!



On Tuesday, May 1, 2018 at 6:14:03 PM UTC+3, be...@newrow.com wrote:

be...@newrow.com

unread,
May 10, 2018, 12:07:43 PM5/10/18
to meetecho-janus
managed to get a successful response to the rtp_forwarding, but I cant see the stream on the other janus machine while I'm on debugmode level 7
is this normal?
how can I see the stream through ssh / cli ?

Julien Godier

unread,
May 10, 2018, 12:38:35 PM5/10/18
to be...@newrow.com, meetecho-janus
Did you see rtp packets coming out from your first janus server (the sender) ?

Julien
--
You received this message because you are subscribed to a topic in the Google Groups "meetecho-janus" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/meetecho-janus/ezSUFvWAhi4/unsubscribe.
To unsubscribe from this group and all its topics, send an email to meetecho-janu...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

be...@newrow.com

unread,
May 11, 2018, 4:18:01 AM5/11/18
to meetecho-janus

Yes it says rtp forwarding stream ..
From server A

Julien Godier

unread,
May 11, 2018, 6:26:07 AM5/11/18
to be...@newrow.com, meetecho-janus
I m not talking of what it « says » but about what you can see while doing a tcpdump capture

So do a tcpdump pcap on server and server b to check rtp packets are present

Julien

> Le 11 mai 2018 à 10:18, be...@newrow.com a écrit :
>
>
> Yes it says rtp forwarding stream ..
> From server A
>

be...@newrow.com

unread,
May 12, 2018, 12:05:48 PM5/12/18
to meetecho-janus
Hey Julien, first thanks for your replies!

I've done a tcpdump as following, where Janus A rtp_forwards to janus B

Capture any packets where the destination host is 192.168.1.1. Display IP addresses and port numbers:

tcpdump -n dst host 192.168.1.1

which means the destination janus here is B

ran this from Janus A

I got 0 packets

Also did  the following:

Capture any packets where the source host is 192.168.1.1. Display IP addresses and port numbers:

tcpdump -n src host 192.168.1.1
where the source host is Janus A 

ran this from Janus B


 got 0 packets 



ofcourse ran them both the opposite on both servers and got 0 packets as well..


the request that I'm sending to janus A via websocket is:


{
  "session_id" : 6999683303526273,
  "handle_id" : 6469992266122923,
  "body" : {
    "publisher_id" : 6764175786174006,
    "port" : 8188,
    "secret" : "password",
    "room" : 1,
    "audio_port" : 5002,
    "request" : "rtp_forward",
    "host" : "10.100.102.11",
    "video_port" : 5004
  },
  "janus" : "message",
  "transaction" : “some transaction Id..”
}





what am I missing here?



On Tuesday, May 1, 2018 at 6:14:03 PM UTC+3, be...@newrow.com wrote:

Ju Ju

unread,
May 12, 2018, 12:16:43 PM5/12/18
to be...@newrow.com, meetecho-janus
Hi

Why did u pick 192.168.1.1 address ?

You should try instead

$tcpdump -nn host 10.100.102.11 udp

Le 12 mai 2018 à 18:05, be...@newrow.com a écrit :

10.100.102.11

be...@newrow.com

unread,
May 12, 2018, 12:42:33 PM5/12/18
to meetecho-janus
the 192.168.1.1 is taken from a copy paste tutorial that gave me a quick description to post here, ofoucrse I sent that request with 10.100.102.11

I'm looking at a different angle to my problem,

The stream is published with the following request:
{"janus":"create","transaction":"{viewer:false,room:\"room1\",roomId:123,userId:565,stream:\"565\"}"}

meaning there is no usage of video room?

if so is there a way to forward a stream not via videoroom plugin?


On Tuesday, May 1, 2018 at 6:14:03 PM UTC+3, be...@newrow.com wrote:

be...@newrow.com

unread,
May 12, 2018, 12:48:29 PM5/12/18
to meetecho-janus
Saying this because even though i'm not mentioning the room # in the creation,  the videoroom plugin config looks as following:

[1]
description = room description
publishers = 9999
bitrate = 1024000
fir_req = 10
audiocodec = opus
videocodec = vp8
record = false


so my hunch was from the beginning that I'm simply publishing every1 to one room, and with the videoroom plugin simply forwarding who ever I want via its publisher_id to a different janus from room 1?


On Tuesday, May 1, 2018 at 6:14:03 PM UTC+3, be...@newrow.com wrote:

Lorenzo Miniero

unread,
May 12, 2018, 1:11:49 PM5/12/18
to be...@newrow.com, meetecho-janus
I think you're very confused between Janus API and plugins APIs. You keep on posting examples where you send a Janus "create" request, which is used to create Janus sessions, but attach a plugin request, which will never be handled this way. Apparently, you're also passing a stringified json in the transaction property for some weird reason.

Again, you should study the API or what demos really do before experimenting yourself, as otherwise I doubt you'll get anything working.

Lorenzo


--
You received this message because you are subscribed to the Google Groups "meetecho-janus" group.
To unsubscribe from this group and stop receiving emails from it, send an email to meetecho-janu...@googlegroups.com.

be...@newrow.com

unread,
May 14, 2018, 9:46:30 AM5/14/18
to meetecho-janus

Thanks Lorenzo for that go back to basic advice.
Managed to forward the stream from 1 janus server to another, with the confirmation of the successful video & audio forward on the other end (between 2 local virtual machines)


On Tuesday, May 1, 2018 at 6:14:03 PM UTC+3, be...@newrow.com wrote:
Reply all
Reply to author
Forward
0 new messages