Создание виртуальной камеры из RTSP потока
You can easily do it on Ubuntu, Debian, Raspian, and Ubuntu Linux for Windows subsystems using the following method,
- Installing required libraries, v4l2loopback-dkms and ffmpeg:
sudo apt install v4l2loopback-dkms
sudo apt install ffmpeg
- Emulate a video device:
sudo modprobe v4l2loopback card_label="Webcam Stream Name" exclusive_caps=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.