Running multiple pipelines of gstreamer simultaneously in sync

6,053

One of the pipelines is gstreamer 1.0, the other is using 0.10 (default of gst-launch). Using 1.0 is recommended.

You can just have both launch lines in the same gst-launch-1.0 command. You also might want to add some queues before or after the encoders to have some buffering in the pipeline

gst-launch-1.0 v4l2src device=/dev/video1 ! videorate  ! 'image/jpeg,framerate=30/1,width=1920,height=1080' ! jpegparse ! avimux name=muxer ! filesink location=/home/sina/Desktop/Recordings/video.avi v4l2src device=/dev/video0 ! 'video/x-raw, framerate=24/1, width=1024, height=768' ! x264enc ! mpegtsmux ! filesink location=/home/sina/Desktop/Recordings/Screen.ts  -v
Share:
6,053

Related videos on Youtube

Sina Sh
Author by

Sina Sh

Updated on September 18, 2022

Comments

  • Sina Sh
    Sina Sh over 1 year

    Thanks to help of "thiagoss" I made these pipelines below for gstreamer. one is capturing via Webcam and the other from frame grabber. The thing now is that I don't know how to merge them (I want both of them to record into separate containers) can you share your ideas or solutions on how to run two pipelines in sync together?

     gst-launch-1.0 v4l2src device=/dev/video1 ! videorate  ! 'image/jpeg,framerate=30/1,width=1920,height=1080' ! jpegparse ! avimux ! filesink location=/home/sina/Desktop/Recordings/video.avi . -v
    

    and

     gst-launch v4l2src device=/dev/video0 ! 'video/x-raw-yuv, framerate=24/1, width=1024, height=768' ! x264enc ! mpegtsmux ! filesink location=/home/sina/Desktop/Recordings/Screen.ts . -v