<html xmlns:v="urn:schemas-microsoft-com:vml" xmlns:o="urn:schemas-microsoft-com:office:office" xmlns:w="urn:schemas-microsoft-com:office:word" xmlns:m="http://schemas.microsoft.com/office/2004/12/omml" xmlns="http://www.w3.org/TR/REC-html40">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<meta name="Generator" content="Microsoft Word 15 (filtered medium)">
<style><!--
/* Font Definitions */
@font-face
{font-family:Helvetica;
panose-1:2 11 6 4 2 2 2 2 2 4;}
@font-face
{font-family:"Cambria Math";
panose-1:2 4 5 3 5 4 6 3 2 4;}
@font-face
{font-family:Calibri;
panose-1:2 15 5 2 2 2 4 3 2 4;}
/* Style Definitions */
p.MsoNormal, li.MsoNormal, div.MsoNormal
{margin:0cm;
margin-bottom:.0001pt;
font-size:11.0pt;
font-family:"Calibri",sans-serif;}
a:link, span.MsoHyperlink
{mso-style-priority:99;
color:blue;
text-decoration:underline;}
span.E-MailFormatvorlage18
{mso-style-type:personal-reply;
font-family:"Arial",sans-serif;
color:windowtext;}
.MsoChpDefault
{mso-style-type:export-only;
font-size:10.0pt;
font-family:"Calibri",sans-serif;
mso-fareast-language:EN-US;}
@page WordSection1
{size:612.0pt 792.0pt;
margin:70.85pt 70.85pt 2.0cm 70.85pt;}
div.WordSection1
{page:WordSection1;}
--></style><!--[if gte mso 9]><xml>
<o:shapedefaults v:ext="edit" spidmax="1026" />
</xml><![endif]--><!--[if gte mso 9]><xml>
<o:shapelayout v:ext="edit">
<o:idmap v:ext="edit" data="1" />
</o:shapelayout></xml><![endif]-->
</head>
<body lang="DE" link="blue" vlink="purple">
<div class="WordSection1">
<p class="MsoNormal"><span lang="EN-US" style="font-size:10.0pt;font-family:"Arial",sans-serif;mso-fareast-language:EN-US">Hi,<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US" style="font-size:10.0pt;font-family:"Arial",sans-serif;mso-fareast-language:EN-US">You could use an outputselector which has a pad to a filesink and a pad to a fakesink.<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US" style="font-size:10.0pt;font-family:"Arial",sans-serif;mso-fareast-language:EN-US">Gruesse<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US" style="mso-fareast-language:EN-US"><o:p> </o:p></span></p>
<p class="MsoNormal"><b>Von:</b> gstreamer-devel <gstreamer-devel-bounces@lists.freedesktop.org>
<b>Im Auftrag von </b>Nicolas Dufresne<br>
<b>Gesendet:</b> Mittwoch, 2. <span lang="EN-US">Dezember 2020 01:05<br>
<b>An:</b> Discussion of the development of and with GStreamer <gstreamer-devel@lists.freedesktop.org><br>
<b>Betreff:</b> Re: GStreamer multi pipeline time sync<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US"><o:p> </o:p></span></p>
<div>
<div>
<p class="MsoNormal" style="margin-bottom:12.0pt"><span lang="EN-US"><o:p> </o:p></span></p>
<div>
<div>
<p class="MsoNormal"><span lang="EN-US">Le mar. 1 déc. 2020 16 h 45, Peter Biro <</span><a href="mailto:pettair@gmail.com"><span lang="EN-US">pettair@gmail.com</span></a><span lang="EN-US">> a écrit :<o:p></o:p></span></p>
</div>
<blockquote style="border:none;border-left:solid #CCCCCC 1.0pt;padding:0cm 0cm 0cm 6.0pt;margin-left:4.8pt;margin-top:5.0pt;margin-right:0cm;margin-bottom:5.0pt">
<div>
<p class="MsoNormal"><span lang="EN-US">Thanks! That can work!<o:p></o:p></span></p>
<div>
<p class="MsoNormal"><span lang="EN-US"><o:p> </o:p></span></p>
</div>
<div>
<p class="MsoNormal"><span lang="EN-US"> Is there a way how I can 'send silence' from an audio source (or anything in the middle)?<o:p></o:p></span></p>
</div>
</div>
</blockquote>
</div>
</div>
<div>
<p class="MsoNormal"><span lang="EN-US"><o:p> </o:p></span></p>
</div>
<div>
<p class="MsoNormal"><span lang="EN-US">audiotestsrc wave=silence ! ...<o:p></o:p></span></p>
</div>
<div>
<p class="MsoNormal"><span lang="EN-US">... ! volume volume=0.0 ! ...<o:p></o:p></span></p>
</div>
<div>
<p class="MsoNormal"><span lang="EN-US"><o:p> </o:p></span></p>
</div>
<div>
<div>
<blockquote style="border:none;border-left:solid #CCCCCC 1.0pt;padding:0cm 0cm 0cm 6.0pt;margin-left:4.8pt;margin-top:5.0pt;margin-right:0cm;margin-bottom:5.0pt">
<div>
<div>
<p class="MsoNormal"><span lang="EN-US"><o:p> </o:p></span></p>
<div>
<p class="MsoNormal"><span lang="EN-US">Currently this is my audio pipeline:<o:p></o:p></span></p>
</div>
<div>
<p class="MsoNormal"><span lang="EN-US">alsasrc ! queue ! audioconvert ! appsink name=app_sink<o:p></o:p></span></p>
</div>
<div>
<p class="MsoNormal"><span lang="EN-US"><o:p> </o:p></span></p>
</div>
<div>
<p class="MsoNormal"><span lang="EN-US">Also I tried to play around with the 'max-size-time' property on a queue, but I cut that solution since I had issues with disabling only the filesink output. The way I tried it is to redirect the filesink output to the
/dev/null and reconfigure it to a proper place when a recording event arrives but for that I had to set the file sink state to GST_STATE_NULL (or GST_STATE_READY it was a while ago) which caused issues with the other parts of he pipeline. But it would be great
if this part could also be covered by plain pipeline on the gst side.<o:p></o:p></span></p>
</div>
<div>
<div>
<p class="MsoNormal"><span lang="EN-US"><br>
<br>
<o:p></o:p></span></p>
<blockquote style="margin-top:5.0pt;margin-bottom:5.0pt">
<div>
<p class="MsoNormal"><span lang="EN-US">On 2020. Dec 1., at 11:38, Thornton, Keith <</span><a href="mailto:keith.thornton@zeiss.com" target="_blank"><span lang="EN-US">keith.thornton@zeiss.com</span></a><span lang="EN-US">> wrote:<o:p></o:p></span></p>
</div>
<p class="MsoNormal"><span lang="EN-US"><o:p> </o:p></span></p>
<div>
<div>
<div>
<p class="MsoNormal"><span lang="EN-US" style="font-size:10.0pt;font-family:"Arial",sans-serif">Hi,</span><span lang="EN-US"><o:p></o:p></span></p>
</div>
<div>
<p class="MsoNormal"><span lang="EN-US" style="font-size:10.0pt;font-family:"Arial",sans-serif">the buffering can be done with a standard gstreamer queue by dynamically manipulating the threshold and queue size parameters. Have you considered the possibility
of recording silence when no audio is present.</span><span lang="EN-US"><o:p></o:p></span></p>
</div>
<div>
<p class="MsoNormal"><span style="font-size:10.0pt;font-family:"Arial",sans-serif">Gruesse</span><o:p></o:p></p>
</div>
<div>
<p class="MsoNormal"> <o:p></o:p></p>
</div>
<div>
<p class="MsoNormal"><b>Von:</b> gstreamer-devel <<a href="mailto:gstreamer-devel-bounces@lists.freedesktop.org" target="_blank">gstreamer-devel-bounces@lists.freedesktop.org</a>> <b>Im Auftrag von </b>Peter Biro<br>
<b>Gesendet:</b> Dienstag, 1. <span lang="EN-US">Dezember 2020 10:21<br>
<b>An:</b> Discussion of the development of and with GStreamer <</span><a href="mailto:gstreamer-devel@lists.freedesktop.org" target="_blank"><span lang="EN-US">gstreamer-devel@lists.freedesktop.org</span></a><span lang="EN-US">><br>
<b>Betreff:</b> Re: GStreamer multi pipeline time sync<o:p></o:p></span></p>
</div>
<div>
<p class="MsoNormal"><span lang="EN-US"> <o:p></o:p></span></p>
</div>
<div>
<div>
<div>
<p class="MsoNormal"><span lang="EN-US">Sure, I can describe it more in detail.<o:p></o:p></span></p>
</div>
<div>
<div>
<p class="MsoNormal"><span lang="EN-US"> <o:p></o:p></span></p>
</div>
</div>
<div>
<div>
<p class="MsoNormal"><span lang="EN-US">You are right about that the streaming / displaying is mandatory and the recording is optional (it can be triggered).<o:p></o:p></span></p>
</div>
</div>
<div>
<div>
<p class="MsoNormal"><span lang="EN-US"> <o:p></o:p></span></p>
</div>
</div>
<div>
<div>
<p class="MsoNormal"><span lang="EN-US">Unfortunately the actual use case is a bit more complex: when the user hits record the recording also should include the video(and maybe audio too) for the previous 30 seconds(actual time is also configurable) as well.
So there should be a live stream and this 'buffered' recording. Also I cannot 'pre-mux' the audio with the video since audio is completely optional and it could be configured to be recorded only when the recording is started (so there would be video for like
30 seconds from the buffer and then audio would join in later). The hard requirement is this (to have X seconds of video before the user hits the record and optional audio attached to it) but I wanted to implement it in a general way so the other part of the
application should not be aware if the 'buffered' data is audio or video.<o:p></o:p></span></p>
</div>
</div>
<div>
<div>
<p class="MsoNormal"><span lang="EN-US"> <o:p></o:p></span></p>
</div>
</div>
<div>
<div>
<p class="MsoNormal"><span lang="EN-US">This is why I started with separate pipelines and transferring the data between them with appsinks and appsrcs, and do the buffering and other logic on the application side, I guess this is a naive way of implementing
it so if there is any suggestion it is more than welcomed :D<o:p></o:p></span></p>
</div>
</div>
<div>
<div>
<p class="MsoNormal"><span lang="EN-US"> <o:p></o:p></span></p>
</div>
</div>
<div>
<div>
<p class="MsoNormal"><span lang="EN-US">Thanks!<o:p></o:p></span></p>
</div>
</div>
<div>
<div>
<div>
<p class="MsoNormal" style="margin-bottom:12.0pt"><span lang="EN-US"><o:p> </o:p></span></p>
</div>
<blockquote style="margin-top:5.0pt;margin-bottom:5.0pt">
<div>
<div>
<p class="MsoNormal"><span lang="EN-US">On 2020. Dec 1., at 5:06, gotsring <</span><a href="mailto:gotsring@live.com" target="_blank"><span lang="EN-US">gotsring@live.com</span></a><span lang="EN-US">> wrote:<o:p></o:p></span></p>
</div>
</div>
<div>
<p class="MsoNormal"><span lang="EN-US"> <o:p></o:p></span></p>
</div>
<div>
<div>
<div>
<p class="MsoNormal"><span lang="EN-US">Can you describe what you are trying to achieve? It sounds like you want to<br>
grab video and audio (e.g. webcam and mic), combine/mux those streams, then<br>
be able to view the stream it and optionally record it. Something like:<br>
<br>
View/Record pipeline (gst-launch-1.0)<br>
videotestsrc ! timeoverlay ! tee name=videotee ! queue ! autovideosink \<br>
audiotestsrc wave=8 ! tee name=audiotee ! queue ! autoaudiosink \<br>
videotee. ! queue ! x264enc ! matroskamux name=muxer ! filesink<br>
location=save_location.mkv async=false \<br>
audiotee. ! queue ! muxer.<br>
<br>
<br>
Playback (just to test)<br>
gst-play-1.0 save_location.mkv<br>
<br>
This should probably not be used exactly, but that's the gist. You can just<br>
google how to mux streams using GStreamer. I also think that queue has a<br>
property that allows you to effectively add a delay to a stream<br>
(min-threshold-time), is this what you wanted?<br>
<br>
<br>
<br>
--<br>
Sent from: </span><a href="https://eur01.safelinks.protection.outlook.com/?url=http%3A%2F%2Fgstreamer-devel.966125.n4.nabble.com%2F&data=04%7C01%7C%7C7d2fc5cd6d09467871ed08d8965fbcdd%7C28042244bb514cd680347776fa3703e8%7C1%7C0%7C637424685218355018%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C1000&sdata=ioFjTLi1Ddq0JSzhq5Z1CRShYhwIPvmAQyX4yjbkz24%3D&reserved=0" target="_blank"><span lang="EN-US">http://gstreamer-devel.966125.n4.nabble.com/</span></a><span lang="EN-US"><br>
_______________________________________________<br>
gstreamer-devel mailing list<br>
</span><a href="mailto:gstreamer-devel@lists.freedesktop.org" target="_blank"><span lang="EN-US">gstreamer-devel@lists.freedesktop.org</span></a><span lang="EN-US"><br>
</span><a href="https://eur01.safelinks.protection.outlook.com/?url=https%3A%2F%2Flists.freedesktop.org%2Fmailman%2Flistinfo%2Fgstreamer-devel&data=04%7C01%7C%7C7d2fc5cd6d09467871ed08d8965fbcdd%7C28042244bb514cd680347776fa3703e8%7C1%7C0%7C637424685218355018%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C1000&sdata=nwmPJqEn%2BH3tp%2Fggjqa9f%2BPnAhdCiNoXgWZUefFatoY%3D&reserved=0" target="_blank"><span lang="EN-US">https://lists.freedesktop.org/mailman/listinfo/gstreamer-devel</span></a><span lang="EN-US"><o:p></o:p></span></p>
</div>
</div>
</div>
</blockquote>
<div>
<p class="MsoNormal"><span lang="EN-US"> <o:p></o:p></span></p>
</div>
</div>
<div>
<p class="MsoNormal"><span lang="EN-US"> <o:p></o:p></span></p>
</div>
</div>
</div>
</div>
</div>
<p class="MsoNormal"><span lang="EN-US" style="font-size:9.0pt;font-family:"Helvetica",sans-serif">_______________________________________________<br>
gstreamer-devel mailing list<br>
</span><a href="mailto:gstreamer-devel@lists.freedesktop.org" target="_blank"><span lang="EN-US" style="font-size:9.0pt;font-family:"Helvetica",sans-serif">gstreamer-devel@lists.freedesktop.org</span></a><span lang="EN-US" style="font-size:9.0pt;font-family:"Helvetica",sans-serif"><br>
</span><a href="https://eur01.safelinks.protection.outlook.com/?url=https%3A%2F%2Flists.freedesktop.org%2Fmailman%2Flistinfo%2Fgstreamer-devel&data=04%7C01%7C%7C7d2fc5cd6d09467871ed08d8965fbcdd%7C28042244bb514cd680347776fa3703e8%7C1%7C0%7C637424685218364979%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C1000&sdata=qxiUuBCxuE0H4hKq9TTYlmcWrB2xigwVfVTSNH0JwZU%3D&reserved=0" target="_blank"><span lang="EN-US" style="font-size:9.0pt;font-family:"Helvetica",sans-serif">https://lists.freedesktop.org/mailman/listinfo/gstreamer-devel</span></a><span lang="EN-US"><o:p></o:p></span></p>
</div>
</blockquote>
</div>
<p class="MsoNormal"><span lang="EN-US"><o:p> </o:p></span></p>
</div>
</div>
</div>
<p class="MsoNormal"><span lang="EN-US">_______________________________________________<br>
gstreamer-devel mailing list<br>
</span><a href="mailto:gstreamer-devel@lists.freedesktop.org" target="_blank"><span lang="EN-US">gstreamer-devel@lists.freedesktop.org</span></a><span lang="EN-US"><br>
</span><a href="https://eur01.safelinks.protection.outlook.com/?url=https%3A%2F%2Flists.freedesktop.org%2Fmailman%2Flistinfo%2Fgstreamer-devel&data=04%7C01%7C%7C7d2fc5cd6d09467871ed08d8965fbcdd%7C28042244bb514cd680347776fa3703e8%7C1%7C0%7C637424685218374946%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C1000&sdata=hukFscVf0OaN1bE3YDRdQwghsje915cMPKWLUj65XFY%3D&reserved=0" target="_blank"><span lang="EN-US">https://lists.freedesktop.org/mailman/listinfo/gstreamer-devel</span></a><span lang="EN-US"><o:p></o:p></span></p>
</blockquote>
</div>
</div>
</div>
</div>
</body>
</html>