RTSP camera demo

4,703 views
Skip to first unread message

Jon Smirl

unread,
Apr 19, 2016, 12:04:31 PM4/19/16
to meetecho-janus
I can not figure out how to get an RTSP camera working. I have the meeting room demo working. I can stream audio files. But I an unable to stream video.  Can you help me out we a clue on how to debug this?

I tried with rtsp IP cam, I am sure it is working since I can view it with vlc.

[rtsp-test]
type = rtsp
description = goat RTSP Test 111111
audio = no
video = yes

and with a gstreamer source:
gst-launch-1.0 -v v4l2src device=/dev/video0     ! video/x-raw,format=YUY2,width=640,height=480 ! videoconvert ! x264enc ! h264parse ! rtph264pay config-interval=1 pt=96 ! udpsink host=127.0.0.1 port=8004

h264-sample]
type = rtp
id = 10
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

Janus log

Firefox seems to be complaining that it can not locate the stream?

ICE(PC:1461035644963648 (id=87 url=http://localhost/demos/streamingtest.html)): peer (PC:1461035644963648 (id=87 url=http://localhost/demos/streamingtest.html):default) has no stream matching stream 1461035644963648 (id=87 url=http://localhost/demos/streamingtest.html) aLevel=0

ICE(PC:1461035644963648 (id=87 url=http://localhost/demos/streamingtest.html)): peer (PC:1461035644963648 (id=87 url=http://localhost/demos/streamingtest.html):default) received no media stream attributes

ICE(PC:1461035851758111 (id=88 url=http://localhost/demos/streamingtest.html)): No STUN servers specified

ICE(PC:1461035851758111 (id=88 url=http://localhost/demos/streamingtest.html)): No TURN servers specified

ICE(PC:1461035851758111 (id=88 url=http://localhost/demos/streamingtest.html)): peer (PC:1461035851758111 (id=88 url=http://localhost/demos/streamingtest.html):default) has no stream matching stream 1461035851758111 (id=88 url=http://localhost/demos/streamingtest.html) aLevel=0

ICE(PC:1461035851758111 (id=88 url=http://localhost/demos/streamingtest.html)): peer (PC:1461035851758111 (id=88 url=http://localhost/demos/streamingtest.html):default) received no media stream attributes

ICE(PC:1461081376768360 (id=89 url=http://localhost/demos/streamingtest.html)): No STUN servers specified

ICE(PC:1461081376768360 (id=89 url=http://localhost/demos/streamingtest.html)): No TURN servers specified

ICE(PC:1461081376768360 (id=89 url=http://localhost/demos/streamingtest.html)): peer (PC:1461081376768360 (id=89 url=http://localhost/demos/streamingtest.html):default) has no stream matching stream 1461081376768360 (id=89 url=http://localhost/demos/streamingtest.html) aLevel=0

ICE(PC:1461081376768360 (id=89 url=http://localhost/demos/streamingtest.html)): peer (PC:1461081376768360 (id=89 url=http://localhost/demos/streamingtest.html):default) received no media stream attributes


Lorenzo Miniero

unread,
Apr 19, 2016, 12:53:30 PM4/19/16
to meetecho-janus
Not sure I understand the question: are you trying to restream an RTSP url, or a H.264 stream generated via gstreamer? You pasted two different examples related to two different things.

L.

Jon Smirl

unread,
Apr 19, 2016, 2:36:32 PM4/19/16
to meetecho-janus
My main goal is to get RTSP camera forwarding working.  The Firefox log was from RTSP camera connection attempt. The Janus log is also from the RTSP camera.

For testing I used the streamtest.html file. The Janus HTML directory was copied over to nginx as a web server. When I start streamtest I see my stream choices. The audio stream choices work, but the video (RTSP) stream does not. It just gives the waiting icon forever.

As an additional test I tried using gstreamer. It is failing in the same way but I did not attach any logs for that case.

janus is built from git source as of yesterday.

Lorenzo Miniero

unread,
Apr 19, 2016, 2:46:21 PM4/19/16
to meetecho-janus
Then it's probably a codec issue. The fact it works in VLC is only party relevant: H.264 has several different profiles, and WebRTC browsers only support baseline, not others. There may be limitations on the packetization mode as well, but I'm not sure. You should investigate what the RTSP source is sending and if you can configure that somehow.

L.

Jon Smirl

unread,
Apr 19, 2016, 2:57:20 PM4/19/16
to meetecho-janus
I'll look at the codec info. I should be able to control the compression level from the camera.

But it did occur to me that an improvement to Janus could look at the h.264 headers in the stream and then generate a better error message. Right now this is failing with no error message in any logs.

Lorenzo Miniero

unread,
Apr 19, 2016, 5:01:30 PM4/19/16
to meetecho-janus
It shouldn't be a matter of compression, but of encoding profile. As to the headers, we purposedly don't look at the media, and don't transcode it either, especially considering there may be several different codecs involved and we can't (and don't want to) parse them all: the Streaming plugin just relays whatever it gets, it's the user's responsibility making sure what is sent is actually WebRTC compliant.

L.
Reply all
Reply to author
Forward
0 new messages