Ask Your Question
0

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.

http://opencv-java-tutorials.readthed...

And I use this project:

http://opencv-java-tutorials.readthed...

https://github.com/opencv-java/gettin...

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

edit retag flag offensive close merge delete

Comments

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: http://192.168.1.70/mjpeg.cgi (/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
0

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
Login/Signup to Answer

Question Tools

1 follower

Stats

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

Seen: 469 times

Last updated: Mar 01 '18