I'm trying to set up video stream via WebRTC from raspberry pi. I'm using a USB webcam, UV4L and Janus to accomplish the same. WebRTC is not working.
I've followed steps outlined here, except that I'm using uv4l instead of gstreamer. I've installed janus gateway on another (Ubuntu) machine on the same network.
My janus (on Ubuntu) when started shows this:
$ /opt/janus/bin/janus -F /opt/janus/etc/janus
Janus commit: 1e06290078268279ca69d5aaf0a76831973b3457
Compiled on: Tue Jan 30 00:53:34 IST 2018
---------------------------------------------------
Starting Meetecho Janus (WebRTC Gateway) v0.3.0
---------------------------------------------------
Checking command line arguments...
Debug/log level is 4
Debug/log timestamps are disabled
Debug/log colors are enabled
Adding 'vmnet' to the ICE ignore list...
Using 192.168.1.101 as local IP...
[WARN] Token based authentication disabled
Initializing recorder code
Initializing ICE stuff (Full mode, ICE-TCP candidates disabled, IPv6 support disabled)
STUN server to use: stun.l.google.com:19302
ICE handles watchdog started
>> 74.125.200.127:19302 (IPv4)
Testing STUN server: message is of 20 bytes
>> Our public address is 49.35.222.150
Crypto: OpenSSL pre-1.1.0
Fingerprint of our certificate: 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
[WARN] Data Channels support not compiled
Event handler plugins folder: /opt/janus/lib/janus/events
[FATAL] [janus.c:main:3687] Couldn't access event handler plugins folder...
Plugins folder: /opt/janus/lib/janus/plugins
Loading plugin 'libjanus_streaming.so'...
Sessions watchdog started
JANUS Streaming plugin initialized!
Loading plugin 'libjanus_recordplay.so'...
Streaming watchdog started
JANUS Record&Play plugin initialized!
Loading plugin 'libjanus_sip.so'...
Record&Play watchdog started
JANUS SIP plugin initialized!
Loading plugin 'libjanus_videoroom.so'...
SIP watchdog started
JANUS VideoRoom plugin initialized!
Loading plugin 'libjanus_textroom.so'...
VideoRoom watchdog started
JANUS TextRoom plugin initialized!
Loading plugin 'libjanus_voicemail.so'...
TextRoom watchdog started
JANUS VoiceMail plugin initialized!
Loading plugin 'libjanus_audiobridge.so'...
VoiceMail watchdog started
JANUS AudioBridge plugin initialized!
Loading plugin 'libjanus_videocall.so'...
AudioBridge watchdog started
JANUS VideoCall plugin initialized!
Loading plugin 'libjanus_nosip.so'...
VideoCall watchdog started
JANUS NoSIP plugin initialized!
Loading plugin 'libjanus_echotest.so'...
NoSIP watchdog started
JANUS EchoTest plugin initialized!
Transport plugins folder: /opt/janus/lib/janus/transports
Loading transport plugin 'libjanus_pfunix.so'...
EchoTest watchdog started
[WARN] Unix Sockets server disabled (Janus API)
[WARN] Unix Sockets server disabled (Admin API)
[WARN] No Unix Sockets server started, giving up...
[WARN] The 'janus.transport.pfunix' plugin could not be initialized
Loading transport plugin 'libjanus_http.so'...
HTTP webserver started (port 8088, /janus path listener)...
[WARN] HTTPS webserver disabled
[WARN] Admin/monitor HTTP webserver disabled
[WARN] Admin/monitor HTTPS webserver disabled
JANUS REST (HTTP/HTTPS) transport plugin initialized!
HTTP/Janus sessions watchdog started
This is how I start the UV4L on pi:
pi@raspberrypi:~ $ uv4l --driver uvc --device-id 046d:082b --server-option '--max-streams=25' --server-option '--max-threads=29' --server-option '--port=8090' --server-option '--janus-gateway-url=http://192.168.1.101:8088'
<notice> [core] Trying to loading driver 'uvc' from built-in drivers...
<notice> [core] Loading driver 'uvc' from external plug-in's...
<notice> [driver] Video functionality 'Webcam C170' recognized at 046d:082b
<notice> [core] Device detected!
<notice> [core] Registering device node /dev/uv4l
pi@raspberrypi:~ $
Accessing http://PIIP:8090/stream/video.mjpeg shows the stream from home network. An interesting point to note, when uv4l is started, it does not cause any new log to show up on janus window. Is it so that my configuration is incorrect/incomplete?
Finally, when I access the link http://ip-of-server/janus-gateway-streamtest.html , clicking on Start button does nothing. Similarly, http://serverip/streamingtest.html shows a link (RPWC, as configured in janus) for streaming, but when we click on "Watch or listen", it shows nothing.
I'm sure some setting up is incorrectly done.. Which is that?
EDIT 1:
After a comment, I confirmed to check again if setting in http://piip:8090/janus is correctly set, which it was (see image below) and I clicked on Start button
I tried to open the http://192.168.1.101/videoroomtest.html, I'm able to see my feed, BUT - I was assuming that janus would behave more like a signalling server, in my case, it seems that janus is behaving as replay/replying server. Ideally, if the connection is established, and then if janus server goes down, then the streaming should still not break. However, I manually stopped janus, and the streaming stopped. How do I configure uv4l to use janus as signalling, and not as a relaying server (like TURN). Also, this is what I get on janus console:
Creating new session: 4606856182184138
Creating new handle in session 4606856182184138: 2281485457416758
Creating new handle in session 4606856182184138: 6811320978768068
[6811320978768068] Creating ICE agent (ICE Full mode, controlling)
[6811320978768068] The DTLS handshake has been completed
WebRTC media is now available
[WARN] [6811320978768068] Not video and not audio? dropping (SSRC 1029175205)...