Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Gstreamer 1.0 one source and two sink display

I want to capture image from camera via v4l2src, then captured image is displayed in 2 sink, one is original image and one is processed image. Does anyone know how to do this? I'm using gstreamer 1.0.

like image 427
Legend22 Avatar asked Oct 26 '25 16:10

Legend22


1 Answers

You should look at the tee element: https://gstreamer.freedesktop.org/documentation/coreelements/tee.html

Here is a gst-launch example fitting your needs:

gst-launch-1.0 -v v4l2src ! tee name=t \
    t. ! queue ! videoscale ! video/x-raw,width=640,height=480 ! \
        videoconvert ! autovideosink \
    t. ! queue ! videoscale ! video/x-raw,width=360,height=240 ! \
        videoconvert ! autovideosink
like image 102
Ahresse Avatar answered Oct 29 '25 17:10

Ahresse