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
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