Streaming demo not worked when streaming both audio and video

Hi, I encountered some issues while trying the streamingtest.html demo page of the streaming plugin:

  • When audio=false, Firefox browser fails to play and displays “no videotransceiver with mid v”. Chrome and Edge can play successfully.

  • When audio=true, Firefox/Chrome/Edge all fail to play. In Janus logs, the following message is displayed:

(janus:3287717): libnice-stun-DEBUG: 13:56:07.049: STUN error message received (code: 401)
(janus:3287717): libnice-stun-DEBUG: 13:56:07.049: STUN demux: OK!
(janus:3287717): libnice-stun-DEBUG: 13:56:07.049: STUN unknown: 0 mandatory attribute(s)!
(janus:3287717): libnice-stun-DEBUG: 13:56:07.049: STUN error message received (code: 401)
(janus:3287717): libnice-DEBUG: 13:56:07.049: Agent 0x7f6b4400b000 : stun_bind_process/conncheck for 0x7f6b38009820: controlling,res=error,stun#=0.
(janus:3287717): libnice-DEBUG: 13:56:07.049: Agent 0x7f6b4400b000 : pair 0x7f6b38009820 state FAILED (candidate_check_pair_fail)
(janus:3287717): libnice-DEBUG: 13:56:07.050: agent_recv_message_unlocked: Valid STUN packet received.
(janus:3287717): libnice-DEBUG: 13:56:07.068: Agent 0x7f6b4400b000 : stream 1: timer tick #151: 0 frozen, 0 in-progress, 0 waiting, 0 succeeded, 0 discovered, 0 nominated, 0 waiting-for-nom, 0 valid.
(janus:3287717): libnice-DEBUG: 13:56:07.068: Agent 0x7f6b4400b000 : waiting 1000 msecs before checking for failed components.
Got an H264 NAL 5
[rtsp-test] Sending SPS/PPS (seq=3175, ts=1389600)
[ERR] [ice.c:janus_ice_check_failed:2066] [16579125475228] ICE failed for component 1 in stream 1…
[16579125475228] Hanging up PeerConnection because of a ICE failed

In previous test(failed), I capturing packets with Wireshark, the following content is observed(192.168.1.72 is my local computer which running browser, 192.168.1.117 is the machine that Janus gateway runs on):

No. Time Source src-port Destination dest-port Protocol Length Info
853 19.576571 192.168.1.72 49311 192.168.1.117 39551 STUN 138 Binding Request user: TuVy:Zggk
854 19.576608 192.168.1.72 49311 159.75.250.190 2001 STUN 62 Binding Request
859 19.577648 240e:3b3:30cf:3810:4c2f:e851:25ce:bbd1 49312 2402:4e00:101a:f801:0:9a5f:c749:1b8c 2001 STUN 82 Binding Request
903 19.581806 192.168.1.117 39551 192.168.1.72 49311 STUN 122 Binding Success Response XOR-MAPPED-ADDRESS: 192.168.1.72:49311 user: TuVy:Zggk
977 19.586826 159.75.250.190 2001 192.168.1.72 49311 STUN 174 Binding Success Response XOR-MAPPED-ADDRESS: ::ffff:113.89.233.58:49311 MAPPED-ADDRESS: ::ffff:113.89.233.58:49311 RESPONSE-ORIGIN: :::2001
979 19.587636 2402:4e00:101a:f801:0:9a5f:c749:1b8c 2001 240e:3b3:30cf:3810:4c2f:e851:25ce:bbd1 49312 STUN 194 Binding Success Response XOR-MAPPED-ADDRESS: 240e:3b0:302c:9cbc:b19b:5c46:8fe1:9828:49312 MAPPED-ADDRESS: 240e:3b0:302c:9cbc:b19b:5c46:8fe1:9828:49312 RESPONSE-ORIGIN: :::2001
1003 19.604195 192.168.1.117 39551 192.168.1.72 49311 STUN 134 Binding Request user: IF+5:TuVy
1007 19.604613 192.168.1.72 49311 192.168.1.117 39551 STUN 90 Binding Error Response error-code: 401 (Unauthenticated) Unauthorized
1017 19.631126 192.168.1.72 49311 192.168.1.117 39551 STUN 138 Binding Request user: TuVy:Zggk
1030 19.633219 192.168.1.117 39551 192.168.1.72 49311 STUN 122 Binding Success Response XOR-MAPPED-ADDRESS: 192.168.1.72:49311 user: TuVy:Zggk
1040 19.644204 192.168.1.117 39551 192.168.1.72 49311 STUN 134 Binding Request user: IF+5:TuVy
1044 19.644606 192.168.1.72 49311 192.168.1.117 39551 STUN 90 Binding Error Response error-code: 401 (Unauthenticated) Unauthorized
1057 19.693905 192.168.1.72 49311 192.168.1.117 39551 STUN 138 Binding Request user: TuVy:Zggk
1072 19.696122 192.168.1.117 39551 192.168.1.72 49311 STUN 122 Binding Success Response XOR-MAPPED-ADDRESS: 192.168.1.72:49311 user: TuVy:Zggk
1084 19.705606 192.168.1.117 39551 192.168.1.72 49311 STUN 134 Binding Request user: IF+5:TuVy
1088 19.706066 192.168.1.72 49311 192.168.1.117 39551 STUN 90 Binding Error Response error-code: 401 (Unauthenticated) Unauthorized

I noticed that the problem seems the browser return a 401 error in response to janus’s binding request, but what reason behind this? Hope to receive your assistance.

My configuration:

  • I am using ffmpeg for pushing the rtsp stream(audio: pcmu/8000/2, video: h264/90000).

  • Janus is installed on the local network at 192.168.1.117. One of the configuration items in janus.plugin.streaming.jcfg is as follows:

rtsp-test: {
  type = "rtsp"
  id = 99
  description = "RTSP Test"
  audio = true
  video = true
  url = "rtsp://192.168.1.117:8554/mystream"
}