2

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
1

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

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.