5

The goal is to take a video file from disk, turn it into an RTSP stream, serve it across the LAN to another PC, and capture this video stream into OpenCV. My PC is 192.168.1.100.

I've run VLC with syntax as follows.

vlc --vlm-conf=vlm.conf -I telnet --telnet-password mypassword

I've got a vlm.conf file that looks like this:

new video1 broadcast enabled loop
setup video1 input video1.mkv
setup video1 output #rtp{mux=ts,sdp=rtsp://192.168.1.100:8554/video1.sdp}
setup video1 option sout-keep
control video1 play

video1.mkv is a video file on the local disk.

The OpenCV version:

>>> cv2.__version__
'3.4.0-dev'

We can try and open that stream in Python on a different PC on the LAN, but it fails.

>>> cap = cv2.VideoCapture("rtsp://192.168.1.100:8554/video1.sdp")
[rtsp @ 0xabddc0] method SETUP failed: 459 Client error

We can try and view this same RTSP stream (rtsp://192.168.1.100:8554/video1.sdp) using VLC, and this works successfully.

As a similar test, we can try a network surveilance camera which provides a network stream.

rtsp://root:mypassword@192.168.1.105/axis-media/media.amp

We can view that stream in VLC, this works successfully.

And we can also try this video stream in Python - this works successfully.

cap = cv2.VideoCapture("rtsp://root:mypassword@192.168.1.105/axis-media/media.amp")

So, what am I missing? Any ideas how to fix this please?

user37998
  • 63
  • 6

0 Answers0