I found 1-2 frame delay fluctuation when I used spout for texture transmission. How can I eliminate this delay?
Closed this issue · 7 comments
I found 1-2 frame delay fluctuation when I used spout for texture transmission. How can I eliminate this delay? If you have a plan or idea, please let me know. Thank you very much.
If you are using a single sender/receiver pair, you can use SetFrameSync / WaitFrameSync. There are examples in the Beta branch for both sender and receiver.
If you are using a single sender/receiver pair, you can use SetFrameSync / WaitFrameSync. There are examples in the Beta branch for both sender and receiver.
And receive will find significant jitter when receiving at a frame rate of 60 frames
Event sync has been implemented by collaboration with a developer who requires sync of sender to receiver. The functions were reviewed recently to enable/disable sync and have been tested successfully.
The examples have not been updated yet but I had a look at them regarding missed frames. In this case, sender synchronizes to the receiver. I find no missed frames unless window events interfere, such as click on the caption. Without sync enabled, there are missed frames by just moving the mouse over the window which confirms that the sync functions are working. The new examples will include binaries for testing.
However, the examples are OpenGL and I see Direct3D 11 in your images. I have not tested the sync methods with DirectX. To compare with OpenGL, the present method should synchronize with vertical blank 'Present(1, 0)'.
Yes, I use Direct3D 11, there are missing frames during synchronization, I think it is caused by shared textures being repeatedly written at high frame rates, above is my guess, I have not confirmed, if you complete your example, or have any suggestions for this solution, please reply to me, thank you very much
Frames are not actually written for the receiver, just the handle to the texture for the receiver to read. The timing is only affected by the write and read of that handle in shared memory. If the frames are produced at 60fps, that corresponds to the OpenGL examples.
I need to reproduce the problem before I can solve it. Which application uses "SetFrameSync". Is it the sender or receiver? Are you using "Present (0, 0)" or "Present (1, 0)".
There can be other issues with the graphics driver. Is it Nvidia or something else? Is this a laptop?
I tested the sync functions with the SpoutDX examples and they work correctly.
You can download the projects from here. Unzip to the "SpoutDX" folder. There is a readme file and pre-built binaries in the "Tutorial04_Sync/BINARIES" folder.
Press and release the Space bar in each application to disable/enable sync. The receiver console will show missed frames when sync is disabled.
Edit
I left out a file from the BINARIES folder
Copy "seafloor.dds" from the "Tutorial07_Sync" folder.