Ask Your Question
1

OpenCV & Axis Camera - Mac Cannot Read Movie File

asked 2015-02-09 15:11:59 -0600

cirrus965 gravatar image

updated 2015-02-09 15:40:37 -0600

I am trying to run a live video feed from an Axia camera configured on my network. I can connect through the web browser, but the Eclipse build fails when I run it. I have the latest versions of Java JDK, OpenCV, and Eclipse. I have successful got this working on Windows by moving the opencv_ffmpeg_64.dll file to the System32 folder, but I cannot get it to work on Mac. This is the current code that I have:

public class Video {

public static void main(String[] args) throws InterruptedException {

    // new Video().run();

    System.loadLibrary(Core.NATIVE_LIBRARY_NAME);

    MatWindow window = new MatWindow("Camera");
    MatWindow threshWindow = new MatWindow("Thresh");


    VideoCapture camera = new VideoCapture();
    camera.open("http://10.25.26.23:80/mjpg/video.mjpg");
    while(!camera.isOpened()) {
        System.out.print("Camera not Open");
        camera.open("http://10.25.26.23:80/mjpg/video.mjpg");
    }

This is the error that I receive when I run the program:

Camera not OpenWARNING: Couldn't read movie file http://10.25.26.23:80/mjpg/video.mjpg

Any suggestions on how to get a Axis camera working with Mac and OpenCV would be greatly appreciated!

edit retag flag offensive close merge delete

1 answer

Sort by ยป oldest newest most voted
0

answered 2015-09-17 20:15:03 -0600

littlefree gravatar image

updated 2015-09-17 20:15:53 -0600

I resolve the problem by installing ffmpeg, and recompile opencv with ffmpeg config. Then the VideoCapture works fine.

edit flag offensive delete link more

Question Tools

1 follower

Stats

Asked: 2015-02-09 15:11:59 -0600

Seen: 790 times

Last updated: Sep 17 '15