Ask Your Question

Revision history [back]

Gstreamer Opencv backend doesn't support this codec acutally

 OpenCV Error: Unsupported format or combination of formats (Gstreamer Opencv backend doesn't support this codec acutally.) in CvVideoWriter_GStreamer::open, file /home/htf/Downloads/opencv-2.4.9/modules/highgui/src/cap_gstreamer.cpp, line 505
    Qt has caught an exception thrown from an event handler. Throwing
    exceptions from an event handler is not supported in Qt. You must
    reimplement QApplication::notify() and catch all exceptions there.

    terminate called after throwing an instance of 'cv::Exception'
      what():  /home/htf/Downloads/opencv-2.4.9/modules/highgui/src/cap_gstreamer.cpp:505: error: (-210) Gstreamer Opencv backend doesn't support this codec acutally. in function CvVideoWriter_GStreamer::open

    Aborted (core dumped)

this is a part of my code

 PCL_VideoWriter.open(FileName.toAscii().data(),CV_FOURCC('M','P','4','2'),FPS,cv::Size(640,480));
        //        MainTimer->start(viewer_thr->loop_time);





  if(SLAM_IMG_Capture_flag == 1)
    {
        FileName.clear();
        FileName =  "Video/"+CurrDateText+"-"+CurrTimeText+"-SLAM"+".avi";
        SLAM_VideoWriter.open(FileName.toAscii().data(),CV_FOURCC('M','P','4','2'),30,SLAM_IMG.size());
    }

if(Raw_IMG_Capture_flag == 1)
{
    FileName.clear();
    FileName =  "Video/"+CurrDateText+"-"+CurrTimeText+"-RAW"+".avi";
    RAW_VideoWriter.open(FileName.toAscii().data(),CV_FOURCC('M','P','4','2'),30,RAW_IMG.size());
}

I am new to OpenCV, does anyone know how to fix this problem? little clues would be appreciated