WebRTCBin: weird delay before stream starts

Florian Echtler floe at butterbrot.org
Wed Mar 23 21:30:00 UTC 2022


Hi Nirbheek, thanks for the quick response!

On 23/03/2022 20:11, Nirbheek Chauhan wrote:
 > On Wed, Mar 23, 2022 at 10:30 PM Florian Echtler via gstreamer-devel
 > <gstreamer-devel at lists.freedesktop.org> wrote:
 >> My issue now is that the _second_ video stream on the client takes a very
 >> long time to start, often on the order of 30-60 seconds. Once it has finally
 >> started, it's in sync with audio and the first video stream.
 >
 > It's possible that the client is waiting for either SPS/PPS, or a
 > key-frame, or both. I recommend checking the following:
 >
 > 1. Do you have config-interval=-1 on rtph264pay on all clients?
 > 2. What is the keyframe interval configured on your encoder(s)?

The encoding sub-pipeline for both server and clients looks like this:

VENCODER="queue max-size-buffers=1 ! x264enc bitrate=1500 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 ! 
application/x-rtp,media=video,encoding-name=H264,payload=%d"

So the keyframe interval should be 15 frames, i.e. one second (all streams are 
15 FPS at the moment), but the config-interval is equal to the IDR interval, and 
I don't actually know what that would be in this case.

Therefore, I've tried to just set the config interval to 1 (1 second) right now, 
and that seems to have made quite a difference - thank you!

One partly-related follow-up question: I've originally taken the pipeline 
description from a bit of webrtc-bin example C code, but I've never fully 
understood the reason for having two queues with exactly these max-size 
parameters. Could you (or anyone else) fill in a bit of detail here?

Thanks again and best regards, Florian
-- 
SENT FROM MY DEC VT50 TERMINAL
-------------- next part --------------
A non-text attachment was scrubbed...
Name: OpenPGP_signature
Type: application/pgp-signature
Size: 203 bytes
Desc: OpenPGP digital signature
URL: <https://lists.freedesktop.org/archives/gstreamer-devel/attachments/20220323/edf714a8/attachment.sig>


More information about the gstreamer-devel mailing list