Error Reading Large Video [closed]

asked 2013-10-10 01:10:41 -0500

Gautz gravatar image

updated 2013-10-10 01:13:15 -0500

Moster gravatar image

Hi, I am new to openCv and am having trouble with reading a large uncompressed video(abt 14GB) in bayer format. essentially the simple reading program crashes when used for this type of video ONLY. greatfull for any help, thanks: the code for reference

#include <iostream>
#include <opencv2/core/core.hpp>
#include <string>
#include <string.h>
#include <cv.h>
#include <highgui.h>
#include "opencv2/imgproc.hpp"
#include <fstream>
#include <Windows.h>
#include <iostream>

using namespace cv;
using namespace std;

int main(int argc, _TCHAR* argv[])

    // Define OutPut Video Details:////////////////////////////////////////////////////////////////////////////////////
    VideoCapture start_vid("D:\\baby1\\IDS\\2013-09-03 16.48.22.avi"); // to define out put video parameters
    if (!start_vid.isOpened())
                        cout<<"Not Opened"<<endl;
                        return 1;
    Size frameSize(start_vid.get(CV_CAP_PROP_FRAME_WIDTH),start_vid.get(CV_CAP_PROP_FRAME_HEIGHT));

    Mat frame;

    for (int i=0;i<start_vid.get(CV_CAP_PROP_FRAME_COUNT);i++)
        cout<<i<<endl;; //crashes here
        namedWindow("Bayer Image");
        imshow("Bayer Pattern",frame);

    cout<<"end press any key for exit";

    return 0;
edit retag flag offensive reopen merge delete

Closed for the following reason question is not relevant or outdated by sturkmen
close date 2020-09-27 06:30:04.587163


Some error message is always helpful for people that can help.

Moster gravatar imageMoster ( 2013-10-10 01:14:09 -0500 )edit

well the code builds just fine(I am using microsoft visual studio 2010) , crashes during runtime with an error :: [avi @ 0000000000756D10] Something went wrong during header parsing, I will igno re it and try to continue anyway.

Gautz gravatar imageGautz ( 2013-10-10 01:18:41 -0500 )edit