1

I'm trying to share my computer's camera with the remote computer. In order to do this, I wanted to share my own computer's camera with the udp port(stream), take the stream on the remote computer and put it on the virtual camera. So I thought I could use my own camera on platforms like google meet with my remote computer.

My application steps are as follows;

I started camera stream from local pc (/dev/video0) with use gstream udpsink and I could get stream data on remote pc like below:

gst-launch-1.0 -e -v udpsrc port=5001 ! application/x-rtp, encoding-name=JPEG,payload=26 ! rtpjpegdepay ! jpegdec !  autovideosink 

I created a virtual camera on the remote pc like below:

sudo modprobe v4l2loopback exclusive_caps=1 video_nr=3 card_label="VirtualCAM"

At this point, I want to convert this stream data to video device. I tried to use v4l2sink device=/dev/video5 instead of autovideosink but I got some error.

Do you have any suggestion?

Purgoufr
  • 131
  • 6
  • It is hard to see what you tried, and what went wrong. My only thought is why are you trying to send a stream via UDP? – ctrl-alt-delor Jan 23 '21 at 22:51
  • I'm trying to share my computer's camera with the remote computer. That' all. In order to do this, I wanted to share my own computer's camera with the udp port(stream), take the stream on the remote computer and put it on the virtual camera. So I thought I could use my own camera on platforms like google meet with my remote computer. – Purgoufr Jan 24 '21 at 12:33
  • Put clarifications in the question. So that the question is in one place. – ctrl-alt-delor Jan 24 '21 at 14:41

1 Answers1

2

I could not convert the video stream using GStreamer. But ffmpeg works for me. I started sending and receiving video streams using Ffmpeg for both remote and local machines.

For Local Linux Machine:

ffmpeg -i /dev/video0 -f mpegts udp://<ip>:<port>

For Remote Linux Machine

ffmpeg -i udp://<ip>:<port> -f v4l2 /dev/video3

NOTE: /dev/video3 is a virtual camera on the remote machine

Purgoufr
  • 131
  • 6