Hi,
I have an app running the following GStreamer pipeline:
webrtcbin name=webrtcbin stun-server=stun://stun.l.google.com:19302
videotestsrc is-live=true ! videoconvert ! video/x-raw, format=NV12 !
videorate ! video/x-raw, framerate=25/1 !
videoscale ! video/x-raw, width=800,height=480 !
queue !
x264enc bitrate=4000000 speed-preset=ultrafast tune=zerolatency key-int-max=15 !
video/x-h264,profile=constrained-baseline ! queue max-size-time=100000000 !
h264parse !
video/x-h264, stream-format=byte-stream, alignment=nal !
rtph264pay config-interval=-1 aggregate-mode=zero-latency !
application/x-rtp,media=video,encoding-name=H264,clock-rate=90000,payload=96 !
webrtcbin.
On the other side I have a KMS instance and an application server running the one2many-call tutorial (java version). Both are running on the same machine.
If I run my app on the same machine as the server (Linux Desktop) everything works fine.
However I'm getting some odd behavior when I run the app on an Android (7.1) device connected to the same local network as the server:
If the Android device is connected to the LAN through Wi-Fi, then the session starts but I get no video on the web clients. KMS logs complain about invalid packets:
Connecting to an external server deployed on a cloud provider results in the same behavior.
However, if the Android device is directly connected to the server through USB using the USB Tethering function from Android, everything works well.
I generated DOT diagrams of the good and bad case pipelines but couldn't spot any differences.
A quick Wireshark inspection revealed two things:
- For some reason, ICE chooses TCP over UDP
- The size of the packets out of the Android device greatly differs in both cases, While in the USB tethering mode, the TCP payloads never exceed 1478 bytes
, but via WLAN the packet size can get up to 19 KB
Here's the SDP and ICE data exchanged between both Android device and server in both cases:
USB Tethering (everything works):
Both Android and Server via local WLAN (no video on viewers):
I've been struggling with this for quite some time now, so any help would be greatly appreciated!
Thanks!