Ask Your Question

NikoM's profile - activity

2018-05-28 22:42:23 -0500 received badge  Famous Question (source)
2017-05-19 04:48:37 -0500 received badge  Notable Question (source)
2017-03-02 15:31:16 -0500 received badge  Popular Question (source)
2016-01-25 17:36:57 -0500 received badge  Student (source)
2015-08-17 02:34:34 -0500 commented answer How to make a good long video (capture) with VideoWriter ?

Hello, and thank you for your help.

  • I try to read this video with OpenCV and I get this error: "Context scratch buffers could not be allocated due to unknown size.".
  • With mediainfo, I don't see any error: this codec is DivX; the size is good...
  • I don't know how to use ffdshow. I will search that on the web.

For me, the video file isn't well done but I don't know why.

2015-08-14 08:21:16 -0500 commented answer How to make a good long video (capture) with VideoWriter ?

I download the DivX codec pack and the problem is always here. But I see that all my video do the same size (5.54 KB). So there is a problem during writing the video and not during the release.

2015-08-14 07:44:10 -0500 commented answer How to make a good long video (capture) with VideoWriter ?

Thank you for your answer but the video cannot be open by another player. But I get an error message: pin failed: File Source (Async.)::Output.. Moreover, the media type is unknow. For a DivX video, the extention is "avi" too, right ?

2015-08-14 02:49:38 -0500 commented answer How to make a good long video (capture) with VideoWriter ?

I try to use CV_FOURCC_PROMPT, but the list isn't change after I installed K-Lite Codec Pack. Do you know why?

2015-08-14 02:35:15 -0500 received badge  Editor (source)
2015-08-14 02:29:29 -0500 received badge  Supporter (source)
2015-08-14 02:29:22 -0500 commented answer How to make a good long video (capture) with VideoWriter ?

Hello, yes a see my mistake, yesterday, sorry. Now video look like to be less big than before but now the release seem to not work. When the video is done (and released) I cannot read it in Windows Media Player.(error C00D11B1). I will update my first message. Again, thank you a lot for your help!

2015-08-11 02:30:07 -0500 commented answer How to make a good long video (capture) with VideoWriter ?

Hello, Thank you for your answer and your help. Unfortunately with theses codec, videos are always big (about 1Go for 35/40 sec). I try with DivX/mpeg, Lagarith and TechSmith for now. With this problem, videos cannot be long because the video cannot be bigger than 4Go. I really don’t understand why videos are the same size by using DivX or another codex without compression? Thanks in advance.

2015-08-10 03:48:06 -0500 asked a question How to make a good long video (capture) with VideoWriter ?

Hello,

I want to capture my software window by using OpenCV. I found the VideoWriter class and use it to make video with screenshots taken each X msec. My software use Qt so I take a QPixmap each time, convert it to cv::Mat and add it into VideoWriter.

My problem: the video become big after only one minute and when the video is bigger than 2Go it cannot be read by video media player (Windows 7). Moreover, the video cannot be bigger than 4Go.

There is my initialize method:

cv::Size videoSize = cv::Size(_mainWindow->width(),_mainWindow->height());

int codec = cv::VideoWriter::fourcc('M', 'S', 'V', 'C'); // This codex works only with short video.

_writer.open(fullFileName.toStdString(), 6, FPS-5, videoSize, true);

Can you help me to identify the problem? Is it the used codec?

Thanks in advance


Edit

Now I use DivX correctly I think but the video look like the release fail. I cannot open it with my player. There is my code: // Select codec int codec = cv::VideoWriter::fourcc('D', 'I', 'V', 'X');

// Create and open video file writer.open(fullFileName, codec, FPS, videoSize, true);

// Test main loop for(int j=0; j<100; j++) { takeScreenshot(writer); }

// Release video writer.release();

Have you an idea? Is it a codec problem?

Thank you for your help