Save H.264 stream file divided by time

I’m writing a program records h.264 stream with GStreamer.
I would like to save stream divided by times.
I mean that
file1.h264 //record from 00:00 to 00:59
file2.h264 //record from 01:00 to 01:59

The best solution is saving with container.

Anyone has any idea?

you may like to check
https://devtalk.nvidia.com/default/topic/1026583/jetson-tx1/saving-camera-stream-to-multiple-files-using-gstreamer-without-frameloss/
I used https://devtalk.nvidia.com/default/topic/1026583/jetson-tx1/saving-camera-stream-to-multiple-files-using-gstreamer-without-frameloss/post/5343758/#5343758

Thank you, Andrey1984.

I had tried ‘splitmuxsink’ and succeeded.
Do you know the way to save raw stream data ?
I mean, the way to save h.264 stream data with splitting, not use mux.

Hi,
You may try mutlifilesink.
https://gstreamer.freedesktop.org/data/doc/gstreamer/head/gst-plugins-good/html/gst-plugins-good-plugins-multifilesink.html

Thank you, DaneLLL.

I tried splitmuxsink and multifilesink.
Finally, I decided to use splitmuxsink this time.