python - How to use cv2.VideoCapture() to open a live video stream from a different computer's camera remotely?
问题描述
I can correctly open a live video stream from my computer's camera that I'm running my python code on. I want to continue running my code on this same computer. How can I open up a video capture from this computer that shows the camera stream of my other computer. I don't want to run the code on my other computer, but want to view the live video stream of the other computer on my current computer. I would appreciate any help on this!
vid = cv2.VideoCapture(0) #0 gets the computer i'm running on's camera. how can i remotely access my other computer's camera?
while(True):
# Capture the video frame by frame
ret, frame = vid.read()
# Display the resulting frame
cv2.imshow(frame)
# the 'q' button is set as the quitting button
if cv2.waitKey(1) & 0xFF == ord('q'):
break
# After the loop release the cap object
vid.release()
# Destroy all the windows
cv2.destroyAllWindows()
解决方案
除非您的计算机上有允许您这样做的程序,否则您无法捕获另一台计算机的相机。例如,您进入受害者计算机的恶意程序。
推荐阅读
- java - 如何修复合并的清单错误
- javascript - 关于在我的 JS 代码中放置 .innerHTML 的位置的问题
- c# - 读数据库上的字段不出现在写数据库是正常的吗?
- python - AttributeError:“Int64Index”对象没有属性“月”
- javascript - Delete layer mask with actiondescriptor
- c# - 无法执行保存,因为文档已被会话修改并且还参与了延迟 PATCH 命令 RavenDB
- graphql - 如何访问传递给子查询的变量
- go - 如何处理“全部测试”中的预期+无关失败?
- php - PHP函数未按要求执行
- spring-boot - Gradle-没有 GET /WEB-INF/jsp/welcome.jsp 的映射"