Forward from Janus to Wowza

411 views
Skip to first unread message

m...@riff.tv

unread,
Jan 24, 2017, 2:19:37 PM1/24/17
to meetecho-janus
Has anyone set up Janus > Wowza forwarding? We'd like to use Janus to handle the WebRTC negotiation/connection and have it forward the RTP stream to Wowza for recording, transcoding, etc. We've been trying to get this to work with rtp_forward, but so far no luck. Any tips would be appreciated!

Thanks so much.

Lorenzo Miniero

unread,
Jan 25, 2017, 5:49:17 AM1/25/17
to meetecho-janus
RTP forwarding is only half the job. You need to do the RTP-to-RTMP transcoding yourself (e.g., via existing tools).

L.

Arik Halperin

unread,
Mar 7, 2018, 6:17:41 AM3/7/18
to meetecho-janus
Hello,
Can I use the RTSP streaming plugin for this? 

Thanks,
Arik 

Lorenzo Miniero

unread,
Mar 7, 2018, 6:28:41 AM3/7/18
to meetecho-janus
No, the RTSP streaming plugin implements an RTSP server, not an RTSP client.

L.

Anil Wadghule

unread,
Mar 7, 2018, 6:43:04 AM3/7/18
to Lorenzo Miniero, meetecho-janus
@Lorenzo Can you confirm we forward RTP to another server, we can record the stream as MP4 on that server? If yes, do you know any issues in this flow?

Thanks,
Anil

--
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-janus+unsubscribe@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.



--
Best,
Anil

Kaplan

unread,
Mar 8, 2018, 10:15:44 AM3/8/18
to meetecho-janus
you can, and I do so everyday :)

I hope you are greatful for this command, it took me MONTHS to figure it out :)

cmd=gst-launch-1.0 -e mp4mux name=mux  ! filesink location=/var/www/html/recordings/1000-Super%20Trader2-03-08-2018__10.15.395_AM.mp4 udpsrc port=63003 caps="application/x-rtp, media=(string)video, payload=(int)100, clock-rate=(int)90000, encoding-name=(string)VP8-DRAFT-IETF-01" ! capssetter caps="video/x-vp8,width=1728,height=1080" ! rtpjitterbuffer latency=6000 do-lost=true do-retransmission=false ! rtpvp8depay ! vp8dec ! x264enc pass=cbr quantizer=22 bitrate=10000  ! video/x-h264,profile=high ! queue max-size-bytes=0 max-size-buffers=0 max-size-time=0 ! mux.  udpsrc port=63004 caps="application/x-rtp, media=(string)audio, clock-rate=(int)48000, encoding-name=(string)X-GST-OPUS-DRAFT-SPITTKA-00, payload=96,channels=2" ! rtpjitterbuffer latency=6000 do-lost=true mode=0 ! rtpopusdepay ! opusdec plc=true ! audioconvert ! audiorate ! queue max-size-bytes=0 max-size-buffers=0 max-size-time=0  ! faac ! mux. 


On Wednesday, March 7, 2018 at 6:43:04 AM UTC-5, Anil Wadghule wrote:
@Lorenzo Can you confirm we forward RTP to another server, we can record the stream as MP4 on that server? If yes, do you know any issues in this flow?

Thanks,
Anil
On Wed, Jan 25, 2017 at 4:19 PM, Lorenzo Miniero <lmin...@gmail.com> wrote:
RTP forwarding is only half the job. You need to do the RTP-to-RTMP transcoding yourself (e.g., via existing tools).

L.


Il giorno martedì 24 gennaio 2017 20:19:37 UTC+1, m...@riff.tv ha scritto:
Has anyone set up Janus > Wowza forwarding? We'd like to use Janus to handle the WebRTC negotiation/connection and have it forward the RTP stream to Wowza for recording, transcoding, etc. We've been trying to get this to work with rtp_forward, but so far no luck. Any tips would be appreciated!

Thanks so much.

--
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.

For more options, visit https://groups.google.com/d/optout.



--
Best,
Anil

Kaplan

unread,
Mar 8, 2018, 10:23:27 AM3/8/18
to meetecho-janus
that is to receive the RTP forward command on the server where you want to record. the port, in this example is 63004. The video room is on the vp8 codec...
you can mess with the x264enc params, if you want faster processing (less CPU) you can do: "x264enc speed-preset=ultrafast tune=zerolatency ! queue ...."

Anil Wadghule

unread,
Mar 8, 2018, 11:01:47 AM3/8/18
to Kaplan, meetecho-janus
Thanks a lot, Kaplan,

Do you see any issues.. is .mp4 ready where you run stop RTP Forward command?

How do you distinguish between multiple sessions... I mean.. if this particular file was in this room_id and for this publisher etc?

Thanks,
Anil

To unsubscribe from this group and stop receiving emails from it, send an email to meetecho-janus+unsubscribe@googlegroups.com.

For more options, visit https://groups.google.com/d/optout.



--
Best,
Anil

Bellesoft Consulting

unread,
Mar 8, 2018, 5:08:48 PM3/8/18
to Anil Wadghule, meetecho-janus
the "-e" on the gstreamer command takes care of gracefully closing the mp4 file, I detect when the recording should end from my server logic, then I issue a "kill -2" on the gstreamer process, and the recording ends well.   I've had issues before with some files until I added that.  Another trick is to start the rec process (gstreamer) 1st, then do the rtp forward command.

Each room needs to stream to a different port, you can pass 0 the the streaming endpoint create request, janus will use a random empty port, then pass it it back to you on the http response:
 var body = {
                            "request": "create",
                            "type": 'rtp',
                            "id": parseInt(presObj.pub_id),
                            "is_private": true,
                            "audio": false,
                            "video": true,
                            "videoport": 0, //<---- passing 0 gets a free random port
                            //"videoport": parseInt(presObj.port), //TODO: passing 0 here, assings a random port in newer Januses...
                            "videopt": 100,
                            "videortpmap": 'VP8/90000',
                            "videobufferkf": false
                    }
You do that for each room, and stream to different ports.



Bellesoft Consulting

unread,
Mar 9, 2018, 4:00:07 PM3/9/18
to Anil Wadghule, meetecho-janus
one more thing, you can play with the jitterbuffer length if you want the rec to end sooner, just make it 1000 vs 6000
Reply all
Reply to author
Forward
0 new messages