Video playback is jittery when using multiple nv3dsink instances in the same program/process

Video playback is jittery when using multiple nv3dsink instances in the same program/process.
For example, “gst-launch-1.0 videotestsrc pattern=ball ! ‘video/x-raw,width=1920,height=1080,framerate=30/1’ ! tee name=t ! queue ! nvvidconv ! nv3dsink t. ! queue ! nvvidconv ! nv3dsink”

If replace one or all nv3dsink with xvimagesink, video playback is very smooth.
For example, “gst-launch-1.0 videotestsrc pattern=ball ! ‘video/x-raw,width=1920,height=1080,framerate=30/1’ ! tee name=t ! queue ! nvvidconv ! nv3dsink t. ! queue ! xvimagesink”

The below program has two pipelines and one nv3dsink per pipeline, the video playback is jittery. If replace one nv3dsink with xvimagesink, the playback will be smooth again.

#!/usr/bin/python3
import sys
import gi
gi.require_version('Gst', '1.0')
from gi.repository import Gst, GObject

Gst.init(sys.argv)

a_pipeline = Gst.parse_launch('videotestsrc pattern=ball ! video/x-raw,width=1920,height=1080,framerate=30/1 '
#       '! xvimagesink'
       '! nvvidconv ! nv3dsink'
    )

b_pipeline = Gst.parse_launch('videotestsrc pattern=ball ! video/x-raw,width=1920,height=1080,framerate=30/1 '
#       '! xvimagesink'
       '! nvvidconv ! nv3dsink'
    )

a_pipeline.set_state(Gst.State.PLAYING)
b_pipeline.set_state(Gst.State.PLAYING)

loop = GObject.MainLoop()
try:
    loop.run()
except:
    print('Exitting...')
    b_pipeline.set_state(Gst.State.NULL)
    a_pipeline.set_state(Gst.State.NULL)
    loop.quit()

Hi,
The issue is known and we are checking internally. Suggest you use nvcompositor to composite sources into single video plane.

Related topics:
Multiple gstreamer pipelines slow down when in the same process
Multiple instances of NvEglRenderer

Thanks for confirming this issue.

Is it possible that https://forums.developer.nvidia.com/t/video-is-jittery-through-capture-encode-decode-render-in-the-same-gstreamer-pipeline/156849/14 has the same root cause with this issue?

Hi,

It does not look like the same. If you don’t have multiple nv3dsink in single pipeline, it should work fine. And we have tried setting ts-offset and it helps. Not sure why it does not take effect with your sensor.

Hi DaneLLL,

When will this issue be fixed?
nvcompositor is not applicable to us.
Our application will have multiple windows on multiple monitors.