failover from sink errors

Yuri Fedoseev fedoseev.yuri at gmail.com
Tue Aug 9 11:20:43 UTC 2022


Hi,
I had the pipeline for capturing video from my camera.
`v4l2src! <some processing> ! appsink`
My goal is to extend the pipeline for adding streaming to a rtmp server.
something like this:
`
v4l2src ! tee name=mux ! queue ! <some processing> ! appsink
.mux ! queue ! flvmux ! rtmp2sink location="$RTMP_SERVER"
`
I run gstreamer from go application, appsink process data in golang.
Everything works well until an error happens in rtmp2sink which breaks the
whole pipeline.
What is the best approach to failover this error without stopping the whole
pipeline and reconnect after some timeout?
I'm quite new with gstreamer so I've spent the previous week struggling
with it, trying to find an optimal solution.
I've tried:
1.multiple pipelines with appsink->appsrc.
`
v4l2src ! tee name=mux ! queue ! <some processing> ! appsink
.mux ! queue ! flvmux ! queue ! appsink

appsrc ! rtmp2sink location="$RTMP_SERVER"
`
 The second pipeline failed to work after restarting from error. Seems like
appsrc failed to push buffers further after restart.

2. using gstproxy plugin. Failed to restart correctly - I believe there is
a problem with gstproxy plugin

3. Handle everything within the same pipelines with probes. Didn't succeed
a lot.

I'm a little bit lost in which direction now should I dig for implementing
necessary behavior.
I would appreciate any advice.

With regards

Yuri
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.freedesktop.org/archives/gstreamer-devel/attachments/20220809/0d622f84/attachment.htm>


More information about the gstreamer-devel mailing list