Vsync in Gamma : some misunderstandings

Hi,
I’m working on a project where the output display is set to 50Hz.
I have to play image sequences at 50fps (and also mp4 video at 25fps but I am not dealing with this at the moment).
During the development, I’m using an image sequence that is 20sec long (1000 frames).
So, in order to play the medias correctly, I want the patch to run at 50fps via vsync.

I check help patches about synchronization in CoreLib > IO and some forum topics, but I’m a bit confused.

What I did:

My screen refresh rate is set to 50Hz and Present Interval is set to Default on my SceneWindow.

From Bjoern’s remark and Joreg’s reply in this topic , I understand that I shouldn’t set the MainLoop node to 50fps if I want to use vsync.

My FramePlayer is configured with Frame Increment = 1 because I want my media to run at the normal speed, and Increment Every Nth Frame = 1 because my display and image sequence have the same framerate.

The thing is, if I’m placing a StopWatch to check how long my media actually is, and let the MainLoop to default then it runs faster than it should (StopWatch displays 17sec, not 20s) . But if I’m setting the MainLoop to 50fps, then it runs correctly (StopWatch displays 20s).

So now I’m confused…
Is setting Present Interval to Default enough to make sure my patch is playing my medias with the correct framerate based on the refresh rate of my display?
Should I trick the MainLoop node, or not?
Am I missing something or misunderstanding something?

Thanks you very much for you help!

Seems to work here.

image

Umm, you are using the classic ImagePlayer from what I see.
In that case, yes I have the correct duration without touching my MainLoop.

But, I was using the ImagePlayer (FrameBased) with a FramePlayer.
And when doing so, then the duration isn’t correct anymore…

Should I avoid using the ImagePlayer (FrameBased) then?
Or is there something to add to my left construction to make it work correctly?

yes, frame-based, and you should only sync with one window, two could create frame locks.

1 Like

But if I’m using the ImagePlayer (FrameBased) and just one TextureWindow to sync to, I still don’t have my 20sec as the duration of my image sequence

Do you have more than one screen attached?
If so, are all set to 50Hz?
Does the perfmeter show 50 FPS?

That was it! Thank you, now I understand!

I thought placing the output window to the screen set with the proper parameter would be enough to say to Gamma that those are the parameters it should look at. Or maybe it’s a graphic card thing, but it doesn’t matter actually.

So, yes previously the perfmeter showed 60 fps, but then it was logic because 2 other screens were also attached and set to 60Hz. But setting all screens to 50Hz, then ok, the perfmeter is now at 50fps, and the video duration is now correct : 20sec long.

That might sounds stupid, but I really thought that just placing the window on the proper screen would have been enough to say that those are the parameters it should look at. Well, now it’s clearer for sure!

Thanks again :)

2 Likes

This topic was automatically closed 365 days after the last reply. New replies are no longer allowed.