Video Processing frame per second results in half of expected result


I am using the Emotion SDK

VideoDetector constructor expects two parameters { processFrameRate, maxNumFaces and faceConfig }, with the processFrameRate being frames per second.

I am processing videos that are 10 seconds long with an input of 30 for processFrameRate, so I expected about 300 lines in my output, however, I only get 158. However, if I put in an input of 60 fps, I get about 300 lines in my output.

The resulting outputs differ from each other in every way except the first two lines are identical.

Can someone explain why doubling my fps is getting me the right amount of output and why my outputs differ from each other?


Hi @dorothy_mantle I think what might be happening is the timestamps encoded in the input file might not reflect the video frame rate. The process frame rate is used to throttle the number of frames included in the processing. The video detector drops a frame if its associated PTS (presentation timestamp) is < 1 / (processing frame rate). the sample code assumes it is going to process a 30 frames per second file. One thing to do is inspect the pts(s) in the video using ffprobe to validate that theory.

If you are observing a behavior where the frames are being dropped, you should increase the process frame rate to higher than 30


Thank you, that worked!