Unable to stream video in appsink when using it for webrtcbin (sendrecv)

Viewed 26

I am using gstreamer based WEBRTC. (https://github.com/centricular/gstwebrtc-demos/tree/master/sendrecv)

I want to give my camera sensor's feed to the OpenCV using appsink and also want to give it to the webrtcbin/sendrecv.

Using the tee-element in pipeline is not working.

I have 2 different pipeline: Appsink -> OpenCV 'nvv4l2camerasrc device=/dev/video0 ! video/x-raw(memory:NVMM),width=3840,height=2160,framerate=30/1 ! nvvidconv flip-method=0 ! video/x-raw, width=1280, height=960, format=(string)BGRx ! videoconvert ! video/x-raw,format=BGR ! appsink sync=0'

Webrtcbin pipeline:

 nvv4l2camerasrc device=/dev/video0 ! video/x-raw(memory:NVMM),width=3840,height=2160,framerate=30/1 ! nvvidconv flip-method=0  ! video/x-raw, width=1280, height=960, format=(string)BGRx ! videoconvert ! video/x-raw,format=BGR !
 queue ! application/x-rtp,media=video,encoding-name=VP8,payload=97 ! sendrecv.

These both are working absolutely perfect if I use it independently. I want to run both of them simultaneously in different threads. Use-case: Stream a video on local display as well as stream it over the network using WEBRTC. How to do it?

0 Answers
Related