I have a pipeline like this:
intervideosrc ! videorate ! videoscale ! capsfilter caps="..." ! videoconvert ! x264enc ! rtph264pay ! udpsink
How can I correctly change the resolution within the capsfilter so that my pipeline doesn’t stall or stop working?
I set a blocking probe on the capsfilter’s src pad, created new caps, and set the property caps=newCaps. However, in Wireshark I can see that packet transmission stops after this step.
After some time (e.g., 20 seconds), the pipeline continues running again.
Try running `intervideosrc ! videorate ! videoscale !
capsfilter name=cf caps=“video/x-raw,width=W,height=H,framerate=30/1” !
videoconvert !
x264enc name=enc tune=zerolatency speed-preset=ultrafast
key-int-max=30 bframes=0 rc-lookahead=0 byte-stream=true !
rtph264pay name=pay config-interval=1 pt=96 !
udpsink host=… port=… sync=false`.
I think the issue is that your BLOCK probe only stops new buffers from entering the capsfilter — it doesn’t drain the ~1.3s of frames already sitting in x264enc’s lookahead queue,
and once the caps change hits, x264enc has to tear down and reopen the encoder (libx264 can’t change resolution live), then sit silent until its next natural keyframe, which at the
default key-int-max=250 is up to 8s away — that’s where your 20s stall comes from.