WebRTC error when trying to use streaming plugin with RTSP

1,011 views
Skip to first unread message

James Kaye

unread,
Aug 3, 2017, 1:45:43 PM8/3/17
to meetecho-janus
Hello, I am trying to restream video from an RTSP camera to a browser page. I have been able to do this with gstreamer sending the RTSP as RTP to Janus but now I would like to stream the video without gstreamer. The RTSP type seems perfect for this but I have not been able to get it to work. Currently my config is as follows:

[camera]
type = rtsp
id = 99
description = RTSP test
audio = no
video = yes
videopt = 96
videortpmap = H264:90000
videofmtp = profile-level-id=42e01f\;packetization-mode=1;
rtsp_usr =root
rtsp_pwd =password;

When I run Janus it seems to have no problems establishing this connection. However, when I try to view the feed in the streaming plugin(on the same machine that Janus is running on), I get an error. In Firefox it says "ICE failed, add a TURN server and see about:webrtc for more details" which confuses me as I am running the browser on the same machine as Janus. In Chrome I get "WebRTC error: DOMException: Failed to set remote offer sdp: Session error code: ERROR_CONTENT. Session error description: Failed to set remote video description send parameters.." from streaming.js:156.

I know the RTSP is correct as I have been able to display the feed with VLC using the address from the config. Here is the config that works with the corresponding gstreamer command:

[h264-sample]
type=rtp
id=4
description= H.264 live stream coming from gstreamer
audio= no
video= yes
videoport = 8004
videopt = 126
videortpmap = H264/90000
videofmtp = profile-level-id=42e01f\;packetization-mode=1;

gst-launch-1.0.exe  rtspsrc location=rtsp://root:pass...@172.27.10.196:554/live.sdp ! rtph264depay  ! h264parse ! rtph264pay config-interval=1 pt=96 ! udpsink host=172.28.96.162 port=8004

Any help getting this to work with RTSP config would be greatly appreciated and thank you for your time.


Амнон Исраэли

unread,
Aug 4, 2017, 2:19:34 PM8/4/17
to meetecho-janus
Make sure 264 profile is baseline

четверг, 3 августа 2017 г., 20:45:43 UTC+3 пользователь James Kaye написал:
gst-launch-1.0.exe  rtspsrc location=rtsp://root:password@172.27.10.196:554/live.sdp ! rtph264depay  ! h264parse ! rtph264pay config-interval=1 pt=96 ! udpsink host=172.28.96.162 port=8004

James Kaye

unread,
Aug 4, 2017, 3:28:24 PM8/4/17
to meetecho-janus
Thank you that seems to be the problem. This is a problem with libcurl I guess? Would it be possible to add H.264 main profile support to the RTSP plugin?

uxmaster

unread,
Aug 7, 2017, 5:44:02 AM8/7/17
to meetecho-janus
I think "baseline" is the only H.264 profile all browsers support.
Janus just relays the media (except for AudioBridge plugin), so codec/profiles issues are browsers problems.

James Kaye

unread,
Aug 7, 2017, 10:33:49 AM8/7/17
to meetecho-janus
I am able to display main H264 profile with Janus using GStreamer to send the feed over RTP. This works on Chrome and Firefox which is why I'm confused as to why the RTSP plugin won't work with the main profile. OpenH264(non-licensed H264 decoder that i know firefox uses) supports parts of the main and high profile which likely explains why the RTP feed works.

Lorenzo Miniero

unread,
Aug 23, 2017, 8:39:09 AM8/23/17
to meetecho-janus
The plugin (and Janus) doesn't care about profiles or codecs, media is just passed through, but of course you have to make sure the right profile is set in the SDP. If the profile is missing in the SDP, try adding it in JavaScript before passing it to the browser. If something doesn't work, it's likely a codec issue, with the browser not liking what the source is sending. You can try recording the mountpoint and post-processing it with janus-pp-rec to see if it's at least valid h.264 for media players.

L.
Reply all
Reply to author
Forward
0 new messages