Reputation: 63
OpenVINO 2021.2
Python 3.7
Windows 10
I can do face detection from video file (webm) and laptop camera (0) but not from a UDP stream.
import cv2
cap = cv2.VideoCapture('udp://0.0.0.0:12345')
Error Message:
MFX: Unsupported extension: udp://0.0.0.0:12345
Does anyone know how to fix this? e.g. manual compilation steps of opencv or other methods.
Upvotes: 1
Views: 971
Reputation: 863
The problem is in this line :
cap = cv2.VideoCapture('udp://0.0.0.0:12345')
You need to add a @ symbol here. It means listen to address.
It should look like :
import cv2
cap = cv2.VideoCapture('udp://@0.0.0.0:12345') #Notice the @
Upvotes: 2