VideoWriter with variable FPS

asked 2016-12-07 13:16:50 -0600

cedricverst gravatar image

updated 2016-12-07 13:17:44 -0600

Hello,

I've been struggling with this one for a very long time. I have a couple of IP camera's connected through a WIFI connection, what I would like to achieve is to record the stream of each of those cameras by using the VideoWriter class.

An issue I have is that the FPS is depending on the WIFI connection. If the connection goes slower, the FPS defined in the constructor of the VideoWriter, does not match with the actual FPS retrieved.

Is there anyone here who've found a workaround for this type of situations? The big issue is that the video is playing at different speeds.

Thank you all for your help and advice.

PS: please don't recommend sleep or blocking functions, this will not help.

Cédric

edit retag flag offensive close merge delete

Comments

use a timer. When image is not ready write last available image

LBerger gravatar imageLBerger ( 2016-12-07 13:39:31 -0600 )edit

thanks, well that will fill the gaps and may work. Curious if there any other approaches.

cedricverst gravatar imagecedricverst ( 2016-12-07 13:41:15 -0600 )edit