dynamic file sink adding/removing to Tee

Michael Gruner michael.gruner at ridgerun.com
Fri Apr 9 19:06:52 UTC 2021


Hi

Some observations:

1. Out of curiosity, I tested your code and it does produce files with data in them (~53MB each).

2. I don’t see any MP4 container in your code, so even though the files are suffixed with .mp4, this is actually raw data. I.e: if I attempt to read the file manually I actually see a valid image:

gst-launch-1.0 filesrc location= PATH3.mp4 ! videoparse width=320 height=240 format=ayuv64 ! videoconvert ! autovideosink

The format in your setup will likely be different. I assume the code missing the container is because of the simplification you did of your original code.

3.  MP4 files __need__ to receive an EOS event in order for them to be playable. In your code, you may send the EOS event in the unlink_cb and wait for it to be received on the bus, before tearing everything down. A simpler alternative is to use another container which doesn’t need the EOS, like Transport Stream (mpegtsmux).

Hope this helps,

Michael
www.ridgerun.com

> On 9 Apr 2021, at 09:31, stanisbouts <stan at scentronix.com> wrote:
> 
> Hi,
> 
> I have multiple rtsp sources that are connected to a input-selector object
> with a 'on_pad_added' callback function. This input-selector is connected
> with a Tee object. This Tee object is connected to a rtmp output that
> streams to twitch.
> 
> What i am trying to do is add and remove file sinks to this Tee object
> dynamically. I have the removing of the file sink working but when i add a
> new file sink to the already running pipeline there is no usable data sent
> to the file sink. The file is made and there is data written to the file but
> it is not readable.
> 
> only when the file sink is connected before the 'on_pad_added' callback
> function the mp4 is readable.
> 
> I have simplified the code that i no longer have dynamic input streams and
> only one static videotestsrc. But i still get the same problem.
> 
> simplified example code: 
> https://gist.github.com/Stanisbouts1/cf8fb4e4f3ee44eb407f767c4b73d7c9
> <https://gist.github.com/Stanisbouts1/cf8fb4e4f3ee44eb407f767c4b73d7c9>  
> 
> 
> 
> 
> --
> Sent from: http://gstreamer-devel.966125.n4.nabble.com/
> _______________________________________________
> gstreamer-devel mailing list
> gstreamer-devel at lists.freedesktop.org
> https://lists.freedesktop.org/mailman/listinfo/gstreamer-devel

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.freedesktop.org/archives/gstreamer-devel/attachments/20210409/88a8f508/attachment-0001.htm>


More information about the gstreamer-devel mailing list