Ask Your Question

JavaFX, OpenCV and mjpeg

asked 2018-03-01 10:22:50 -0500

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.


And I use this project:


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

So I changed this line :"");

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 :)

edit retag flag offensive close merge delete


make sure, opencv_ffmpeg.dll is on the PATH

berak gravatar imageberak ( 2018-03-01 11:05:27 -0500 )edit

Hello, I just had the folder C:\opencv\build\bin to the PATH, which contain: opencv_ffmpeg340.dll and opencv_ffmpeg340_64.dll

now I obtain those 2 warnings when close the JavaFX window:

warning: Error opening file (/build/opencv/modules/videoio/src/cap_ffmpeg_impl.hpp:808) warning: (/build/opencv/modules/videoio/src/cap_ffmpeg_impl.hpp:809)

arthur6703 gravatar imagearthur6703 ( 2018-03-02 02:16:12 -0500 )edit

1 answer

Sort by ยป oldest newest most voted

answered 2018-03-05 07:26:38 -0500

Hello, I solve my problem, the url /mjpeg.cgi worked with my browser, but didn't work with my app , and did'nt with with VLC also. The good URL was http://<ip adress="">:<port>/video.cgi and not mjpeg.cgi

edit flag offensive delete link more

Question Tools

1 follower


Asked: 2018-03-01 10:22:50 -0500

Seen: 764 times

Last updated: Mar 01 '18