combining two gstreamer pipelines

classic Classic list List threaded Threaded
4 messages Options
Reply | Threaded
Open this post in threaded view
|

combining two gstreamer pipelines

xargon
I am very new to gstreamer and been playing with it the last few days. I have created 2 gstreamer pipelines. One displays a scaled live video captured from camera on the screen and the other takes the video in its original format and saves it to a file on the disk after encoding it with the H264 format. The two pipelines are as follows:


# Capture and display scaled camera feed
gst-launch-1.0 -v autovideosrc ! videoscale ! video/x-raw,
width=480,height=270 ! xvimagesink -e --gst-debug-level=3 sync=false

# Save the camera feed in its original format to disk
gst-launch-1.0 -v autovideosrc ! omxh264enc ! 'video/x-h264,
stream-format=(string)byte-stream' ! h264parse ! qtmux ! filesink
location=test.mp4 -e

These two pipelines work by themselves and I was wondering how i could combine them into one i.e. show the scaled video on the screen AND record the video in its original format to a file?
Reply | Threaded
Open this post in threaded view
|

Re: combining two gstreamer pipelines

xargon
Looks like I needed the `tee` element. not sure if I am doing this right but it seems to work. Would appreciate any comment on if I could optimize this more

gst-launch-1.0 -v autovideosrc ! tee name = t ! queue ! omxh264enc !
'video/x-h264, stream-format=(string)byte-stream' ! h264parse ! qtmux !
filesink location=test.mp4 t. ! queue ! videoscale ! video/x-raw,
width=480,height=270 ! xvimagesink -e sync=false
Reply | Threaded
Open this post in threaded view
|

AW: combining two gstreamer pipelines

Thornton, Keith
In reply to this post by xargon
Hi add a tee and a queue to the first pipline before your videoscale. Connect your second pipeline to the tee (also with a queue) instead on the source in the second pipeline.

-----Ursprüngliche Nachricht-----
Von: gstreamer-devel [mailto:[hidden email]] Im Auftrag von xargon
Gesendet: Montag, 11. April 2016 07:46
An: [hidden email]
Betreff: combining two gstreamer pipelines

I am very new to gstreamer and been playing with it the last few days. I have created 2 gstreamer pipelines. One displays a scaled live video captured from camera on the screen and the other takes the video in its original format and saves it to a file on the disk after encoding it with the H264 format. The two pipelines are as follows:


# Capture and display scaled camera feed
gst-launch-1.0 -v autovideosrc ! videoscale ! video/x-raw,
width=480,height=270 ! xvimagesink -e --gst-debug-level=3 sync=false

# Save the camera feed in its original format to disk
gst-launch-1.0 -v autovideosrc ! omxh264enc ! 'video/x-h264, stream-format=(string)byte-stream' ! h264parse ! qtmux ! filesink
location=test.mp4 -e

These two pipelines work by themselves and I was wondering how i could combine them into one i.e. show the scaled video on the screen AND record the video in its original format to a file?



--
View this message in context: http://gstreamer-devel.966125.n4.nabble.com/combining-two-gstreamer-pipelines-tp4676815.html
Sent from the GStreamer-devel mailing list archive at Nabble.com.
_______________________________________________
gstreamer-devel mailing list
[hidden email]
https://lists.freedesktop.org/mailman/listinfo/gstreamer-devel
_______________________________________________
gstreamer-devel mailing list
[hidden email]
https://lists.freedesktop.org/mailman/listinfo/gstreamer-devel
Reply | Threaded
Open this post in threaded view
|

Re: AW: combining two gstreamer pipelines

xargon
This post was updated on .
Thanks for the reply! I think I did that correctly. Please see my previous post (above your answer).