Hi,
For sending EoS, please refer to this sample:
Nvoverlaysink ignores properties when pipeline is restarted - #6 by DaneLLL
The code is
print("Send EoS")
Gst.Element.send_event(pipeline, Gst.Event.new_eos())
# wait until EOS or error
bus = pipeline.get_bus()
msg = bus.timed_pop_filtered(
Gst.CLOCK_TIME_NONE, Gst.MessageType.EOS)