<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
</head>
<body>
<p>Hi<br>
</p>
<p>You can try installing a buffer probe on the queue and checking
the levels to figure out what is going on.<br>
And listening to the overrun signal.<br>
</p>
<p>You might also try taking a look at the `<span style="color: rgb(35, 38, 41); font-family: ui-monospace, "Cascadia Mono", "Segoe UI Mono", "Liberation Mono", Menlo, Monaco, Consolas, monospace; font-size: 13px; font-style: normal; font-variant-ligatures: normal; font-variant-caps: normal; font-weight: 400; letter-spacing: normal; orphans: 2; text-align: left; text-indent: 0px; text-transform: none; white-space: pre-wrap; widows: 2; word-spacing: 0px; -webkit-text-stroke-width: 0px; background-color: rgb(227, 230, 232); text-decoration-thickness: initial; text-decoration-style: initial; text-decoration-color: initial; display: inline !important; float: none;">min-threshold-</span>`
properties.<br>
</p>
<p>Best regards<br>
</p>
<p></p>
<p>Marianna<br>
</p>
<div class="moz-cite-prefix">On 22.01.2023 13.00,
<a class="moz-txt-link-abbreviated" href="mailto:gstreamer-devel-request@lists.freedesktop.org">gstreamer-devel-request@lists.freedesktop.org</a> wrote:<br>
</div>
<blockquote type="cite"
cite="mid:mailman.17.1674388802.5036.gstreamer-devel@lists.freedesktop.org">
<pre class="moz-quote-pre" wrap="">Send gstreamer-devel mailing list submissions to
<a class="moz-txt-link-abbreviated" href="mailto:gstreamer-devel@lists.freedesktop.org">gstreamer-devel@lists.freedesktop.org</a>
To subscribe or unsubscribe via the World Wide Web, visit
<a class="moz-txt-link-freetext" href="https://lists.freedesktop.org/mailman/listinfo/gstreamer-devel">https://lists.freedesktop.org/mailman/listinfo/gstreamer-devel</a>
or, via email, send a message with subject or body 'help' to
<a class="moz-txt-link-abbreviated" href="mailto:gstreamer-devel-request@lists.freedesktop.org">gstreamer-devel-request@lists.freedesktop.org</a>
You can reach the person managing the list at
<a class="moz-txt-link-abbreviated" href="mailto:gstreamer-devel-owner@lists.freedesktop.org">gstreamer-devel-owner@lists.freedesktop.org</a>
When replying, please edit your Subject line so it is more specific
than "Re: Contents of gstreamer-devel digest..."
Today's Topics:
1. Dynamic pipeline: record frames before mux/filesink is linked
(Sylvain Garrigues)
----------------------------------------------------------------------
Message: 1
Date: Sat, 21 Jan 2023 19:16:16 +0100
From: Sylvain Garrigues <a class="moz-txt-link-rfc2396E" href="mailto:sylgar@gmail.com"><sylgar@gmail.com></a>
To: <a class="moz-txt-link-abbreviated" href="mailto:gstreamer-devel@lists.freedesktop.org">gstreamer-devel@lists.freedesktop.org</a>
Subject: Dynamic pipeline: record frames before mux/filesink is linked
Message-ID: <a class="moz-txt-link-rfc2396E" href="mailto:3196DBB7-8007-4825-BD43-AA70AF1213FD@gmail.com"><3196DBB7-8007-4825-BD43-AA70AF1213FD@gmail.com></a>
Content-Type: text/plain; charset=utf-8
Hello,
I?m trying to setup a pipeline which can record parts of the currently displayed stream on demand (I have a ctrl-c handler installed which start/stop the recording), INCLUDING 5 seconds before the signal is emitted. It works perfectly except the recording doesn?t start 5 seconds before the signal but 2/3 seconds after.
I have this pipeline:
filesrc location="longvideo.mp4" -> qtdemux -> tee -> queue -> h264parse -> ? -> autovideosink
On the other branch of the tee i.e. the recording one I have: tee -> queue (named queue_recording)
I have set the recording queue to act like a 10 seconds ring buffer:
queue_recording.set_property_from_str("max-size-time", "10000000000");
queue_recording.set_property_from_str("max-size-buffers", "0");
queue_recording.set_property_from_str("max-size-bytes", "0");
queue_recording.set_property_from_str("leaky", "2");
(This is Rust code).
I have the pipeline playing and start watching the video.
When I hit ctrl-C and my program detects it, it add matroskamux -> filesink location="record.mkv" to the pipeline and link the video_0 sink pad of the matroskamux to queue_recording which was already there.
Since I hit ctrl-c more than 10 seconds after the video is playing, I expected the resulting record.mpv to display frames from 10 seconds before the crtl-c signal since the queue_recording has stored those frame on the sink side and there was no consumer on the src side before the matrosmamux was linked.
Can anybody explain me why I don?t get what I expect (the recording starting 10 seconds before the signal), and how you would solve my problem?
I already manage, when hitting ctrl-c another time to stop the recording, to block the src_1 pad of the tee win a probe and send an EOS to the queue and unlink it, and when the pipeline bus gets the eos message from filesink (via message forward), I can remove the queue / matroskamux / filesink pair - just waiting for another signal to start another recording. I can share the source code if needed.
Best
------------------------------
Subject: Digest Footer
_______________________________________________
gstreamer-devel mailing list
<a class="moz-txt-link-abbreviated" href="mailto:gstreamer-devel@lists.freedesktop.org">gstreamer-devel@lists.freedesktop.org</a>
<a class="moz-txt-link-freetext" href="https://lists.freedesktop.org/mailman/listinfo/gstreamer-devel">https://lists.freedesktop.org/mailman/listinfo/gstreamer-devel</a>
------------------------------
End of gstreamer-devel Digest, Vol 144, Issue 28
************************************************
</pre>
</blockquote>
<pre class="moz-signature" cols="72">--
Best regards / Med venlig hilsen
“Marianna Smidth Buschle”</pre>
</body>
</html>