0

i am trying to connect and process a video stream from my ip camera i am using 360Eye(s) camera.

this is my code trying to connect:

import cv2
cap = cv2.VideoCapture('rtsp://admin:123456@192.168.0.333')
while True:
    ret, img = cap.read()
    if ret == True:
        cv2.imshow('video output', img)
        k = cv2.waitKey(10)& 0xff
        if k == 27:
            break
cap.release()
cv2.destroyAllWindows()

and i never get inside the if statment

further information: iv'e played the stream via VLC and via Onvif device manager also this is my opencv prop:

Video I/O:
    DC1394:                      NO
    FFMPEG:                      YES (prebuilt binaries)
      avcodec:                   YES (58.54.100)
      avformat:                  YES (58.29.100)
      avutil:                    YES (56.31.100)
      swscale:                   YES (5.5.100)
      avresample:                YES (4.0.0)
    GStreamer:                   NO
    DirectShow:                  YES
    Media Foundation:            YES
      DXVA:                      NO
  • Do you check the IP adress? Is this the correct one? Please check [this](https://stackoverflow.com/questions/49978705/access-ip-camera-in-python-opencv) for additional information. – Kampi May 12 '20 at 11:33
  • did you try this url in other programs - ie in [VLC media player](https://www.videolan.org/vlc/index.html) – furas May 12 '20 at 11:38
  • are you sure it is full url ? Maybe it need path after IP. Using Google I found [360 IP camera URL](https://www.ispyconnect.com/man.aspx?n=360) and it seems it may need `/live/ch00_0` at the end `rtsp://admin:123456@192.168.0.333/live/ch00_0` – furas May 12 '20 at 11:42
  • i was able to get the stream via VLC and via ONLIF device manager iv'e played with the ip in my camera options now its 192.168.0.111 – aviram_Piletzki May 12 '20 at 12:04

0 Answers0