Ask Your Question

Revision history [back]

click to hide/show revision 1
initial version

OpenCV & Axis Camera - Mac Cannot Read Movie File

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 great appreciated!

click to hide/show revision 2
retagged

updated 2015-02-09 15:16:29 -0600

berak gravatar image

OpenCV & Axis Camera - Mac Cannot Read Movie File

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 great appreciated!

OpenCV & Axis Camera - Mac Cannot Read Movie File

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 great greatly appreciated!