meetecho / janus-gateway

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

Streaming VP8 example not working on Chrome on Android #1843

Closed rbaumi closed 4 years ago

rbaumi commented 4 years ago

I have installed janus gateway with the streaming plugin on the server and I wanted to test the demo. I generate a stream using gstreamer pipeline from https://github.com/meetecho/janus-gateway/blob/master/plugins/streams/test_gstreamer_1.sh:

#!/bin/sh
gst-launch-1.0 \
  audiotestsrc ! \
    audioresample ! audio/x-raw,channels=1,rate=16000 ! \
    opusenc bitrate=20000 ! \
      rtpopuspay ! udpsink host=127.0.0.1 port=5002 \
  videotestsrc ! \
    video/x-raw,width=320,height=240,framerate=15/1 ! \
    videoscale ! videorate ! videoconvert ! timeoverlay ! \
    vp8enc error-resilient=1 ! \
      rtpvp8pay ! udpsink host=127.0.0.1 port=5004

I'm using default config from demo:

gstreamer-sample: {
        type = "rtp"
        id = 1
        description = "Opus/VP8 live stream coming from gstreamer"
        audio = true
        video = true
        audioport = 5002
        audiopt = 111
        audiortpmap = "opus/48000/2"
        videoport = 5004
        videopt = 100
        videortpmap = "VP8/90000"
        secret = "adminpwd"
}

When I try to play it using demo site on desktop on chrome it works fine, but trying to play if from Chrome browser on Android device I get an error Failed to execute 'addIceCandidate' on 'RTCPeerConnection': Candidate missing values for both sdpMid and sdpMLineIndex. Whole console logs:

Streaming Opus/VP8 live stream coming from gstreamer demo from the official website works properly both on desktop and Android Chrome. Can anyone provide proper gstreamer pipeline that works fine with janus-gatway vp8 streaming?

lminiero commented 4 years ago

The exception is related to candidates (missing properties) and has nothing to do with the Streaming plugin. Pretty sure you're using an outdated version of janus or janus.js, so you may want to update both. Closing as not an issue.

rbaumi commented 4 years ago

Updated everything to newest version:

Janus commit: 15a629a804bcb4a32c35a322ae0d2a56ccc6f7d8
Compiled on:  Tue Oct 29 11:11:04 CET 2019

janus 0.7.6

client libs are also in the newest version. Now no errors on the client side, but on the server I get:

Creating new session: 1584199076261810; 0x7f99b00010c0
Creating new handle in session 1584199076261810: 7991232312258801; 0x7f99b00010c0 0x7f99b0001670
[7991232312258801] Creating ICE agent (ICE Full mode, controlling)
[WARN] [7991232312258801] ICE failed for component 1 in stream 1, but let's give it some time... (trickle received, answer received, alert not set)
[ERR] [ice.c:janus_ice_check_failed:1692] [7991232312258801] ICE failed for component 1 in stream 1...
[janus.plugin.streaming-0x7f99b0001510] No WebRTC media anymore
[7991232312258801] WebRTC resources freed; 0x7f99b0001670 0x7f99b00010c0

Any clue?