Video streaming issue in Janus WebRTC Gateway for RTSP streaming source(For janus_streaming plugin)

3,000 views
Skip to first unread message

Nilesh Wagh

unread,
Mar 16, 2016, 4:57:12 AM3/16/16
to meetecho-janus


I have installed Janus WebRTC Gateway on Ubuntu Server 14.04.4 LTS, and deployed web samples on apache2 http server. I am trying existing Streming demo sample which come with Janus gateway. I have enabled(By default it is disabled) rtsp streaming support in 'janus.plugin.sip.cfg.*' config file by below settings.

[rtsp-test]
type = rtsp
id = 99
description = RTSP Test
audio = no
video = yes
url=rtsp://127.0.0.1:8554/mystream

Now I am getting one more channel(option in dropdown) in Streaming demo page i.e. 'RTSP Test(live)'. When I will click on Watch or Listen button, below error occurred on console and showing waiting symbol:

On Chrome:

Failed to parse SessionDescription. Expect line: v=

On Firefox:

InvalidParameterError: Empty or null SDP provided to setRemoteDescription

Please help me to resolve this issue or suggest me any idea/code changes to play rtsp to WebRTC stream using Janus Gateway.

Nilesh Wagh

unread,
Mar 16, 2016, 5:26:25 AM3/16/16
to meetecho-janus
I am using Live555 proxy server for RTSP streaming source.

Lorenzo Miniero

unread,
Mar 16, 2016, 5:34:47 AM3/16/16
to meetecho-janus
Check the SDP the RTSP server is sending and what is getting to the browser.

L.

Nilesh Wagh

unread,
Mar 16, 2016, 6:11:57 AM3/16/16
to Lorenzo Miniero, meetecho-janus
Please can you help me to set those SDP, Please suggest any idea to solve this issue.

As per I have monitored in Log file of Janus Gateway server, I found below info about SDP.


At the time of staring Janus Server
.
.
.
.
Loading plugin 'libjanus_streaming.so'...
JANUS Streaming plugin created!
Configuration file: /var/www/janus/etc/janus/janus.plugin.streaming.cfg
[janus.plugin.streaming.cfg]
    [gstreamer-sample]
        type: rtp
        id: 1
        description: Opus/VP8 live stream coming from gstreamer
        audio: yes
        video: yes
        audioport: 5002
        audiopt: 111
        audiortpmap: opus/48000/2
        videoport: 5004
        videopt: 100
        videortpmap: VP8/90000
        secret: adminpwd
    [file-live-sample]
        type: live
        id: 2
        description: a-law file source (radio broadcast)
        filename: /var/www/janus/share/janus/streams/radio.alaw
        audio: yes
        video: no
        secret: adminpwd
    [file-ondemand-sample]
        type: ondemand
        id: 3
        description: mu-law file source (music)
        filename: /var/www/janus/share/janus/streams/music.mulaw
        audio: yes
        video: no
        secret: adminpwd
    [rtsp-test]
        type: rtsp
        id: 99
        description: RTSP Test
        audio: no
        video: yes
        url: rtsp://192.168.15.204:4530/STREAMER100
Adding stream 'gstreamer-sample'
Audio enabled, Video enabled
Audio enabled, Video enabled
Adding stream 'file-live-sample'
Adding stream 'file-ondemand-sample'
Adding stream 'rtsp-test'
Audio NOT enabled, Video enabled
Filesource (live) thread starting...
[file-live-sample] Opening file source /var/www/janus/share/janus/streams/radio.alaw...
[file-live-sample] Streaming audio file: /var/www/janus/share/janus/streams/radio.alaw
Starting streaming relay thread
Joining VoiceMail handler thread
VoiceMail watchdog started
Joining Record&Play handler thread
Record&Play watchdog started
DESCRIBE answer:RTSP/1.0 200 OK
CSeq: 1
Date: Wed, Mar 16 2016 09:46:13 GMT
Content-Type: application/sdp
Content-Length: 430

v=0
o=- 1458120122454851 1 IN IP4 192.168.15.204
s=LIVE555 Streaming Media v2014.03.25
i=LIVE555 Streaming Media v2014.03.25
t=0 0
a=tool:LIVE555 Streaming Media v2014.03.25
a=type:broadcast
a=control:*
a=range:npt=0-
a=x-qt-text-nam:LIVE555 Streaming Media v2014.03.25
a=x-qt-text-inf:LIVE555 Streaming Media v2014.03.25
m=video 0 RTP/AVP 96
c=IN IP4 0.0.0.0
b=AS:65138148
a=rtpmap:96 MP2T/90000
a=control:track1

SETUP answer:RTSP/1.0 200 OK
CSeq: 2
Date: Wed, Mar 16 2016 09:46:13 GMT
Transport: RTP/AVP;unicast;destination=192.168.15.34;source=192.168.15.204;client_port=40468-40469;server_port=6970-6971
Session: F3D13189


[rtsp-test] no media audio...
Starting streaming relay thread
PLAY answer:RTSP/1.0 200 OK
CSeq: 3
Date: Wed, Mar 16 2016 09:46:13 GMT
Range: npt=1451.001-
Session: F3D13189


  ::: [99][rtsp-test] RTSP Test (live, RTP source, public, pin: no pin)
  ::: [1][gstreamer-sample] Opus/VP8 live stream coming from gstreamer (live, RTP source, public, pin: no pin)
  ::: [2][file-live-sample] a-law file source (radio broadcast) (live, file source, public, pin: no pin)
  ::: [3][file-ondemand-sample] mu-law file source (music) (on demand, file source, public, pin: no pin)
JANUS Streaming plugin initialized!
Version: 5 (0.0.5)
  [janus.plugin.streaming] JANUS Streaming plugin
  This is a streaming plugin for Janus, allowing WebRTC peers to watch/listen to pre-recorded files or media generated by gstreamer.
  Plugin API version: 5
Loading plugin 'libjanus_videocall.so'...
.
.
.
.

Below log is generated at the time of hit request (Click Watch or Listen button) from browser.
.
.
.
.
Processing POST data (application/json) (0 bytes)...
[transports/janus_http.c:janus_http_handler:1015] Done getting payload, we can answer
{"janus":"message","body":{"request":"watch","id":99},"transaction":"ngQNbBgUtdsu"}
Forwarding request to the core (0x7f0f00000ad0)
Got a Janus API request from janus.transport.http (0x7f0f00000ad0)
Transport task pool, serving request
[1432229270] There's a message for JANUS Streaming plugin
Handling message: {
   "request": "watch",
   "id": 99
}
Creating plugin result...
Sending Janus API response to janus.transport.http (0x7f0f00000ad0)
Got a Janus API response to send (0x7f0f00000ad0)
Destroying plugin result...
Request to watch mountpoint/stream 99
Going to offer this SDP:
v=0
o=- 1458122131338757 1458122131338757 IN IP4 127.0.0.1
s=Streaming Test
t=0 0
m=video 1 RTP/SAVPF 96
c=IN IP4 1.1.1.1
a=rtpmap:96 MP2T/90000
a=fmtp:96 à!†#ÿ
a=rtcp-fb:96 nack
a=rtcp-fb:96 goog-remb
a=sendonly

Pushing event: {
   "streaming": "event",
   "result": {
      "status": "preparing"
   }
}
[1432229270] Audio has NOT been negotiated
[1432229270] Video has been negotiated
[1432229270] SCTP/DataChannels have NOT been negotiated
[1432229270] Setting ICE locally: got ANSWER (0 audios, 1 videos)
[1432229270] Creating ICE agent (ICE Full mode, controlling)
[1432229270] ICE thread started
[1432229270] Adding 192.168.15.34 to the addresses to gather candidates for
[1432229270] Gathering done for stream 1
 -------------------------------------------
  >> Anonymized (225 --> 225 bytes)
 -------------------------------------------
v=0
o=- 1458122131338757 1458122131338757 IN IP4 127.0.0.1
s=Streaming Test
t=0 0
m=video 1 RTP/SAVPF 96
c=IN IP4 1.1.1.1
a=sendonly
a=rtpmap:96 MP2T/90000
a=fmtp:96 à!†#ÿ
a=rtcp-fb:96 nack
a=rtcp-fb:96 goog-remb

[1432229270] No RTP maps?? trying formats...
[1432229270] We have 1 candidates for Stream #1, Component #1
[1432229270] Stream #1, Component #1
[1432229270]   Address:    192.168.15.34:44522
[1432229270]   Priority:   2013266431
[1432229270]   Foundation: 1
[1432229270]     a=candidate:1 1 udp 2013266431 192.168.15.34 44522 typ host
[1432229270] We have 1 candidates for Stream #1, Component #2
[1432229270] Stream #1, Component #2
[1432229270]   Address:    192.168.15.34:33755
[1432229270]   Priority:   2013266430
[1432229270]   Foundation: 1
[1432229270]     a=candidate:1 2 udp 2013266430 192.168.15.34 33755 typ host
 -------------------------------------------
  >> Merged (225 --> 801 bytes)
 -------------------------------------------
v=0
o=- 1458122131338757 1458122131338757 IN IP4 192.168.15.34
s=Streaming Test
t=0 0
a=group:BUNDLE video
a=msid-semantic: WMS janus
m=video 1 RTP/SAVPF 96
c=IN IP4 192.168.15.34
a=mid:video
a=sendonly
a=rtcp-mux
a=ice-ufrag:HK2E
a=ice-pwd:FOEl/zV8qkmQppJzd1es8m
a=ice-options:trickle
a=fingerprint:sha-256 D2:B9:31:8F:DF:24:D8:0E:ED:D2:EF:25:9E:AF:6F:B8:34:AE:53:9C:E6:F3:8F:F2:64:15:FA:E8:7F:53:2D:38
a=setup:actpass
a=connection:new
a=rtpmap:96 MP2T/90000
a=fmtp:96 à!†#ÿ
a=rtcp-fb:96 nack
a=rtcp-fb:96 goog-remb
a=ssrc:2245976836 cname:janusvideo
a=ssrc:2245976836 msid:janus janusv0
a=ssrc:2245976836 mslabel:janus
a=ssrc:2245976836 label:janusv0
a=candidate:1 1 udp 2013266431 192.168.15.34 44522 typ host
a=candidate:1 2 udp 2013266430 192.168.15.34 33755 typ host

[1432229270] Sending event to transport...
Sending event to janus.transport.http (0x7f0ef40008e0)
Got a Janus API event to send (0x7f0ef40008e0)
  >> 0 (Success)
[transports/janus_http.c:janus_http_request_completed:1506] Request completed, freeing data
We have a message to serve...
{
   "janus": "event",
   "session_id": 3833508268,
   "sender": 1432229270,
   "transaction": "ngQNbBgUtdsu",
   "plugindata": {
      "plugin": "janus.plugin.streaming",
      "data": {
         "streaming": "event",
         "result": {
            "status": "preparing"
         }
      }
   },
   "jsep": {
      "type": "offer"
   }
}
[transports/janus_http.c:janus_http_request_completed:1506] Request completed, freeing data
[ice.c:janus_ice_thread:2000] [1432229270] Looping (ICE)...
Got a HTTP GET request on /janus/3833508268...
.
.
.
.

I have attached screenshot of Browser log on Chrome console after request. 
SDP are blank in both localDescription and remoteDescription.


Please can you help me to set those SDP, Please suggest any idea to solve this issue.


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

SDP Info.png

Lorenzo Miniero

unread,
Mar 16, 2016, 6:19:47 AM3/16/16
to meetecho-janus, lmin...@gmail.com
MP2T is not a supported codec. Please don't paste huge bunches of text in here: as explained in the guidelines, use services like pastebin when you have to.

L.
To unsubscribe from this group and all its topics, send an email to meetecho-janus+unsubscribe@googlegroups.com.

Nilesh Wagh

unread,
Mar 16, 2016, 7:05:02 AM3/16/16
to Lorenzo Miniero, meetecho-janus
Sorry for long text. 
Please can you suggest me supported codec for h264 video.

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.

--
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/rY2tHLVjM0I/unsubscribe.
To unsubscribe from this group and all its topics, send an email to meetecho-janu...@googlegroups.com.
Reply all
Reply to author
Forward
0 new messages