Always generate video segments from splitmuxsink

Matt Feury mattfeury at gmail.com
Tue Apr 18 13:44:56 UTC 2023


Checkout fallbacksrc / fallbackswitch
https://coaxion.net/blog/2020/07/automatic-retry-on-error-and-fallback-stream-handling-for-gstreamer-sources/

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.




On Tue, Apr 18, 2023, 9:40 AM Jonas Danielsson via gstreamer-devel <
gstreamer-devel at lists.freedesktop.org> wrote:

> Hello hackers!
>
> I have a challenge for you!
> I want to generate video segments from H264 that arrive over RTSP,
> sort of like this:
>
>     udpsrc ! rtpbin ! rtph264depay ! h264parse ! ...
>
> Say, I want 5 seconds segments.
> Easy you say! Just use splitmuxsink, something like:
>
>     udpsrc ! rtpbin ! rtph264depay ! h264parse ! splitmuxsink
> max-size-time=5000000000
>
> But, then I will add that I want to generate these MP4 segments even
> though the source of
> this RTP stream restarts, or goes offline, or in another way is flaky.
> I always want these segments.
>
> Is there some tricky way of doing this? Some special mp4 way to hook into?
> Some dark corner of the h264 spec? Some GStreamer specialité?
>
> So what do I expect to be in them when the source is gone? I am not sure
> ...
> The last frame might be ok, some kind filler frame? sure. Black? I'll take
> it.
>
> The important part here is I want to always have a N second segment
> with a known start-
> and stop time. That I can upload to its final destination. I am
> substituting a legacy system here so
> there are some constraints I need to honor.
>
> And ... I do not want to decode / encode the H264. This is 4k video
> and CPU time is money
> here.
>
> Do I have any options?
> Regards
> Jonas
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.freedesktop.org/archives/gstreamer-devel/attachments/20230418/6888aa00/attachment.htm>


More information about the gstreamer-devel mailing list