Ask Your Question

Jane29's profile - activity

2016-02-06 23:13:06 -0600 asked a question OpenCV- Working with video in Ubuntu

Hi everyone,

I am a beginner to OpenCV. I am currently running OpenCV on Ubuntu, having installed from git using the instructions in the documentation below: http://docs.opencv.org/2.4/doc/tutori...

I am having no issues at all with processing images using the tutorial guides, and I now want to have a go a video processing, but I'm not able to load the videos.

I am aware that .avi isn't a video format. I can run the videos fine in Ubuntu, they play OK and it is just loading into OpenCV which presents an issue. This makes me think that all required codecs are installed.

However when I try to load the video in my code, OpenCV is not able to read the file. I have a line in the code to test that the video is opened, which indicates failure:

if (vid_option == 1) {
    VideoCapture capture(argv[1]); //try to open string
    if (!capture.isOpened()) {
        cerr << "Failed to open \n" << endl;
        return 1;
    }

Please could you help me understand what the issue may be, and how to fix it?

I did see some posts suggesting the installation of ffmpeg. I attemped to install this from git, running the /ffmpeg/.Config file I had the bizzare message "yasm/nasm not found or too old. Use --disable-yasm for a crippled build."

Please let me know if you have some suggestions

Thank you for your help

Jane