I am trying to create a virtual camera in Chrome using v4l2loopback where the incoming video is H264 via RTP.
I have has some success in getting a GStreamer test video recognized in Chrome with MediaStreamTrack.getSources
:
$ sudo modprobe v4l2loopback
$ gst-launch-1.0 videotestsrc ! v4l2sink device=/dev/video0
This works well, Chrome will display the video test source.
However, when I use an incoming h264/RTP source the device does not show up in MediaStreamTrack.getSources
. For example:
gst-launch-1.0 -v tcpclientsrc host=<IPADDRESS> port=5000 ! gdpdepay ! rtph264depay ! avdec_h264 ! videoconvert ! v4l2sink device=/dev/video0
What is the reason for this? What would the solution be?
I had thought perhaps this is to do with the video formats and perhaps the correct caps needed to be set through v4l2loopback.