user2208392
user2208392

Reputation: 105

C++ OpenCV VideoCapture works differently on different machines

I wrote this Windows app, where I use this code:

VideoCapture cap(videopath.c_str());
if(!cap.isOpened()){    
    cerr << "Unsupported video format!" << endl;
    return -1;
}

I supply an example .avi file with this app, and so far it worked on every single machine(win7, winXP, 32bit, 64bit). But suddenly there is one client who claims he's getting "Unsupported video format!" error with the exactly same .avi file which worked on every other machine so far. He's using win7. What do you think is the problem? Is this some codec issue?

Thank you for any advice. With regards, JP

Upvotes: 0

Views: 173

Answers (1)

Eric
Eric

Reputation: 19863

This is most probably a problem with installed codecs. You have to make sure that the target machine has the required codecs to decode the avi file you have supplied.

A simple solution would be for your client to install VLC player with the supplied codec pack. Your video contained in the avi is likely to be contained in the pack. Another solution could be to use g-spot and find the exact encoding of your video and bundle a proper filter with your application

Upvotes: 3

Related Questions