Ask Your Question

how to write video at 150f/s

asked 2013-10-27 16:32:56 -0600

Garra gravatar image

updated 2013-10-28 03:54:32 -0600

berak gravatar image

Hello to all and sorry for my english...

I do not know if I'll be able to be clear

I do video processing (with Qt but it is detail ) and for that I use a thread that is responsible for making the reading of this video and treatment. When the frame is read and treatment finished, this thread sends me a message (with system SIGNAL / SLOT of Qt ) . Once this is done there is still a sleep of 1000/frameRate to give the display time.

All this is going very well and IT IS A VERY NICE SCREEN and it is precisely my question ( finally here )

How can i record the video with this "slowing" as i see in scree?

I understand that with opencv if you want a fsp of 150 you must record at this rate ....

But how to get the same video that I see on the screen ... without using camtasia ... if you see what I mean ...

I thought to keep my frames in a queue but I think that memory wll explode and anyway I can not read 30f / s and write 150i / s without remember all frames in memmory what is madness .

Another way to see it is that I can, while the thread is doing its job , save my frame as many times as I can , that is the same frame several times pending the thread sends me a new frame . Is this could be a solution ? ?

thank you a lot for your help and AGIN SORRY FOR MY BAD ENGLISH ....

edit retag flag offensive close merge delete


for real time-lapse, you'd have to capture at 150 fps in the first place ( which is probably impossible using an off-the-shelf webcam )

berak gravatar imageberak ( 2013-10-28 03:56:54 -0600 )edit

1 answer

Sort by ยป oldest newest most voted

answered 2013-10-28 02:46:04 -0600

ThomasB gravatar image

I'm not entirely sure that I get your question, but probably that works for you;

Have look on VideoWriter. In the .open()-Function you can define the Framerate. With the normal VideoCapture(which you already use as far as I understand) you can read then images @ 30fps and write them at 150fps. But that would not be slowing, that would be speeding the video up by a factor of 150/30 = 5.

So simply (Pseudocode)

Videocapture in;
VideoWriter out;, 150, ..)

Mat m << in; // reads @ input video's frame rate

// probably process

out << m; // writes @ 150fps, because we specified that in open function
edit flag offensive delete link more

Question Tools


Asked: 2013-10-27 16:32:56 -0600

Seen: 309 times

Last updated: Oct 28 '13