justadudewhohacks / face-api.js

JavaScript API for face detection and face recognition in the browser and nodejs with tensorflow.js
MIT License
16.69k stars 3.71k forks source link

The issue, related stream video #533

Open mnatsakanyan opened 4 years ago

mnatsakanyan commented 4 years ago

Hello I connected IP camera instead of web camera( it works perfectly when on web camera), but I get the shots with the help of video tag so as it is done at you, but when The code reaches this function (await faceapi.detectAllFaces(videoEl, options).withFaceLandmarks().withFaceDescriptors()) It stops and neither gives an error nor does any action. Can you please tell me what the reason of this can be?

justadudewhohacks commented 4 years ago

I remember there was such an issue in Firefox, but waiting vor the "onloadedmetadata" event in the examples did fix it. Did you try the same?

<video onloadedmetadata="onPlay(this)" id="inputVideo" autoplay muted playsinline></video>