BreeeZe / rpos

Raspberry Pi Onvif Server
http://breeeze.github.io/rpos
MIT License
643 stars 146 forks source link

Inability to use v4l2loopback #98

Open tal0301 opened 3 years ago

tal0301 commented 3 years ago

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.

bagrintech commented 3 years ago

I have done it with vlc rtsp server.

tal0301 commented 3 years ago

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 notifications@github.com 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 .

RogerHardiman commented 3 years ago

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

bagrintech commented 3 years ago

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