<div dir="ltr"><div dir="auto" style="word-wrap:break-word;line-break:after-white-space">Sure, I can describe it more in detail.<div><br></div><div>You are right about that the streaming / displaying is mandatory and the recording is optional (it can be triggered).</div><div><br></div><div>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.</div><div><br></div><div>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</div><div><br></div><div>Thanks!</div><div><div style="direction:ltr"><br><blockquote type="cite"><div>On 2020. Dec 1., at 5:06, gotsring <<a href="mailto:gotsring@live.com" target="_blank">gotsring@live.com</a>> wrote:</div><br><div><div>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: <a href="http://gstreamer-devel.966125.n4.nabble.com/" target="_blank">http://gstreamer-devel.966125.n4.nabble.com/</a><br>_______________________________________________<br>gstreamer-devel mailing list<br><a href="mailto:gstreamer-devel@lists.freedesktop.org" target="_blank">gstreamer-devel@lists.freedesktop.org</a><br><a href="https://lists.freedesktop.org/mailman/listinfo/gstreamer-devel" target="_blank">https://lists.freedesktop.org/mailman/listinfo/gstreamer-devel</a><br></div></div></blockquote><br></div><br></div></div></div>