Ask Your Question

Revision history [back]

JavaFX, OpenCV and mjpeg

Hello, I am trying to integrate the video stream of an IP camera into a JavaFX app.

To do that, I followed this tutorial: - For the installation of OpenCV:

Install OpenCV 3.x under Windows.

http://opencv-java-tutorials.readthedocs.io/en/latest/01-installing-opencv-for-java.html

And I use this project:

http://opencv-java-tutorials.readthedocs.io/en/latest/03-first-javafx-application-with-opencv.html#video-capturing

https://github.com/opencv-java/getting-started/blob/master/FXHelloCV/

Using the webcam of my laptop, it works.

Then I tried to do the same thing with my ip cam (D-Link 5000L) The URL to see the video with google chrome is http://192.168.1.70/mjpeg.cgi

So I changed this line : this.capture.open("http://192.168.1.70/mjpeg.cgi");

To connect to the ip camera instead of my laptop camera.

I tried with another ip cam (not the same brand) with the right url, and it works.

Any idea of what I did wrong? could it come from the video format (mjpeg?) since it works with a camera and not the other?

Thanks you for your help :)