- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
can openvino use with IP cam instead of web cam ? if yes, how to setup ?
Link Copied
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
@Hyodo, Katsuya
import numpy as np
import cv2 cap = cv2.VideoCapture('http://username:password@10.10.XX.XX')
while(True): ret, frame = cap.read()
cv2.imshow('frame',frame)
if cv2.waitKey(1) & 0xFF == ord('q'):
break
cap.release()
cv2.destroyAllWindows()
tested code above but not working, and got this message below:
user@user-virtual-machine:~/Downloads$ python3 ipcam.py
(python3:4185): GStreamer-CRITICAL **: gst_element_get_state: assertion 'GST_IS_ELEMENT (element)' failed
Traceback (most recent call last):
File "ipcam.py", line 16, in <module>
cv2.imshow('frame',frame)
cv2.error: OpenCV(4.0.0-pre) /home/jenkins/workspace/OpenCV/OpenVINO/build/opencv/modules/highgui/src/window.cpp:356: error: (-215:Assertion failed) size.width>0 && size.height>0 in function 'imshow'
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
@Hyodo, Katsuya
replaced username,password,port with correct value still having same output
cap = cv2.VideoCapture("http://username:password@xxx.xxx.xxx.xxx:port")
user@user-virtual-machine:~/Downloads$ python3 ipcam.py [http @ 0x1e3d320] Stream ends prematurely at 0, should be 1581 (python3:5253): GStreamer-CRITICAL **: gst_element_get_state: assertion 'GST_IS_ELEMENT (element)' failed Traceback (most recent call last): File "ipcam.py", line 17, in <module> cv2.imshow('frame',frame) cv2.error: OpenCV(4.0.0-pre) /home/jenkins/workspace/OpenCV/OpenVINO/build/opencv/modules/highgui/src/window.cpp:356: error: (-215:Assertion failed) size.width>0 && size.height>0 in function 'imshow'
if using rtsp will get message below
cap = cv2.VideoCapture("rtsp://username:password@xxx.xxx.xxx.xxx/1")
user@user-virtual-machine:~/Downloads$ python3 ipcam.py [rtsp @ 0x2335920] method OPTIONS failed: 404 Not Found (python3:5298): GStreamer-CRITICAL **: gst_element_get_state: assertion 'GST_IS_ELEMENT (element)' failed Traceback (most recent call last): File "ipcam.py", line 17, in <module> cv2.imshow('frame',frame) cv2.error: OpenCV(4.0.0-pre) /home/jenkins/workspace/OpenCV/OpenVINO/build/opencv/modules/highgui/src/window.cpp:356: error: (-215:Assertion failed) size.width>0 && size.height>0 in function 'imshow'
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
I'm using DVR model: HV7108
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi,
I'm encountering significant lagging with IP camera with build inference engine sample for age, emotion and gender recognition models.
It will freeze the terminal most of the time.
My input is "-i rtsp:username:password@ipv4:port/video_path". Tried to scaled down the resolution, didn't see much improvement.
However it works a lot better with USB camera.
Any comments would be highly appreciated.

- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page