meetecho / janus-gateway

Janus WebRTC Server
https://janus.conf.meetecho.com
GNU General Public License v3.0
8.22k stars 2.48k forks source link

Just see white space where video should be? #852

Closed czarina closed 7 years ago

czarina commented 7 years ago

Hi,

First, thanks for the fantastic work, I am very excited to use Janus!!

I have a Pi Zero + Pi camera attempting to streaming video to a Janus gateway on a remote NGinx web server.

When I visit the page, I see a 'start' button, and when I click it I see a video player with a white area where the video should be, and a play icon. When I hit play, no video shows up.

Here is my Pi command and output

$ raspivid --verbose --nopreview -hf -vf --width 640 --height 480 --framerate 15 --bitrate 1000000 --profile baseline --timeout 0 -o - \
| gst-launch-1.0 -v fdsrc ! h264parse ! rtph264pay config-interval=1 pt=96 ! udpsink host=<####> port=8004

Setting pipeline to PAUSED ...
Pipeline is PREROLLING ...
/GstPipeline:pipeline0/GstH264Parse:h264parse0.GstPad:src: caps = "video/x-h264\,\ width\=\(int\)640\,\ height\=\(int\)480\,\ framerate\=\(fraction\)0/1\,\ parsed\=\(boolean\)true\,\ stream-format\=\(string\)avc\,\ alignment\=\(string\)au\,\ level\=\(string\)4\,\ profile\=\(string\)baseline\,\ codec_data\=\(buffer\)01428028ffe1000d2742802895a0280f680789135001000528ce025c80"
/GstPipeline:pipeline0/GstRtpH264Pay:rtph264pay0.GstPad:src: caps = "application/x-rtp\,\ media\=\(string\)video\,\ clock-rate\=\(int\)90000\,\ encoding-name\=\(string\)H264\,\ sprop-parameter-sets\=\(string\)\"J0KAKJWgKA9oB4kTUA\\\=\\\=\\\,KM4CXIA\\\=\"\,\ payload\=\(int\)96\,\ ssrc\=\(uint\)3599307637\,\ timestamp-offset\=\(uint\)2649169349\,\ seqnum-offset\=\(uint\)1779"
/GstPipeline:pipeline0/GstUDPSink:udpsink0.GstPad:sink: caps = "application/x-rtp\,\ media\=\(string\)video\,\ clock-rate\=\(int\)90000\,\ encoding-name\=\(string\)H264\,\ sprop-parameter-sets\=\(string\)\"J0KAKJWgKA9oB4kTUA\\\=\\\=\\\,KM4CXIA\\\=\"\,\ payload\=\(int\)96\,\ ssrc\=\(uint\)3599307637\,\ timestamp-offset\=\(uint\)2649169349\,\ seqnum-offset\=\(uint\)1779"
/GstPipeline:pipeline0/GstRtpH264Pay:rtph264pay0.GstPad:sink: caps = "video/x-h264\,\ width\=\(int\)640\,\ height\=\(int\)480\,\ framerate\=\(fraction\)0/1\,\ parsed\=\(boolean\)true\,\ stream-format\=\(string\)avc\,\ alignment\=\(string\)au\,\ level\=\(string\)4\,\ profile\=\(string\)baseline\,\ codec_data\=\(buffer\)01428028ffe1000d2742802895a0280f680789135001000528ce025c80"
/GstPipeline:pipeline0/GstRtpH264Pay:rtph264pay0: timestamp = 2649169349
/GstPipeline:pipeline0/GstRtpH264Pay:rtph264pay0: seqnum = 1779
Pipeline is PREROLLED ...
Setting pipeline to PLAYING ...
New clock: GstSystemClock

Here is what I run on the server, and the output:

# /opt/janus/bin/janus -F /opt/janus/etc/janus

  Starting Meetecho Janus (WebRTC Gateway) v0.2.3

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 #### as local IP...
[WARN] Token based authentication disabled
Initializing recorder code
Initializing ICE stuff (Full mode, ICE-TCP candidates disabled, IPv6 support disabled)
ICE handles watchdog started
TURN REST API backend: (disabled)
BUNDLE is NOT going to be forced
rtcp-mux is NOT going to be forced
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
[WARN] Event handlers support disabled
Plugins folder: /opt/janus/lib/janus/plugins
Sessions watchdog started
Loading plugin 'libjanus_recordplay.so'...
JANUS Record&Play plugin initialized!
Loading plugin 'libjanus_videocall.so'...
Record&Play watchdog started
JANUS VideoCall plugin initialized!
Loading plugin 'libjanus_voicemail.so'...
VideoCall watchdog started
JANUS VoiceMail plugin initialized!
Loading plugin 'libjanus_textroom.so'...
VoiceMail watchdog started
JANUS TextRoom plugin initialized!
Loading plugin 'libjanus_streaming.so'...
TextRoom watchdog started
[ERR] [plugins/janus_streaming.c:janus_streaming_init:760] A stream with the provided ID 1 already exists, skipping 'gstreamer-sample'
JANUS Streaming plugin initialized!
Loading plugin 'libjanus_echotest.so'...
Streaming watchdog started
JANUS EchoTest plugin initialized!
Loading plugin 'libjanus_videoroom.so'...
EchoTest watchdog started
JANUS VideoRoom plugin initialized!
Loading plugin 'libjanus_audiobridge.so'...
VideoRoom watchdog started
JANUS AudioBridge plugin initialized!
Loading plugin 'libjanus_sip.so'...
AudioBridge watchdog started
JANUS SIP plugin initialized!
Transport plugins folder: /opt/janus/lib/janus/transports
Loading transport plugin 'libjanus_pfunix.so'...
SIP 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
[gst-rpwc] New video stream! (ssrc=3599307637)

Here is how I created the janus config (this is configured for video+audio, just testing the video right now)

sudo pico /opt/janus/etc/janus/janus.plugin.streaming.cfg

[gst-rpwc]
type = rtp
id = 1
description = RPWC H264 test streaming
audio = yes
audioport = 8005
audiopt = 10
audiortpmap = opus/48000/2
video = yes
videoport = 8004
videopt = 96
videortpmap = H264/90000
videofmtp = profile-level-id=42e028\;packetization-mode=1

Here is the html for the Janus page I created (credit to https://planb.nicecupoftea.org/2015/10/17/hackspace-hat-quick-install-or-audio-and-video-streaming-from-a-raspberry-pi-to-a-remote-or-local-webrtc-compatible-browser/): http://vpaste.net/ST74j

I've updated to the latest Firefox, 52.0.2.

FWIW, I read your 'Deploying Janus' page, then did the following. I copied the demo folder to my server and visited videoroomtest.html, which loads fine. But I click 'Start', I get a popup saying: Error: is the gateway down? I've gone to videoroomtest.js and changed the port to 8004, as that is my video port. I wasn't sure if I should change the API path, as I don't really know what that means or what it should be. I haven't altered anything else in the file. I then just ran my command on my Pi, restarted my server, and visited videoroomtest.html.

Can you help me diagnose the issue(s)?

czarina commented 7 years ago

Closing because I've sent a msg on the email-list.