I have a video player that I made using a custom class for dealing with extracting frames from the video (in other words, I'm not using Phonon) and I'm drawing the frames on a QLabel during video playback which I control using QTimer with setInterval. I see that QTimer's setInterval is not sufficient for accurate video playback speed (I set it to 33 ms but the slot is being called ever 46 ms). Is there a recommended method I should use to get accurate playback speed? If my code can't keep up, its okay to skip a frame or something but I need the total time to play the video to be equal to the total time of the video and I assume that messing around with guesses for setInterval until I get it right is not the way to go, especially when this program will be running on different machines and different processes may be occuring during playback (for instance, drawing additional items on the frame). How can I get accurate playback speed?

I greatly appreciate suggestions!