summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSebastian Dröge <sebastian@centricular.com>2020-08-05 10:47:07 +0300
committerSebastian Dröge <sebastian@centricular.com>2020-08-05 10:47:55 +0300
commitbbed24d91975696316892e687fafe35119444d2b (patch)
tree3ceb3881037932b649e07ce60258ad79e6654062
parent6378337a0ee7a539220fa909c8af30b077e71f8f (diff)
webrtc: Change H264 examples to use aggregate-mode=zero-latency for best compatibility
The default changed back to none because it broke existing code. See https://gitlab.freedesktop.org/gstreamer/gst-plugins-good/-/issues/749 Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-examples/-/merge_requests/22>
-rw-r--r--webrtc/janus/janusvideoroom.py2
-rw-r--r--webrtc/janus/rust/src/janus.rs2
-rw-r--r--webrtc/sendonly/webrtc-unidirectional-h264.c2
3 files changed, 3 insertions, 3 deletions
diff --git a/webrtc/janus/janusvideoroom.py b/webrtc/janus/janusvideoroom.py
index 37a6824..1364864 100644
--- a/webrtc/janus/janusvideoroom.py
+++ b/webrtc/janus/janusvideoroom.py
@@ -78,7 +78,7 @@ from gi.repository import GstSdp
if DO_VP8:
( encoder, payloader, rtp_encoding) = ( "vp8enc target-bitrate=100000 overshoot=25 undershoot=100 deadline=33000 keyframe-max-dist=1", "rtpvp8pay picture-id-mode=2", "VP8" )
else:
- ( encoder, payloader, rtp_encoding) = ( "x264enc", "rtph264pay", "H264" )
+ ( encoder, payloader, rtp_encoding) = ( "x264enc", "rtph264pay aggregate-mode=zero-latency", "H264" )
PIPELINE_DESC = '''
webrtcbin name=sendrecv stun-server=stun://stun.l.google.com:19302
diff --git a/webrtc/janus/rust/src/janus.rs b/webrtc/janus/rust/src/janus.rs
index 2540f22..dfecc92 100644
--- a/webrtc/janus/rust/src/janus.rs
+++ b/webrtc/janus/rust/src/janus.rs
@@ -66,7 +66,7 @@ const VP8: VideoParameter = VideoParameter {
const H264: VideoParameter = VideoParameter {
encoder: "x264enc tune=zerolatency",
encoding_name: "H264",
- payloader: "rtph264pay",
+ payloader: "rtph264pay aggregate-mode=zero-latency",
};
impl std::str::FromStr for VideoParameter {
diff --git a/webrtc/sendonly/webrtc-unidirectional-h264.c b/webrtc/sendonly/webrtc-unidirectional-h264.c
index e297a53..4dba828 100644
--- a/webrtc/sendonly/webrtc-unidirectional-h264.c
+++ b/webrtc/sendonly/webrtc-unidirectional-h264.c
@@ -179,7 +179,7 @@ create_receiver_entry (SoupWebsocketConnection * connection)
gst_parse_launch ("webrtcbin name=webrtcbin stun-server=stun://"
STUN_SERVER " "
"v4l2src ! videorate ! video/x-raw,width=640,height=360,framerate=15/1 ! videoconvert ! queue max-size-buffers=1 ! x264enc bitrate=600 speed-preset=ultrafast tune=zerolatency key-int-max=15 ! video/x-h264,profile=constrained-baseline ! queue max-size-time=100000000 ! h264parse ! "
- "rtph264pay config-interval=-1 name=payloader ! "
+ "rtph264pay config-interval=-1 name=payloader aggregate-mode=zero-latency ! "
"application/x-rtp,media=video,encoding-name=H264,payload="
RTP_PAYLOAD_TYPE " ! webrtcbin. ", &error);
if (error != NULL) {