pion / example-webrtc-applications

Examples of WebRTC applications that are large, or use 3rd party libraries
https://pion.ly/
MIT License
1.08k stars 253 forks source link

Gstreamer-send has higher latency than rtp-to-webrtc #273

Open ZeoWorks opened 3 weeks ago

ZeoWorks commented 3 weeks ago

Well, it's as the title says. It appears gstreamer-send pipe is much slower than rtp-to-webrtc in regards to latency.

rtp-to-webrtc does its best to play video stream as fast as possible, whereas gstreamer-send stutters, buffers and has much higher latency.

Example rtc-to-webrtc command used; "gst-launch-1.0 d3d11screencapturesrc ! videoconvert ! queue max-size-bytes=0 max-size-time=0 ! x264enc speed-preset=ultrafast tune=zerolatency bitrate=5000 ! video/x-h264, framerate=(fraction)60/1, stream-format=byte-stream ! rtph264pay mtu=1200 ! udpsink host=127.0.0.1 port=5004"

Example command for gstreamer-send; "d3d11screencapturesrc ! videoconvert ! queue max-size-bytes=0 max-size-time=0 ! x264enc speed-preset=ultrafast tune=zerolatency bitrate=5000 ! video/x-h264,framerate=(fraction)60/1,stream-format=byte-stream ! appsink name=appsink"