Ask Your Question

Revision history [back]

I had the same issue. This is because OpenCV tries to open the video file as an xml file and crashes. I modified my readStringList function with a try-catch and it works for me:

static bool readStringList(const string& filename, vector<string>& l) {
    FileStorage fs;
    try {, FileStorage::READ);
    } catch (...) {
      return false;
    if (!fs.isOpened()) return false;
    FileNode n = fs.getFirstTopLevelNode();
    if (n.type() != FileNode::SEQ) return false;
    FileNodeIterator it = n.begin(), it_end = n.end();
    for (; it != it_end; ++it) l.push_back((string)*it);
    return true;