Bonjour,

dans le cadre d'un projet, je dois créer une vidéo à partir d'un rendu opengl, dans une interface graphie Qt, j'ai donc pensé à utiliser opencv, j'ai donc mis en place le code suivant :
Code : Sélectionner tout - Visualiser dans une fenêtre à part
1
2
QImage image = this->grabFrameBuffer();
this->writer = new cv::VideoWriter("./noob.avi", CV_FOURCC('M','J','P','G'), this->fps, cv::Size(image.width(), image.height()));
Cependant à l'execution, j'obtiens l'erreur suivante :

Code : Sélectionner tout - Visualiser dans une fenêtre à part
1
2
3
4
5
6
7
OpenCV Error: Unsupported format or combination of formats (Gstreamer Opencv backend doesn't support this codec acutally.) in CvVideoWriter_GStreamer::open, file /builddir/build/BUILD/OpenCV-2.3.1/modules/highgui/src/cap_gstreamer.cpp, line 483
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():  /builddir/build/BUILD/OpenCV-2.3.1/modules/highgui/src/cap_gstreamer.cpp:483: error: (-210) Gstreamer Opencv backend doesn't support this codec acutally. in function CvVideoWriter_GStreamer::open
Il semble que cela vienne de CV_FOURCC, étant novice dans l'utilisation de cet API, je me tourne vers vous pour vous demander de l'aide

Merci d'avance