Skip to content
This repository has been archived by the owner on Mar 22, 2022. It is now read-only.

WebRTC not totally working #225

Open
Silloty1 opened this issue Mar 18, 2020 · 22 comments
Open

WebRTC not totally working #225

Silloty1 opened this issue Mar 18, 2020 · 22 comments
Labels
need info More information is needed from the author to answer

Comments

@Silloty1
Copy link

Silloty1 commented Mar 18, 2020

Hi

I have a question regarding how the service is working.
I managed to install the WebRTC for Unity, and to generate a Windows solution for another computer.
I, then, tried the VideoChat example but several questions are coming to my mind.

  1. The connexion doesn't always work. Sometimes, I only see the local camera one the first computer, and I only see the FPS counter of the Remote Video Player. Why is that?
  2. After I finally manage to have the 2 cameras on 2 differents computers, the second computer is able to send its voice and video to the first one, but the first one only sends the video, not the audio from the microphone. How can I fix that?
  3. How can I handle multiple remote video player? For example, if I want to run the program on 3 different devices? Currently, I only manage to have the FPS counter what appears but no video nor audio.

In all the cases, I can see that my different devices are connected to the server, and I can see that they are trying to send information for other devices, but I cannot figure out how to make it work properly

Thanks a lot

@djee-ms
Copy link
Member

djee-ms commented Mar 18, 2020

Hi @Silloty1,

  1. Not sure. I heard some people having difficulty, maybe the same as yours, but I personally can't reproduce this, so it's difficult to help without more info.

  2. Same, I need more info on this. In general audio should "just work". Some things to check:

    • What's the SDP message? Does it contain an audio track? Can you please paste the offer/answer?
    • On the receiving side, if you put a breakpoint (or some debug log) in RemoteAudioSource.TrackAdded, do you see the audio track?
    • On the receiving side too, is MediaPlayer.AudioStreamStarted called? It should be called by RemoteAudioSource.TrackAdded from above.
    • As you can see currently MediaPlayer.AudioStreamStarted does nothing because audio rendering is managed internally (this will change with Remote audio feature #99), so if everything else works then we will need to check the low-level WebRTC logs to find out why audio is not rendered. But let's check the items above first.
  3. WebRTC is a peer-to-peer technology. If you want more than 2 peers, you need some external solution like a media server (MCU or SFU). We don't currently provide anything for that. A simple alternative though, but which does not scale well, is to create 1 peer connection per pair of devices (so-called mesh network configuration, so 3 devices => 3 peer connections, 4 devices => 6 peer connections, 5 devices => 10 peer connections, etc. this is quadratic which is why it doesn't scale).

@timo92700
Copy link

timo92700 commented Mar 19, 2020

Hi,
I have setup a SFU server ( janus ) then i can stream my screen / webcam as video input on server-side. I can connect a browser to my server ( using 1 or n browser on different machines ) and receive the video + audio. Did someone developped a client, in uwp, able to receive these content ( like a browser in uwp apps ) ? Is there any solution ? Or an idea to how to do this ? Maybe i have to retro-engineer the web-rtc protol and create texture from data received to build the player ? Or maybe i have to wait for the vlc media player library be available on uwp, then i can just connect to the http url ?

@Silloty1
Copy link
Author

Hi @Silloty1,

  1. Not sure. I heard some people having difficulty, maybe the same as yours, but I personally can't reproduce this, so it's difficult to help without more info.

  2. Same, I need more info on this. In general audio should "just work". Some things to check:

    • What's the SDP message? Does it contain an audio track? Can you please paste the offer/answer?
    • On the receiving side, if you put a breakpoint (or some debug log) in RemoteAudioSource.TrackAdded, do you see the audio track?
    • On the receiving side too, is MediaPlayer.AudioStreamStarted called? It should be called by RemoteAudioSource.TrackAdded from above.
    • As you can see currently MediaPlayer.AudioStreamStarted does nothing because audio rendering is managed internally (this will change with Remote audio feature #99), so if everything else works then we will need to check the low-level WebRTC logs to find out why audio is not rendered. But let's check the items above first.
  3. WebRTC is a peer-to-peer technology. If you want more than 2 peers, you need some external solution like a media server (MCU or SFU). We don't currently provide anything for that. A simple alternative though, but which does not scale well, is to create 1 peer connection per pair of devices (so-called mesh network configuration, so 3 devices => 3 peer connections, 4 devices => 6 peer connections, 5 devices => 10 peer connections, etc. this is quadratic which is why it doesn't scale).

Hi
Here are the logs from the Unity Player.
I've set up 2 debugs, one in RemoteAudioSource.TrackAdded and one in MediaPlayer.AudioStreamStarted, both are called in the Unity Console. But on the second laptop, I don't have any of the two what are called. That's why I don't hear anything on the second laptop.
image

Here are the logs from the second client, what doesn't hear the first one :
Player.log

Thanks for your third answer, I'm going to have a closer look at it. But I didn't really get it : Peer to peer technology is supposed to be a technology that directly communicates between clients. Why do we need a server here then in the end ?

@djee-ms
Copy link
Member

djee-ms commented Mar 19, 2020

Can you please paste the full SDP offer/answer. I can only see the first line of the message. It's usually a ~40 lines message.

image

@Silloty1
Copy link
Author

Silloty1 commented Mar 19, 2020

Can you please paste the full SDP offer/answer. I can only see the first line of the message. It's usually a ~40 lines message.

image

Hi again.
Here's the message from the Unity's side :
Do you need from the second client-side?

Received SDP message: type=Offer data=v=0
o=- 3625709503784119243 2 IN IP4 127.0.0.1
s=-
t=0 0
a=group:BUNDLE 0 1
a=msid-semantic: WMS local_av_stream
m=audio 9 UDP/TLS/RTP/SAVPF 111 103 104 9 102 0 8 106 105 13 110 112 113 126
c=IN IP4 0.0.0.0
a=rtcp:9 IN IP4 0.0.0.0
a=ice-ufrag:Oo/2
a=ice-pwd:ctcd8Jy8PeJ1pHWGZIdExYa7
a=ice-options:trickle
a=fingerprint:sha-256 D4:C4:54:8A:E3:FD:88:3B:AE:54:A3:6C:13:C3:4D:F2:DE:3D:02:6C:20:36:61:68:59:B8:6E:12:11:12:B9:9D
a=setup:actpass
a=mid:0
a=extmap:1 urn:ietf:params:rtp-hdrext:ssrc-audio-level
a=extmap:9 urn:ietf:params:rtp-hdrext:sdes:mid
a=sendrecv
a=msid:local_av_stream local_audio
a=rtcp-mux
a=rtpmap:111 opus/48000/2
a=rtcp-fb:111 transport-cc
a=fmtp:111 minptime=10;useinbandfec=1
a=rtpmap:103 ISAC/16000
a=rtpmap:104 ISAC/32000
a=rtpmap:9 G722/8000
a=rtpmap:102 ILBC/8000
a=rtpmap:0 PCMU/8000
a=rtpmap:8 PCMA/8000
a=rtpmap:106 CN/32000
a=rtpmap:105 CN/16000
a=rtpmap:13 CN/8000
a=rtpmap:110 telephone-event/48000
a=rtpmap:112 telephone-event/32000
a=rtpmap:113 telephone-event/16000
a=rtpmap:126 telephone-event/8000
a=ssrc:2887326687 cname:FZ5nnKKgeYJr14hn
a=ssrc:2887326687 msid:local_av_stream local_audio
a=ssrc:2887326687 mslabel:local_av_stream
a=ssrc:2887326687 label:local_audio
m=video 9 UDP/TLS/RTP/SAVPF 96 97 98 99 100 101 127 124 125
c=IN IP4 0.0.0.0
a=rtcp:9 IN IP4 0.0.0.0
a=ice-ufrag:Oo/2
a=ice-pwd:ctcd8Jy8PeJ1pHWGZIdExYa7
a=ice-options:trickle
a=fingerprint:sha-256 D4:C4:54:8A:E3:FD:88:3B:AE:54:A3:6C:13:C3:4D:F2:DE:3D:02:6C:20:36:61:68:59:B8:6E:12:11:12:B9:9D
a=setup:actpass
a=mid:1
a=extmap:2 urn:ietf:params:rtp-hdrext:toffset
a=extmap:3 http://www.webrtc.org/experiments/rtp-hdrext/abs-send-time
a=extmap:4 urn:3gpp:video-orientation
a=extmap:5 http://www.ietf.org/id/draft-holmer-rmcat-transport-wide-cc-extensions-01
a=extmap:6 http://www.webrtc.org/experiments/rtp-hdrext/playout-delay
a=extmap:7 http://www.webrtc.org/experiments/rtp-hdrext/video-content-type
a=extmap:8 http://www.webrtc.org/experiments/rtp-hdrext/video-timing
a=extmap:10 http://tools.ietf.org/html/draft-ietf-avtext-framemarking-07
a=extmap:9 urn:ietf:params:rtp-hdrext:sdes:mid
a=sendrecv
a=msid:local_av_stream local_video
a=rtcp-mux
a=rtcp-rsize
a=rtpmap:96 VP8/90000
a=rtcp-fb:96 goog-remb
a=rtcp-fb:96 transport-cc
a=rtcp-fb:96 ccm fir
a=rtcp-fb:96 nack
a=rtcp-fb:96 nack pli
a=rtpmap:97 rtx/90000
a=fmtp:97 apt=96
a=rtpmap:98 VP9/90000
a=rtcp-fb:98 goog-remb
a=rtcp-fb:98 transport-cc
a=rtcp-fb:98 ccm fir
a=rtcp-fb:98 nack
a=rtcp-fb:98 nack pli
a=fmtp:98 x-google-profile-id=0
a=rtpmap:99 rtx/90000
a=fmtp:99 apt=98
a=rtpmap:100 multiplex/90000
a=rtcp-fb:100 goog-remb
a=rtcp-fb:100 transport-cc
a=rtcp-fb:100 ccm fir
a=rtcp-fb:100 nack
a=rtcp-fb:100 nack pli
a=fmtp:100 acn=VP9;x-google-profile-id=0
a=rtpmap:101 rtx/90000
a=fmtp:101 apt=100
a=rtpmap:127 red/90000
a=rtpmap:124 rtx/90000
a=fmtp:124 apt=127
a=rtpmap:125 ulpfec/90000
a=ssrc-group:FID 3368340708 4146798617
a=ssrc:3368340708 cname:FZ5nnKKgeYJr14hn
a=ssrc:3368340708 msid:local_av_stream local_video
a=ssrc:3368340708 mslabel:local_av_stream
a=ssrc:3368340708 label:local_video
a=ssrc:4146798617 cname:FZ5nnKKgeYJr14hn
a=ssrc:4146798617 msid:local_av_stream local_video
a=ssrc:4146798617 mslabel:local_av_stream
a=ssrc:4146798617 label:local_video

@djee-ms
Copy link
Member

djee-ms commented Mar 19, 2020

Ok so a=sendrecv on both the audio and video mean the offering side (laptop) is notifying its remote peer (Unity Editor) that the offering peer (laptop) also offers to receive from the answering peer (Unity Editor). That looks all good.

Now the question is, does the answering peer (Unity Editor) accepts to send audio in return? We need to see the answer that the Unity Editor sends to the laptop. Can you please paste that SDP answer message? You can grab it from your signaling solution, or by logging it before it's sent in Unity in Signaler_LocalSdpReadyToSend().

@Silloty1
Copy link
Author

Should I debug the Signaler_LocalSdpReadyToSend(). for that ?

@djee-ms
Copy link
Member

djee-ms commented Mar 19, 2020

...or by logging it before it's sent in Unity in Signaler_LocalSdpReadyToSend().

Yes :)

@Silloty1
Copy link
Author

Just to check that it's called or do I need to debug the message?

@djee-ms
Copy link
Member

djee-ms commented Mar 19, 2020

We need to see the answer that the Unity Editor sends to the laptop. Can you please paste that SDP answer message?

@Silloty1
Copy link
Author

Silloty1 commented Mar 19, 2020

What format does the message should have ? Currently I have this :
image

For this :
image

EDIT : Sorry if I missunderstood you
EDIT 2 : I've debug the sdp data sent in the message, here is the complete data :

Data is v=0
o=- 5880907280264431091 3 IN IP4 127.0.0.1
s=-
t=0 0
a=group:BUNDLE 0 1
a=msid-semantic: WMS local_av_stream
m=audio 51135 UDP/TLS/RTP/SAVPF 111 103 104 9 102 0 8 106 105 13 110 112 113 126
c=IN IP4 81.64.242.198
a=rtcp:9 IN IP4 0.0.0.0
a=candidate:1880550016 1 udp 2122260223 192.168.0.16 51135 typ host generation 0 network-id 1 network-cost 10
a=candidate:2248577876 1 udp 1686052607 81.64.242.198 51135 typ srflx raddr 192.168.0.16 rport 51135 generation 0 network-id 1 network-cost 10
a=candidate:1049958000 1 tcp 1518280447 192.168.0.16 54374 typ host tcptype passive generation 0 network-id 1 network-cost 10
a=ice-ufrag:lHUC
a=ice-pwd:N79xnFkZUoRlKEna4a1LEGWt
a=ice-options:trickle
a=fingerprint:sha-256 F9:68:BC:93:7C:EC:78:1A:BE:A7:E2:AE:ED:90:8D:15:40:C1:D9:82:2B:95:82:CC:97:46:2C:B0:13:EC:81:00
a=setup:actpass
a=mid:0
a=extmap:1 urn:ietf:params:rtp-hdrext:ssrc-audio-level
a=extmap:9 urn:ietf:params:rtp-hdrext:sdes:mid
a=sendrecv
a=msid:local_av_stream local_audio
a=rtcp-mux
a=rtpmap:111 opus/48000/2
a=rtcp-fb:111 transport-cc
a=fmtp:111 minptime=10;useinbandfec=1
a=rtpmap:103 ISAC/16000
a=rtpmap:104 ISAC/32000
a=rtpmap:9 G722/8000
a=rtpmap:102 ILBC/8000
a=rtpmap:0 PCMU/8000
a=rtpmap:8 PCMA/8000
a=rtpmap:106 CN/32000
a=rtpmap:105 CN/16000
a=rtpmap:13 CN/8000
a=rtpmap:110 telephone-event/48000
a=rtpmap:112 telephone-event/32000
a=rtpmap:113 telephone-event/16000
a=rtpmap:126 telephone-event/8000
a=ssrc:219061672 cname:McvL5P9c/l1rS8BP
a=ssrc:219061672 msid:local_av_stream local_audio
a=ssrc:219061672 mslabel:local_av_stream
a=ssrc:219061672 label:local_audio
m=video 9 UDP/TLS/RTP/SAVPF 96 97 98 99 100 101 127 124 125
c=IN IP4 0.0.0.0
a=rtcp:9 IN IP4 0.0.0.0
a=ice-ufrag:lHUC
a=ice-pwd:N79xnFkZUoRlKEna4a1LEGWt
a=ice-options:trickle
a=fingerprint:sha-256 F9:68:BC:93:7C:EC:78:1A:BE:A7:E2:AE:ED:90:8D:15:40:C1:D9:82:2B:95:82:CC:97:46:2C:B0:13:EC:81:00
a=setup:actpass
a=mid:1
a=extmap:2 urn:ietf:params:rtp-hdrext:toffset
a=extmap:3 http://www.webrtc.org/experiments/rtp-hdrext/abs-send-time
a=extmap:4 urn:3gpp:video-orientation
a=extmap:5 http://www.ietf.org/id/draft-holmer-rmcat-transport-wide-cc-extensions-01
a=extmap:6 http://www.webrtc.org/experiments/rtp-hdrext/playout-delay
a=extmap:7 http://www.webrtc.org/experiments/rtp-hdrext/video-content-type
a=extmap:8 http://www.webrtc.org/experiments/rtp-hdrext/video-timing
a=extmap:10 http://tools.ietf.org/html/draft-ietf-avtext-framemarking-07
a=extmap:9 urn:ietf:params:rtp-hdrext:sdes:mid
a=sendrecv
a=msid:local_av_stream local_video
a=rtcp-mux
a=rtcp-rsize
a=rtpmap:96 VP8/90000
a=rtcp-fb:96 goog-remb
a=rtcp-fb:96 transport-cc
a=rtcp-fb:96 ccm fir
a=rtcp-fb:96 nack
a=rtcp-fb:96 nack pli
a=rtpmap:97 rtx/90000
a=fmtp:97 apt=96
a=rtpmap:98 VP9/90000
a=rtcp-fb:98 goog-remb
a=rtcp-fb:98 transport-cc
a=rtcp-fb:98 ccm fir
a=rtcp-fb:98 nack
a=rtcp-fb:98 nack pli
a=fmtp:98 x-google-profile-id=0
a=rtpmap:99 rtx/90000
a=fmtp:99 apt=98
a=rtpmap:100 multiplex/90000
a=rtcp-fb:100 goog-remb
a=rtcp-fb:100 transport-cc
a=rtcp-fb:100 ccm fir
a=rtcp-fb:100 nack
a=rtcp-fb:100 nack pli
a=fmtp:100 acn=VP9;x-google-profile-id=0
a=rtpmap:101 rtx/90000
a=fmtp:101 apt=100
a=rtpmap:127 red/90000
a=rtpmap:124 rtx/90000
a=fmtp:124 apt=127
a=rtpmap:125 ulpfec/90000
a=ssrc-group:FID 3329733090 1902341741
a=ssrc:3329733090 cname:McvL5P9c/l1rS8BP
a=ssrc:3329733090 msid:local_av_stream local_video
a=ssrc:3329733090 mslabel:local_av_stream
a=ssrc:3329733090 label:local_video
a=ssrc:1902341741 cname:McvL5P9c/l1rS8BP
a=ssrc:1902341741 msid:local_av_stream local_video
a=ssrc:1902341741 mslabel:local_av_stream
a=ssrc:1902341741 label:local_video

@Silloty1
Copy link
Author

Sorry, just saw that i actually had a sdp anwser message :

Received SDP message: type=Answer data=v=0
o=- 2262539088392482689 3 IN IP4 127.0.0.1
s=-
t=0 0
a=group:BUNDLE 0 1
a=msid-semantic: WMS local_av_stream
m=audio 49723 UDP/TLS/RTP/SAVPF 111 103 104 9 102 0 8 106 105 13 110 112 113 126
c=IN IP4 81.64.242.198
a=rtcp:9 IN IP4 0.0.0.0
a=candidate:800974396 1 udp 2122260223 192.168.0.30 49723 typ host generation 0 network-id 1 network-cost 10
a=candidate:3652034536 1 udp 1686052607 81.64.242.198 49723 typ srflx raddr 192.168.0.30 rport 49723 generation 0 network-id 1 network-cost 10
a=candidate:1631460044 1 tcp 1518280447 192.168.0.30 50387 typ host tcptype passive generation 0 network-id 1 network-cost 10
a=ice-ufrag:Kv+f
a=ice-pwd:WBKnzOKfRClpu796huyyBILx
a=ice-options:trickle
a=fingerprint:sha-256 06:23:FD:67:B8:5F:09:3C:62:D8:FE:14:9D:40:32:41:12:B7:51:69:3C:B3:2C:AA:6B:1C:E5:00:FF:21:FC:FC
a=setup:passive
a=mid:0
a=extmap:1 urn:ietf:params:rtp-hdrext:ssrc-audio-level
a=extmap:9 urn:ietf:params:rtp-hdrext:sdes:mid
a=sendrecv
a=msid:local_av_stream local_audio
a=rtcp-mux
a=rtpmap:111 opus/48000/2
a=rtcp-fb:111 transport-cc
a=fmtp:111 minptime=10;useinbandfec=1
a=rtpmap:103 ISAC/16000
a=rtpmap:104 ISAC/32000
a=rtpmap:9 G722/8000
a=rtpmap:102 ILBC/8000
a=rtpmap:0 PCMU/8000
a=rtpmap:8 PCMA/8000
a=rtpmap:106 CN/32000
a=rtpmap:105 CN/16000
a=rtpmap:13 CN/8000
a=rtpmap:110 telephone-event/48000
a=rtpmap:112 telephone-event/32000
a=rtpmap:113 telephone-event/16000
a=rtpmap:126 telephone-event/8000
a=ssrc:1585693337 cname:c4z7W1UZ82R5OO6x
m=video 49724 UDP/TLS/RTP/SAVPF 96 97 98 99 100 101 127 124 125
c=IN IP4 81.64.242.198
a=rtcp:9 IN IP4 0.0.0.0
a=candidate:800974396 1 udp 2122260223 192.168.0.30 49724 typ host generation 0 network-id 1 network-cost 10
a=candidate:3652034536 1 udp 1686052607 81.64.242.198 49724 typ srflx raddr 192.168.0.30 rport 49724 generation 0 network-id 1 network-cost 10
a=candidate:1631460044 1 tcp 1518280447 192.168.0.30 50388 typ host tcptype passive generation 0 network-id 1 network-cost 10
a=ice-ufrag:Kv+f
a=ice-pwd:WBKnzOKfRClpu796huyyBILx
a=ice-options:trickle
a=fingerprint:sha-256 06:23:FD:67:B8:5F:09:3C:62:D8:FE:14:9D:40:32:41:12:B7:51:69:3C:B3:2C:AA:6B:1C:E5:00:FF:21:FC:FC
a=setup:passive
a=mid:1
a=extmap:2 urn:ietf:params:rtp-hdrext:toffset
a=extmap:3 http://www.webrtc.org/experiments/rtp-hdrext/abs-send-time
a=extmap:4 urn:3gpp:video-orientation
a=extmap:5 http://www.ietf.org/id/draft-holmer-rmcat-transport-wide-cc-extensions-01
a=extmap:6 http://www.webrtc.org/experiments/rtp-hdrext/playout-delay
a=extmap:7 http://www.webrtc.org/experiments/rtp-hdrext/video-content-type
a=extmap:8 http://www.webrtc.org/experiments/rtp-hdrext/video-timing
a=extmap:10 http://tools.ietf.org/html/draft-ietf-avtext-framemarking-07
a=extmap:9 urn:ietf:params:rtp-hdrext:sdes:mid
a=sendrecv
a=msid:local_av_stream local_video
a=rtcp-mux
a=rtcp-rsize
a=rtpmap:96 VP8/90000
a=rtcp-fb:96 goog-remb
a=rtcp-fb:96 transport-cc
a=rtcp-fb:96 ccm fir
a=rtcp-fb:96 nack
a=rtcp-fb:96 nack pli
a=rtpmap:97 rtx/90000
a=fmtp:97 apt=96
a=rtpmap:98 VP9/90000
a=rtcp-fb:98 goog-remb
a=rtcp-fb:98 transport-cc
a=rtcp-fb:98 ccm fir
a=rtcp-fb:98 nack
a=rtcp-fb:98 nack pli
a=fmtp:98 x-google-profile-id=0
a=rtpmap:99 rtx/90000
a=fmtp:99 apt=98
a=rtpmap:100 multiplex/90000
a=rtcp-fb:100 goog-remb
a=rtcp-fb:100 transport-cc
a=rtcp-fb:100 ccm fir
a=rtcp-fb:100 nack
a=rtcp-fb:100 nack pli
a=fmtp:100 acn=VP9;x-google-profile-id=0
a=rtpmap:101 rtx/90000
a=fmtp:101 apt=100
a=rtpmap:127 red/90000
a=rtpmap:124 rtx/90000
a=fmtp:124 apt=127
a=rtpmap:125 ulpfec/90000
a=ssrc-group:FID 2910874903 2497505309
a=ssrc:2910874903 cname:c4z7W1UZ82R5OO6x
a=ssrc:2497505309 cname:c4z7W1UZ82R5OO6x

@djee-ms
Copy link
Member

djee-ms commented Mar 19, 2020

The answer also indicates (a=sendrecv) that the Unity editor also accepts to send and receive. So both sides should send and receive audio and video.

I assume your laptop is running a Standalone build of Unity for Desktop platform? In any case it seems the two machines can communicate and establish a WebRTC connection, and both agree to send and receive audio and video. If you receive audio/video on one side, then it's probably not a network issue. And the codecs in the offer and the answer are both OPUS, which is supported. So if the laptop doesn't get the RemoteAudioSource.TrackAdded callback then I am running out of idea.

Can you please check that the microphone is actually working, and is not disabled in Windows? Can you reproduce the issue if you invert the devices, and run the Unity editor on the laptop and the Standalone build on the other machine?

@Silloty1
Copy link
Author

I assume your laptop is running a Standalone build of Unity for Desktop platform?

Yeah it does
Microphone is working fine, I'm using discord on the computer where Unity is. For the test, I'm removing all the sources what are using the microphone.
About reproducing the issue, I can try to reproduce it. I'll tell you the result. Shoud I copy and paste all the previous test also ?

Thanks a lot for your help

@djee-ms
Copy link
Member

djee-ms commented Mar 19, 2020

I don't think the SDP messages are necessary if the issue is reproduced when swapping the devices, it means there's likely an error or bug in the code.

@Silloty1
Copy link
Author

Hi

After installing Unity to two other computers, I made the test again and this time it's working !
I don't know what is wrong with my original computer, but I'm glad it's finally working correctly.
Any hint about how can I deploy this on a HoloLens ? :)

Thanks a lot for your help !

@djee-ms
Copy link
Member

djee-ms commented Mar 20, 2020

Does the computer where it is not working have some special audio device, like an Azure Kinect DK (7 microphones)? If so then there's a bug where non-recognized audio devices on a computer actually make the entire audio module fail. This is a bug in the underlying Google implementation, see #140. This happens in particular if any device with either 3 or more than 5 audio channels is plugged in. The Google implementation only supports mono (1), stereo (2), or quadraphonic (4) audio channels (and the latter is only partially supported, falls back on stereo).

What is the issue with deploying on HoloLens? You should be able easily by making a Unity build for UWP x86.

@Silloty1
Copy link
Author

The issue with the HoloLens is that the app is instantly crashing, I don't know why :/

@djee-ms
Copy link
Member

djee-ms commented Mar 20, 2020

Are you using IL2CPP or the .NET backend? We don't support the .NET backend, only IL2CPP. If you're using IL2CPP you should have a Visual Studio solution and some generated C++ code, so you should hopefully see in the Output window some error or why it crashes.

@djee-ms
Copy link
Member

djee-ms commented Mar 23, 2020

Ping @fibann for question 2. at the very top of the thread, that sounds (no pun intended) like what you described today no?

@fibann
Copy link
Member

fibann commented Mar 24, 2020

It doesn't seem to completely match - in my case the remote audio callbacks were called, but the frame contents were all 0s.

@djee-ms
Copy link
Member

djee-ms commented Jul 29, 2020

Ping @Silloty1 is there still an issue deploying to HoloLens, and if so we need more information about it to help diagnose why it's crashing. Please check also that if Unity didn't set that up correctly you have the "Internet (Client)", "Microphone", and "Webcam" permissions in your AppXManifest.xml for the UWP project that Unity generates; otherwise it will not have access to the microphone and webcam, and this will crash at startup due to the microphone being always accessed (this is a Google limitation).

@fibann fibann added the need info More information is needed from the author to answer label Aug 13, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
need info More information is needed from the author to answer
Projects
None yet
Development

No branches or pull requests

4 participants