4

I tried to read saved video file (.avi) using the following code:

#include <iostream> // for standard I/O
#include <string>   // for strings
#include <opencv2/core/core.hpp>        
#include <opencv2/highgui/highgui.hpp> 
using namespace std;
using namespace cv;
int main(int argc, char *argv[])
{
    const string source = argv[1];          
    VideoCapture inputVideo(source);        

    if (!inputVideo.isOpened())
    {
       cout  << "Could not open the input video: " << source << endl;
       return -1;
    }
       cout  << "YESSSSSSSSSSSSSSS : open the input video: " << source <<endl;
 }

There is no compilation errors. But when I run it I got this error

GStreamer: Error opening bin: Unrecoverable syntax error while parsing pipeline 4p-c0.avi

Could please help.

Feten Besbes
  • 186
  • 1
  • 10

0 Answers0