RidgeRun / gst-interpipe

GStreamer plug-in for interpipeline communication
Other
140 stars 63 forks source link

Stale frame when pipeline with intersink resurrects #148

Open ylchan87 opened 1 year ago

ylchan87 commented 1 year ago

Platform: Jetson Orin, Jetpack 5.1 gstinterpipe ver: 1.1.8

I have 2 pipelines in the same process:

Producer:

videotestsrc pattern=ball ! video/x-raw,format=YUY2,width=640,height=480,framerate=30/1
! nvvidconv ! video/x-raw(memory:NVMM),format=NV12
! interpipesink name=mysink

Consumer

interpipesrc name=mysrc listen-to=mysink stream-sync=0
! nvv4l2h264enc profile=0 maxperf-enable=1 insert-sps-pps=1 insert-vui=1 insert-aud=1 idrinterval=16
! h264parse
! rtph264pay ! udpsink host=10.42.0.1 port=5000 sync=false

I find that when I stop then restart the producer pipeline a few times, the consumer will see stale frame. i.e. For every n frame, one of them was the last frame made by the producer at its "previous life"

Further restart the producer a few more times, and video freeze.

Any idea if this is bug or issues with my pipeline?

clogwog commented 1 year ago

i do not have the answer to your question, but does it get better if you add a stream-sync=restart-ts parameter to your interpipesrc ?

ylchan87 commented 1 year ago

Thanks, tried stream-sync=0 i.e. (restart-ts) but did not help.

Also I notice when switched to shmsrc shmsink, the same problem still persist.

Not sure if gst-interpipe uses shm under the hood, or maybe there's discontinuity in timestamp that could mess up h264?