Question / Help Read from text file refresh rate?

doeejohhn

New Member
Hello c: I understand that the read from text file in the text source updates everytime the file itself updates but there's still a ~1000ms delay between showing the updated version on stream. Is there a way to change the delay to have it instantly show the update rather than waiting ~1000ms? Thanks :)
 
I confirmed that the function was the correct one. The "1.0f" in "if (update_time_elapsed >= 1.0f)" is time (in seconds) that's checked against the elapsed time since the last update. I reduced it until I liked how fast it updated (I went with 0.02). It doesn't seem to affect performance with just one text source (and I didn't try more).

If anyone wants to make a UI element in the text source that can set that constant, I think it would make quite a few people happy :)
 
Last edited:
I confirmed that the function was the correct one. The "1.0f" in "if (update_time_elapsed >= 1.0f)" is time (in seconds) that's checked against the elapsed time since the last update. I reduced it until I liked how fast it updated (I went with 0.02). It doesn't seem to affect performance with just one text source (and I didn't try more).

If anyone wants to make a UI element in the text source that can set that constant, I think it would make quite a few people happy :)

Did you manage to get it working? If so, do you mind sharing the updated DLL files or something? Because I would really love to give it a go, but I don't have the knowledge or ability to build OBS myself. Thank you!
 
Did you manage to get it working? If so, do you mind sharing the updated DLL files or something? Because I would really love to give it a go, but I don't have the knowledge or ability to build OBS myself. Thank you!

Yeah, it was a little bit of a process to get built, but not too hard.

Just put the files in the "...\obs-studio\obs-plugins\XXbit" folder (make sure to make copies of your old files just in case). I built from version 21.1.2, FYI. I seem to remember that it was working with a slightly newer version too, but I forget if I actually checked.
 

Attachments

Last edited:
Yeah, it was a little bit of a process to get built, but not too hard.

Just put the files in the "...\obs-studio\obs-plugins\XXbit" folder (make sure to make copies of your old files just in case). I built from version 21.1.2, FYI. I seem to remember that it was working with a slightly newer version too, but I forget if I actually checked.

Thanks for that! Unfortunately I'm now working with 22.0.2, but I'll downgrade on another computer to see the results. Thank you heaps!
 
Hey i compiled the obs Version 25.0.8. and changed one thing in Text plugin.
I changed 1.0f to 0.02f and compiled it.
I changed the installed file obs-text.dll with my new obs-text.dll and IT worked.
Here you can find your obs-text.dll
C:\Program Files\obs-studio\obs-plugins\64bit
you have to change it with mine.
I compiled only 64-bit

Obs now refresh a Text read from File every 20ms
I worked with one Text elemente and there i dont see any performance issues.

Try on own riks.
 

Attachments

If this is going to make it into a release, may I suggest make it a user-configurable property of the text source?
Some I might want shorter, some would be better longer.
 
You should give your wish to th OBS development team or a better developer than me. I'm so glad to solve this for my problem.
I share your wish to develop a gui where you can change the update time.
So... please obs team introduce this feature :)
 
I have exactly the same problem. Thank you very much for sharing the plugin. It seems to work most of the times in 26.0.2 (64 bit). However sometimes no text is visualized (even if the file is not empty). Not sure if it is related to reading the text file while it is being written.

In my case a separate program writes the text file, adding a word every 300 ms.

If it doesn't take too much time would it be possible to create a new plugin which reads every 100 ms or so? To see if the problem is fixed/reduced.

Thanks
 
Back
Top