RTSP from camera doen't work

655 views
Skip to first unread message

celti...@gmail.com

unread,
Jul 16, 2018, 10:26:24 AM7/16/18
to meetecho-janus
Hi, i'm trying Streaming Plugin to stream rtsp url from a camera directly to web browser. I have read a lot of threads on this group about this, but still it doens't work to me. I have set the STUN google in the janus cfg. This is the situation in the streaming plugin cfg:

[rtsp-test]
type = rtsp
id = 99
description = RTSP Test
audio = no
video = yes
url=rtsp://cameraipaddr/live3.sdp
rtsp_user=myusername
rtsp_pwd=mypassword
videofmtp=packetization-mode=1\;profile-level-id=4d001e\;sprop-parameter-sets=J00AHpY1AUBf8s3BQYFQAAA+kAAOpgm+oA==,KO4EYg==

this is the sdp provided from the camera:
v=0
o=RTSP 1531738802 681 IN IP4 0.0.0.0
s=RTSP server
c=IN IP4 0.0.0.0
t=0 0
a=charset:Shift_JIS
a=range:npt=0-
a=control:*
a=etag:1234567890
m=video 0 RTP/AVP 98
b=AS:0
a=rtpmap:98 H264/90000
a=control:trackID=3
a=x-onvif-track:trackID=3
a=fmtp:98 packetization-mode=1; profile-level-id=4d001e; sprop-parameter-sets=J00AHpY1AUBf8s3BQYFQAAA+kAAOpgm+oA==,KO4EYg==
m=application 0 RTP/AVP 107
a=control:trackID=12
a=rtpmap:107 vnd.onvif.metadata/90000

When i start janus, from the log i can see:
-----------------------------------------------------------------------------
[WARN] RTSP video latching: 0.0.0.0:5556
[WARN]   -- RTCP: 0.0.0.0:5557
JANUS Streaming plugin initialized!
Transport plugins folder: /opt/janus/lib/janus/transports
Loading transport plugin 'libjanus_http.so'...
HTTP webserver started (port 8088, /janus path listener)...
-----------------------------------------------------------------------------

and every 5 seconds there is this message from the console:
-----------------------------------------------------------------------------
[WARN] [rtsp-test] 5s passed with no media, trying to reconnect the RTSP stream
[WARN] RTSP video latching: 0.0.0.0:5556
[WARN]   -- RTCP: 0.0.0.0:5557
[rtsp-test] Reconnected to the RTSP server, streaming again
-----------------------------------------------------------------------------

and from the web demo of the streaming plugin i receive this error:
"WebRTC error: DOMException: Failed to set remote offer sdp: Failed to set remote video description send parameters."

what am i doing wrong? problems with the codec? udp/tcp packets blocked by some firewall? i don't even know where to start from to investigate.
Let's pick an example:
i can see this webcam rtsp://85.255.175.244/h264 with vlc, and with another software that streams rtsp to webrtc, while janus gives me back those errors above.

can someone enlight me?



Lorenzo Miniero

unread,
Jul 16, 2018, 12:07:02 PM7/16/18
to meetecho-janus
Most definitely problems in the codecs you (or the camera) put in the SDP, as that's the error Chrome throws when it doesn't like what it finds.

L. 

celti...@gmail.com

unread,
Jul 16, 2018, 12:49:32 PM7/16/18
to meetecho-janus
That was what i thought, so i checked the streaming codec and i found out what codec it was. What do i have to change in janus to work with it? Profile number and videomtp? Can you vive me some advice looking at the rtsp url i wrote?

Lorenzo Miniero

unread,
Jul 16, 2018, 12:52:24 PM7/16/18
to meetecho-janus
The port in the video mline is 0, that's likely what's breaking the SDP: m=video 0 RTP/AVP 98

L.
Reply all
Reply to author
Forward
0 new messages