compositor pipeline stalling pipeline at "Redistribute latency"
@florent.thiery
Submitted by Florent Thiery Link to original bug (#796927)
Description
I am facing an unclear stall of a pipeline involving a raw h264 file source, vaapi decoding and compositor. This affects 1.14.2 and master.
- generate a sample
gst-launch-1.0 videotestsrc num-buffers=30 ! "video/x-raw, format=(string)I420, width=(int)1920, height=(int)1080, framerate=(fraction)30/1" ! vaapih264enc bitrate=16000 keyframe-period=30 rate-control=2 aud=true ! "video/x-h264,profile=baseline" ! filesink location=/tmp/sample.h264
- launch this:
gst-launch-1.0 filesrc location=/tmp/sample.h264 ! h264parse ! vaapih264dec ! vaapipostproc ! queue ! vmix. compositor name=vmix ! "video/x-raw, format=(string)NV12, width=(int)3840, height=(int)2160, framerate=(fraction)30, colorimetry=(string)bt709" ! tee name=tvmix tvmix. ! queue name=qmain1080p ! videorate ! queue name=qscale1080p ! videoscale ! queue name=qcsp1080 ! videoconvert ! "video/x-raw, format=(string)NV12, width=(int)1920, height=(int)1080, framerate=(fraction)30, pixel-aspect-ratio=(fraction)1/1" ! fakesink tvmix. ! queue ! fakesink sync=False
Setting pipeline to PAUSED ...
Pipeline is PREROLLING ...
Got context from element 'vaapipostproc0': gst.gl.GLDisplay=context, gst.gl.GLDisplay=(GstGLDisplay)"(GstGLDisplayX11)\ gldisplayx11-0";
Got context from element 'vaapipostproc0': gst.vaapi.Display=context, gst.vaapi.Display=(GstVaapiDisplay)"(GstVaapiDisplayGLX)\ vaapidisplayglx0";
Redistribute latency...
Redistribute latency...
[STALLED]
I can work around it by:
- inserting identity or videorate right after vaapipostproc
- setting drop-only=true to videorate
- removing the trailing tvmix. ! queue ! fakesink sync=False
- replacing vaapih264dec and postproc by software components (like avdec_h264 or openh264dec)
The last items in the debug log are:
0:00:01.131839487 6613 0x5599f71268a0 DEBUG GST_PADS gstpad.c:4072:gst_pad_query:qmain1080p:sink sent query 0x7f0f84006de0 (allocation), result 1
0:00:01.131852946 6613 0x5599f71268a0 DEBUG tee gsttee.c:637:gst_tee_query_allocation:<tvmix>
Aggregating AllocationParams align=15 prefix=0 padding=0
0:00:01.131863008 6613 0x5599f71268a0 DEBUG tee gsttee.c:659:gst_tee_query_allocation:<tvmix>
Aggregating allocation pool size=12441600 min_buffers=1
0:00:01.131878205 6613 0x5599f71268a0 DEBUG tee gsttee.c:595:gst_tee_query_allocation:<tvmix>
Aggregating allocation from pad tvmix:src_1
0:00:01.131889278 6613 0x5599f71268a0 DEBUG query gstquery.c:678:gst_query_new_custom: creating new query 0x7f0f84006d40 allocation
0:00:01.131900974 6613 0x5599f71268a0 DEBUG GST_PADS gstpad.c:4049:gst_pad_query:queue4:sink doing query 0x7f0f84006d40 (allocation)
[STALLED]