Convert RTSP stream to virtual web camera
Asked Answered
A

4

9

I am trying to use a RTSP stream from an IP camera as video input source for various applications on Windows (eg. Skype, Zoom, Microsoft Teams, etc.).

The only solution I have found so far is using "webcam 7", an application that fetches an RTSP stream and creates a virtual webcam driver that registers in system as webcam and that any application can then use. Unfortunately, this application often becomes unstable and might crash randomly.
Are there any alternative/better ways for achieving this?

Addax answered 27/10, 2014 at 14:45 Comment(0)
M
2

Create your own DirectShow video capture filter (there are lots of examples - this is a great one) and handle the RTSP stream inside it. This way you can implement the stability yourself.

Meit answered 29/10, 2014 at 9:10 Comment(0)
B
1

I know this is a bit old question. But you can also have look at vlc2vcam, looks promising.

Backbreaker answered 21/8, 2015 at 9:38 Comment(1)
only works with vlc 1.x and requires a third party webcam filterDislocate
I
1

Try Moonware Universal Source Filter from http://netcamstudio.com. The only drawback is that it creates only video "composite" device that sends both video + audio and Skype can only see the video (I think most of applications does the same). If I find an easy way to split that stream will post it here.

Irritating answered 30/12, 2017 at 10:40 Comment(0)
G
1

You can easily do it on Ubuntu, Debian, Raspian, and Ubuntu Linux for Windows subsystems using the following method,

  1. Installing required libraries, v4l2loopback-dkms and ffmpeg:
sudo apt install v4l2loopback-dkms
sudo apt install ffmpeg
  1. Emulate a video device:
sudo modprobe v4l2loopback card_label="Webcam Stream Name" exclusive_caps=1
  1. Streaming from RTSP uri to the created virtual device:
ffmpeg -stream_loop -1 -re -i rtsp://uri -vcodec rawvideo -threads 0 -f v4l2 /dev/video0

You can replace the '0' at the end of /dev/video0 with the number of the available and playable video device.

Guadiana answered 8/12, 2022 at 8:29 Comment(0)

© 2022 - 2024 — McMap. All rights reserved.