i'm trying to get a video stream from a djy drone 'Tello' with nodejs. the UDP server is working because i can manually get the stream and show it on my mac with "ffplay udp://198.168.10.1:11111".
Anyway i cant make opencv4nodejs (porting of opencv) working while making const capture = new VideoCapture('udp://192.168.10.1:11111', cv.CAP_FFMPEG).
Construction of object 'capture' fails with this message: 'OpenCV: Couldn't read video stream from file "udp://192.168.10.1:11111"'
PS: if I use const capture = new VideCapture(0), etc.. it does successfully construct everything using my Mac camera.
Any help would be great, thank you!
Solution: The issue was installing opencv4nodejs without having ffmpeg installed BEFORE. So i run again npm install and rebuild opencv that was now aware of FFMPEG and everything worked as was supposed to do. I can read from udp stream and forward video as i want to my front end
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.