From 3c0d582b7c0dc24544e81f9d3ab26e846cfe5e27 Mon Sep 17 00:00:00 2001 From: Nirbheek Chauhan Date: Tue, 15 Mar 2022 14:00:48 +0530 Subject: [PATCH] webrtc_sendrecv.py: Add picture-id-mode to rtpvp8pay This doesn't just make TWCC stats perform better, it also fixes stuttery video playback in Chrome. Part-of: --- subprojects/gst-examples/webrtc/sendrecv/gst/webrtc-sendrecv.c | 3 ++- .../gst-examples/webrtc/sendrecv/gst/webrtc_sendrecv.py | 2 +- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/subprojects/gst-examples/webrtc/sendrecv/gst/webrtc-sendrecv.c b/subprojects/gst-examples/webrtc/sendrecv/gst/webrtc-sendrecv.c index 98f21557eb..b51a345361 100644 --- a/subprojects/gst-examples/webrtc/sendrecv/gst/webrtc-sendrecv.c +++ b/subprojects/gst-examples/webrtc/sendrecv/gst/webrtc-sendrecv.c @@ -438,7 +438,8 @@ start_pipeline (gboolean create_offer) * fix corrupted video. */ "vp8enc deadline=1 keyframe-max-dist=2000 ! " - /* picture-id-mode=15-bit seems to make TWCC stats behave better */ + /* picture-id-mode=15-bit seems to make TWCC stats behave better, and + * fixes stuttery video playback in Chrome */ "rtpvp8pay name=videopay picture-id-mode=15-bit ! " "queue ! " RTP_CAPS_VP8 "96 ! sendrecv. " "audiotestsrc is-live=true wave=red-noise ! audioconvert ! audioresample ! queue ! opusenc ! rtpopuspay name=audiopay ! " diff --git a/subprojects/gst-examples/webrtc/sendrecv/gst/webrtc_sendrecv.py b/subprojects/gst-examples/webrtc/sendrecv/gst/webrtc_sendrecv.py index 7422fbcd51..b7c182f18c 100755 --- a/subprojects/gst-examples/webrtc/sendrecv/gst/webrtc_sendrecv.py +++ b/subprojects/gst-examples/webrtc/sendrecv/gst/webrtc_sendrecv.py @@ -34,7 +34,7 @@ except ImportError: PIPELINE_DESC = ''' webrtcbin name=sendrecv bundle-policy=max-bundle stun-server=stun://stun.l.google.com:19302 videotestsrc is-live=true pattern=ball ! videoconvert ! queue ! \ - vp8enc deadline=1 keyframe-max-dist=2000 ! rtpvp8pay ! + vp8enc deadline=1 keyframe-max-dist=2000 ! rtpvp8pay picture-id-mode=15-bit ! queue ! application/x-rtp,media=video,encoding-name=VP8,payload=97 ! sendrecv. audiotestsrc is-live=true wave=red-noise ! audioconvert ! audioresample ! queue ! opusenc ! rtpopuspay ! queue ! application/x-rtp,media=audio,encoding-name=OPUS,payload=96 ! sendrecv.