rpos icon indicating copy to clipboard operation
rpos copied to clipboard

Inability to use v4l2loopback

Open tal0301 opened this issue 4 years ago • 4 comments

Hi All,

I need to stream a video file using ONVIF, and I'm trying to use v4l2loopback. It creates an emulated device that works and shows video, but the rpos cannot pick it up (showing no video on the ONVIF device Manager).

I'm sure that I'm missing something in the Gstreamer Pipeline, but I cannot figure it out.

Can someone please help?

Thank you.

tal0301 avatar Oct 18 '20 09:10 tal0301

I have done it with vlc rtsp server.

bagrintech avatar Oct 19 '20 09:10 bagrintech

Any chance to share with me your insights? I'm trying to work around this issue...

On Mon, Oct 19, 2020 at 12:35 PM bagrintech [email protected] wrote:

I have done it with vlc rtsp server.

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/BreeeZe/rpos/issues/98#issuecomment-711924106, or unsubscribe https://github.com/notifications/unsubscribe-auth/AJGQ6GLICOSPE3PUC4MB5WLSLQB7LANCNFSM4SU6OBFA .

tal0301 avatar Oct 19 '20 09:10 tal0301

vlc has a built in RTSP server. So you can start VLC from the command line to make it read a file (with looping over and over) and pass on the video via its built in RTSP server. I searched around on the internet for the command line syntax.

You would then use the VLC RTSP server instead of the Live555 based RTSP server or the GStreamer RTSP Server

RogerHardiman avatar Oct 19 '20 10:10 RogerHardiman

Get root access for VLC: sudo sed -i 's/geteuid/getppid/' /usr/bin/vlc Build py script :
subprocess.Popen(["vlc","-I","dummy","--loop","/home/pi/video.mp4",":sout=#gather:rtp{sdp=rtsp://192.168.1.3:8554/h264}",":network-caching=500",":sout-all",":sout-keep"], stdin=subprocess.PIPE, stdout=subprocess.PIPE, stderr=subprocess.PIPE, text=True) Starting py script

bagrintech avatar Oct 19 '20 10:10 bagrintech