CoSMoSoftware / OBS-studio-webrtc

This is a fork of OBS-studio with generic support for webrtc. It leverages the same webrtc implementation most browsers use.
http://www.cosmosoftware.io
GNU General Public License v2.0
593 stars 130 forks source link

can't connect to janus video room #41

Closed MaxwellGumley closed 5 years ago

MaxwellGumley commented 6 years ago

I am using the build "obs-studio-x64-2.4-1-ga879afa8.exe". I installed the janus gateway on a xubuntu 16.04.2 vm.

The Janus demo server is working fine, but OBS_WebRTC will not connect to the video room. I get the error "An unexpected error occurred when trying to connect to the server. More information in the log file." The log file does not have any additional information :(

I have tried reading the documentation for Janus, and all the issues here, but I cannot find any help. I very much look forward to OBS streaming with such low latency. Thank you for all your hard work. Please see the attached screenshots and log file.

Log file: 2018-07-31 22-45-18.txt

error_screenshot

janus_webserver_screenshot

Update: I monitored my LAN with wireshark. I discovered I was trying to connect to the wrong port. I updated the Server Name field of OBS-WebRTC to ws://xubuntu16042:8188. It is still not connecting, but at least now I'm getting a 403 HTML message from the server. I have attached the resulting Wireshark log: Wireshark_OBS-WebRTC_to_Janus-Gateway_2018-08-01.zip

Update: After experimenting with the "Plugin Demo: VP9-SVC Video Room", I discovered that the websocket on the janus server is working correctly, serving port 8188. The OBS-WebRTC is not correctly handling the address ws://xubuntu16042:8188/janus, because I can see in Wireshark that it is trying to send a TLSv1 packet, and it should not be using https for a ws address.

shadoxx commented 6 years ago

I'm experiencing the same or similar issue. I've setup janus-gateway on my internal network and have tested that all of the provided examples are working.

I've set the server URL in OBS to ws://janusgw:8188/janus and the room to 1234 (as that's the default room in all of the examples). I am including my full OBS log for reference:

15:58:11.062: CPU Name: Intel(R) Core(TM) i7-6700K CPU @ 4.00GHz
15:58:11.062: CPU Speed: 4008MHz
15:58:11.062: Physical Cores: 4, Logical Cores: 8
15:58:11.062: Physical Memory: 16325MB Total, 8323MB Free
15:58:11.062: Windows Version: 10.0 Build 17134 (revision: 285; 64-bit)
15:58:11.062: Running as administrator: false
15:58:11.062: Aero is Enabled (Aero is always on for windows 8 and above)
15:58:11.062: Windows 10 Gaming Features:
15:58:11.062:         Game DVR: On
15:58:11.063: Sec. Software Status:
15:58:11.063:         Windows Defender Antivirus: enabled (AV)
15:58:11.064:         Windows Firewall: enabled (FW)
15:58:11.064:         Windows Defender Antivirus: enabled (ASW)
15:58:11.064: Portable mode: false
15:58:11.138: OBS 2.4-1-ga879afa8 (64bit, windows)
15:58:11.138: ---------------------------------
15:58:11.138: ---------------------------------
15:58:11.138: audio settings reset:
15:58:11.138:         samples per sec: 44100
15:58:11.138:         speakers:        2
15:58:11.139: ---------------------------------
15:58:11.139: Initializing D3D11...
15:58:11.139: Available Video Adapters: 
15:58:11.140:         Adapter 1: NVIDIA GeForce GTX TITAN X
15:58:11.140:           Dedicated VRAM: 4243456000
15:58:11.140:           Shared VRAM:    4264413184
15:58:11.140:           output 1: pos={0, 0}, size={1680, 1050}, attached=true
15:58:11.142: Loading up D3D11 on adapter NVIDIA GeForce GTX TITAN X (0)
15:58:11.176: D3D11 loaded successfully, feature level used: 45056
15:58:11.700: ---------------------------------
15:58:11.700: video settings reset:
15:58:11.700:         base resolution:   1920x1080
15:58:11.700:         output resolution: 1920x1080
15:58:11.700:         downscale filter:  Bicubic
15:58:11.700:         fps:               60/1
15:58:11.700:         format:            NV12
15:58:11.700:         YUV mode:          601/Partial
15:58:11.701: Audio monitoring device:
15:58:11.701:         name: Default
15:58:11.701:         id: default
15:58:11.701: ---------------------------------
15:58:11.702: [CoreAudio encoder]: CoreAudio AAC encoder not installed on the system or couldn't be loaded
15:58:11.707: NVENC supported
15:58:11.734: No blackmagic support
15:58:11.737: ---------------------------------
15:58:11.737:   Loaded Modules:
15:58:11.737:     win-wasapi.dll
15:58:11.737:     win-mf.dll
15:58:11.737:     win-dshow.dll
15:58:11.737:     win-decklink.dll
15:58:11.737:     win-capture.dll
15:58:11.737:     websocketclient.dll
15:58:11.737:     text-freetype2.dll
15:58:11.737:     rtmp-services.dll
15:58:11.737:     obs-x264.dll
15:58:11.737:     obs-vst.dll
15:58:11.737:     obs-transitions.dll
15:58:11.737:     obs-text.dll
15:58:11.737:     obs-qsv11.dll
15:58:11.737:     obs-outputs.dll
15:58:11.737:     obs-filters.dll
15:58:11.737:     obs-ffmpeg.dll
15:58:11.737:     image-source.dll
15:58:11.737:     frontend-tools.dll
15:58:11.737:     coreaudio-encoder.dll
15:58:11.737: ---------------------------------
15:58:11.737: ==== Startup complete ===============================================
15:58:11.738: All scene data cleared
15:58:11.738: ------------------------------------------------
15:58:11.743: [WASAPISource::WASAPISource] Device '{0.0.0.00000000}.{81784c73-7eb3-4d37-9003-331ab0c77676}' not found.  Waiting for device
15:58:11.744: [WASAPISource::WASAPISource] Device 'default' not found.  Waiting for device
15:58:11.745: [window-capture: 'vrchat'] update settings:
15:58:11.745:         executable: VRChat.exe
15:58:11.750: Switched to scene 'Scene'
15:58:11.751: ------------------------------------------------
15:58:11.751: Loaded scenes:
15:58:11.751: - scene 'Scene':
15:58:11.751:     - source: 'vrchat' (window_capture)
15:58:11.751:         - filter: 'Crop/Pad' (crop_filter)
15:58:11.751:     - source: 'Display Capture' (monitor_capture)
15:58:11.751:         - filter: 'Scaling/Aspect Ratio' (scale_filter)
15:58:11.751: ------------------------------------------------
15:58:11.874: load_graphics_offsets: Failed to start 'get-graphics-offsets32.exe'
15:58:13.687: janus_stream_defaults
15:58:13.687: janus_stream_create
15:58:13.688: Output 'simple_stream': Tried to set a delay value on a non-encoded output
15:58:13.688: janus_stream_start
15:58:13.690: -connecting to [url:ws://192.168.42.197:8188/janus,room:1234,username:,password:]
15:58:18.693: onDisconnected
15:58:18.693: ==== Streaming Stop ================================================
15:58:45.013: User Removed source 'vrchat' (window_capture) from scene 'Scene'
15:58:47.904: Output 'simple_stream': Tried to set a delay value on a non-encoded output
15:58:47.904: janus_stream_start
15:58:47.906: ==== Streaming Stop ================================================
15:58:47.907: -connecting to [url:ws://janusgw:8188/janus,room:1234,username:,password:]
15:58:52.910: onDisconnected
15:58:52.910: ==== Streaming Stop ================================================
Ben-cos commented 5 years ago

Fixed in last release (tag 2.7). Note: For now, we only support connection through WebSocket secure (wss).

shadoxx commented 5 years ago

I can confirm this issue is fixed. Tested with AMD Video card and Janus-Gateway server in the default 8675309 room. Thanks @Ben-cos and @agouaillard-cosmo!

agouaillard-cosmo commented 5 years ago

thanks for taking the time to validate and report.