<div dir="auto">Checkout fallbacksrc / fallbackswitch<div dir="auto"><a href="https://coaxion.net/blog/2020/07/automatic-retry-on-error-and-fallback-stream-handling-for-gstreamer-sources/">https://coaxion.net/blog/2020/07/automatic-retry-on-error-and-fallback-stream-handling-for-gstreamer-sources/</a><br></div><div dir="auto"><br></div><div dir="auto">haven't used it but been meaning to for similar purposes. you can provide a fallback image that it switches to when the live element stops.</div><div dir="auto"><br></div><div dir="auto"><br></div><div dir="auto"><br></div></div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Tue, Apr 18, 2023, 9:40 AM Jonas Danielsson via gstreamer-devel <<a href="mailto:gstreamer-devel@lists.freedesktop.org">gstreamer-devel@lists.freedesktop.org</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">Hello hackers!<br>
<br>
I have a challenge for you!<br>
I want to generate video segments from H264 that arrive over RTSP,<br>
sort of like this:<br>
<br>
    udpsrc ! rtpbin ! rtph264depay ! h264parse ! ...<br>
<br>
Say, I want 5 seconds segments.<br>
Easy you say! Just use splitmuxsink, something like:<br>
<br>
    udpsrc ! rtpbin ! rtph264depay ! h264parse ! splitmuxsink<br>
max-size-time=5000000000<br>
<br>
But, then I will add that I want to generate these MP4 segments even<br>
though the source of<br>
this RTP stream restarts, or goes offline, or in another way is flaky.<br>
I always want these segments.<br>
<br>
Is there some tricky way of doing this? Some special mp4 way to hook into?<br>
Some dark corner of the h264 spec? Some GStreamer specialité?<br>
<br>
So what do I expect to be in them when the source is gone? I am not sure ...<br>
The last frame might be ok, some kind filler frame? sure. Black? I'll take it.<br>
<br>
The important part here is I want to always have a N second segment<br>
with a known start-<br>
and stop time. That I can upload to its final destination. I am<br>
substituting a legacy system here so<br>
there are some constraints I need to honor.<br>
<br>
And ... I do not want to decode / encode the H264. This is 4k video<br>
and CPU time is money<br>
here.<br>
<br>
Do I have any options?<br>
Regards<br>
Jonas<br>
</blockquote></div>