GStreamer multi pipeline time sync

Peter Biro pettair at gmail.com
Wed Dec 2 20:28:26 UTC 2020


Ahh yeah it is a way to go! Thanks!

> On 2020. Dec 2., at 1:05, Nicolas Dufresne <nicolas at ndufresne.ca> wrote:
> 
> 
> 
> Le mar. 1 déc. 2020 16 h 45, Peter Biro <pettair at gmail.com <mailto:pettair at gmail.com>> a écrit :
> Thanks! That can work!
> 
>  Is there a way how I can 'send silence' from an audio source (or anything in the middle)?
> 
> audiotestsrc wave=silence ! ...
> ... ! volume volume=0.0 ! ...
> 
> 
> Currently this is my audio pipeline:
> alsasrc ! queue ! audioconvert ! appsink name=app_sink
> 
> 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.
> 
>> On 2020. Dec 1., at 11:38, Thornton, Keith <keith.thornton at zeiss.com <mailto:keith.thornton at zeiss.com>> wrote:
>> 
>> Hi,
>> 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.
>> Gruesse
>>  
>> Von: gstreamer-devel <gstreamer-devel-bounces at lists.freedesktop.org <mailto:gstreamer-devel-bounces at lists.freedesktop.org>> Im Auftrag von Peter Biro
>> Gesendet: Dienstag, 1. Dezember 2020 10:21
>> An: Discussion of the development of and with GStreamer <gstreamer-devel at lists.freedesktop.org <mailto:gstreamer-devel at lists.freedesktop.org>>
>> Betreff: Re: GStreamer multi pipeline time sync
>>  
>> Sure, I can describe it more in detail.
>>  
>> You are right about that the streaming / displaying is mandatory and the recording is optional (it can be triggered).
>>  
>> 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.
>>  
>> 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
>>  
>> Thanks!
>> 
>> 
>> On 2020. Dec 1., at 5:06, gotsring <gotsring at live.com <mailto:gotsring at live.com>> wrote:
>>  
>> Can you describe what you are trying to achieve? It sounds like you want to
>> grab video and audio (e.g. webcam and mic), combine/mux those streams, then
>> be able to view the stream it and optionally record it. Something like:
>> 
>> View/Record pipeline (gst-launch-1.0)
>> videotestsrc ! timeoverlay ! tee name=videotee ! queue ! autovideosink \
>> audiotestsrc wave=8 ! tee name=audiotee ! queue ! autoaudiosink \
>> videotee. ! queue ! x264enc ! matroskamux name=muxer ! filesink
>> location=save_location.mkv async=false \
>> audiotee. ! queue ! muxer.
>> 
>> 
>> Playback (just to test)
>> gst-play-1.0 save_location.mkv
>> 
>> This should probably not be used exactly, but that's the gist. You can just
>> google how to mux streams using GStreamer. I also think that queue has a
>> property that allows you to effectively add a delay to a stream
>> (min-threshold-time), is this what you wanted?
>> 
>> 
>> 
>> --
>> Sent from: http://gstreamer-devel.966125.n4.nabble.com/ <https://eur01.safelinks.protection.outlook.com/?url=http%3A%2F%2Fgstreamer-devel.966125.n4.nabble.com%2F&data=04%7C01%7C%7Cebc950b0e2da41e4760208d895e41c7a%7C28042244bb514cd680347776fa3703e8%7C1%7C1%7C637424154270507442%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C2000&sdata=BCRb9jydO5UqClIBi1Td3mZ3R53rhs0yjebt1Cz1nk4%3D&reserved=0>
>> _______________________________________________
>> gstreamer-devel mailing list
>> gstreamer-devel at lists.freedesktop.org <mailto:gstreamer-devel at lists.freedesktop.org>
>> https://lists.freedesktop.org/mailman/listinfo/gstreamer-devel <https://eur01.safelinks.protection.outlook.com/?url=https%3A%2F%2Flists.freedesktop.org%2Fmailman%2Flistinfo%2Fgstreamer-devel&data=04%7C01%7C%7Cebc950b0e2da41e4760208d895e41c7a%7C28042244bb514cd680347776fa3703e8%7C1%7C1%7C637424154270507442%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C2000&sdata=tHkA4r9cpjP4HVyKezzPDZsmbFQcQ2JeAboe0txaWno%3D&reserved=0>
>>  
>>  
>> _______________________________________________
>> gstreamer-devel mailing list
>> gstreamer-devel at lists.freedesktop.org <mailto:gstreamer-devel at lists.freedesktop.org>
>> https://lists.freedesktop.org/mailman/listinfo/gstreamer-devel <https://lists.freedesktop.org/mailman/listinfo/gstreamer-devel>
> _______________________________________________
> gstreamer-devel mailing list
> gstreamer-devel at lists.freedesktop.org <mailto:gstreamer-devel at lists.freedesktop.org>
> https://lists.freedesktop.org/mailman/listinfo/gstreamer-devel <https://lists.freedesktop.org/mailman/listinfo/gstreamer-devel>
> _______________________________________________
> 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/20201202/33c0ce1e/attachment.htm>


More information about the gstreamer-devel mailing list