dynamic stream recording
Milian Wolff
milian.wolff at kdab.com
Wed Nov 27 09:05:51 UTC 2019
On Mittwoch, 27. November 2019 08:55:12 CET Tim Müller wrote:
> On Tue, 2019-11-26 at 17:39 +0100, Milian Wolff wrote:
>
> Hi Milian,
Hey Tim!
> > Is this still the recommended way of doing things? For a novice, it
> > is extremely difficult to follow - the code is complex and apparently
> > requires manual setup of the pipeline, which is unfortunate - the
> > flexibility of `gst_parse_launch` has helped me a lot so far.
>
> I think by and large this is still correct, but it depends a bit on
> what exactly you want to do.
>
> Can you describe your goals/requirements? There are many types of
> 'dynamic' stream recording.
Will do, see below.
> gst_parse_launch() just doesn't work very well for dynamic things.
> Having
> said that, you can still use helpers like
> gst_parse_bin_from_description(),
> which are like gst_parse_launch() but give you a bin / pipeline part
> instead of a full top-level pipeline. So you can use it for branches
> for example.
Great, that's exactly the kind of method I was looking for. May I suggest that
a link to gst_parse_bin_from_description is added to gst_parse_launch?
> If you provide more specific info we might be able to point you to more
> specific examples.
I have an X shaped pipeline: two sources a) and b) , a video mixer in the
center, and then two outputs c) and d):
Center:
```
glvideomixer name=m ! tee name=t
```
Source a) is essentially the video camera:
```
rpicamsrc preview=false ! \
video/x-raw,format=RGBA,width=320,height=240,framerate=25/1 ! \
glupload ! m.
```
Source b) is a dynamic overlay image from another sensor source:
```
appsrc name=overlaysrc blocksize=307200 stream-type=0 ! \
rawvideoparse format=rgba width=320 height=240 frame-size=307200
framerate=25/1 ! \
video/x-raw,format=RGBA,width=320,height=240,framerate=25/1 ! \
glupload ! m.
```
Sink c) is the live preview:
```
t. ! queue name=display_queue ! qmlglsink name=sink
```
Sink d) is the record branch:
```
t. ! queue name=record_queue ! glcolorconvert ! gldownload ! \
video/x-raw,format=ARGB ! videoconvert ! \
omxh264enc control-rate=1 target-bitrate=1145000 ! \
video/x-h264,profile=baseline ! h264parse ! avimux ! \
filesink location=test.avi
```
Initially I was hoping I could create this pipeline just once and then
selectively enable/disable the record branch.
What I'll try next is to only create the record branch once but connect/
disconnect it dynamically to the tee as needed. Afaik while the record branch
is disconnected and thus not PLAYING, I should be able to change the
filesink's location property too - right?
Thanks
--
Milian Wolff | milian.wolff at kdab.com | Senior Software Engineer
KDAB (Deutschland) GmbH, a KDAB Group company
Tel: +49-30-521325470
KDAB - The Qt, C++ and OpenGL Experts
-------------- next part --------------
A non-text attachment was scrubbed...
Name: smime.p7s
Type: application/pkcs7-signature
Size: 3826 bytes
Desc: not available
URL: <https://lists.freedesktop.org/archives/gstreamer-devel/attachments/20191127/9204bed1/attachment-0001.bin>
More information about the gstreamer-devel
mailing list