amazon-kinesis-video-streams-producer-sdk-cpp icon indicating copy to clipboard operation
amazon-kinesis-video-streams-producer-sdk-cpp copied to clipboard

[QUESTION] kvssink is taking 2 minutes to shut down after EOS is sent to the Gstreamer pipeline

Open bkovacs-orca opened this issue 1 year ago • 2 comments

I have a Gstreamer pipeline that ends with kvssink, and sometimes it is taking 2 minutes to shut down after EOS is sent to the Gstreamer pipeline. In what situations is this possible? What can be the reason for this?

** Logging ** I don't have logs yet, because I don't have an easy way to reproduce this case, it happens sporadically.

** Any design considerations/constraints ** Using the following Gstreamer pipeline:

appsrc name=appsrcvideo block=false leaky-type=downstream max-bytes=5000000 ! h264parse name=parser ! kvssink name=kvssink stream-name=X storage-size=512 streaming-type=2 file-start-time=0 retention-period=1 access-key=X secret-key=X aws-region=us-west-2 stream-tags=X  appsrc name=appsrcaudio block=false leaky-type=downstream max-bytes=5000000 ! audio/mpeg,mpegversion=4,rate=(int)48000,channels=1,stream-format=(string)raw,codec_data=(buffer)1188 ! aacparse ! queue ! kvssink.

bkovacs-orca avatar Jul 29 '24 18:07 bkovacs-orca

Hi, can you please expand on how you are observing that an EOS is sent and what you consider as a kvssink shutdown?

stefankiesz avatar Jul 29 '24 19:07 stefankiesz

Hey Stefan,

Thanks for the reply. I send EOS with gst_element_send_event(pipeline, gst_event_new_eos());, so I know for a fact it's sent, I don't observe it any other way.

I consider the pipeline has shut down, including kvssink after the call below returns, but it's stuck here:

  gst_element_set_state(pipeline, GST_STATE_NULL);

bkovacs-orca avatar Jul 30 '24 10:07 bkovacs-orca

Following up on this. Do you need any more information to debug this? Thank you!

bkovacs-orca avatar Aug 07 '24 23:08 bkovacs-orca

Hey @bkovacs-orca, I'll be looking into this issue with dedicated time starting next week, apologies for the delay.

stefankiesz avatar Aug 08 '24 15:08 stefankiesz

@bkovacs-orca, it’s difficult to assess whether the shutdown delay originates from kvssink solely based on its presence in your pipeline. Could you please provide logs when they become available and, if possible, run some control experiments by replacing kvssink with other sink elements to see if the behavior persists?

stefankiesz avatar Aug 13 '24 03:08 stefankiesz

Closing due to staleness

niyatim23 avatar Sep 03 '24 15:09 niyatim23