Since file-loop is set to true, when file processing is completed, nvurisrcbin will process the GST_EVENT_EOS event to seek.
According to your description, I implemented a sample that can exit normally and ensure the integrity of mp4 files.
You can refer to it.
deepstream_test1_app_eos.c (11.7 KB)