ubuntugstreamer-1.0

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.


Solution

  • 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