Question / Help OBS Txt File Read Speed

Liam13C

New Member
Hi everyone,

So I have just tried making a switch from OBS, to OBS Studio. Studio read text files extremely fast, which allowed me to run a program that updated a text file in seconds/miliseconds like a game clock. OBS did this very well, and I had no issues. I needed more flexibility with what I displayed (graphics etc) so I placed in OBS Studio a "Text (GDI+)" and linked it to a text file so that it would read from there, but it seems to update every second. So when the clock gets into say 57.8 seconds remaining, it will make the next jump to 56.4 instead of running like a clock. OBS did this fine, with no issue, but OBS Studio seems to have this problem. Is there a way to fix/around it? I want the flexibility of OBS Studio, but the clock updating is a very important feature of my streams. I've added the logs from OBS Studio

https://gist.github.com/anonymous/96e864dff66a4583055c9a8a7e84a log file

Basically, it's vital for this clock feature to work, and I have tried using the other text formats of OBS such as FreeType 2, but it all doesn't work. All text is UTF--8.

Thank you!
 

R1CH

Forum Admin
Developer
This is how Studio is designed, it polls the file every second to see if it has changed, whereas Classic gets notified by the kernel when the file changed. The reason Studio doesn't use notifications is because it's difficult to implement in a cross platform manner.
 

Liam13C

New Member
This is how Studio is designed, it polls the file every second to see if it has changed, whereas Classic gets notified by the kernel when the file changed. The reason Studio doesn't use notifications is because it's difficult to implement in a cross platform manner.
Alright cheers for letting me know. I really wasn't sure if it was me, or if it was how it was designed.
 

fmaruchan

New Member
Hi everyone,

So I have just tried making a switch from OBS, to OBS Studio. Studio read text files extremely fast, which allowed me to run a program that updated a text file in seconds/miliseconds like a game clock. OBS did this very well, and I had no issues. I needed more flexibility with what I displayed (graphics etc) so I placed in OBS Studio a "Text (GDI+)" and linked it to a text file so that it would read from there, but it seems to update every second. So when the clock gets into say 57.8 seconds remaining, it will make the next jump to 56.4 instead of running like a clock. OBS did this fine, with no issue, but OBS Studio seems to have this problem. Is there a way to fix/around it? I want the flexibility of OBS Studio, but the clock updating is a very important feature of my streams. I've added the logs from OBS Studio

https://gist.github.com/anonymous/96e864dff66a4583055c9a8a7e84a log file

Basically, it's vital for this clock feature to work, and I have tried using the other text formats of OBS such as FreeType 2, but it all doesn't work. All text is UTF--8.

Thank you!

Liam, I'm doing something similar and it was working perfect with OBS but then I upgraded to OBS studio and the feature doesn't work anymore, so I have a similar game clock and it reads the text file every second so it's not "instant" as before so when streaming the clock is not smooth.... I haven't been able to find a fix for this and seems to only work with with the classic OBS.

I wonder why they couldn't make obs studio with this feature, so far the only work around is to make a window capture of some sort but I need to read the text files for formatting purposes.
 
If you're still interested in using Studio, mess with the Lua scripting some—it's more flexible than writing to text files and you can probably achieve whatever you're looking for with it.
 

syntax101

New Member
Hello, this is also my problem.. i am new with OBS Studio, i do scorebug streaming but when clock goes down 59.9 to 0.0 have a problem seems OBS reads text file every second not every 100ms.

found DLL for it but not working.. anybody have solutions? please share.. thanks
 

jlcooke

New Member
Not sure if this is the type of solution you're looking for, but I've tried this on my OBS Studio and it seems to work fine.

1) Create a file in the Windows file folder of your choice (I called my CLOCK.txt)
2) Create a new Text(GDI+) Source and Browse to the file in the Properties Text File field.
3) Open either a Powershell window or a WSL Ubuntu shell and navigate to the file. Note that Powershell uses the traditional Drive letter path names, while WSL ("Windows Subsystem for Linux") uses a traditional Unix path structure. For example, my "D:" drive is at "/mnt/d/..."
4) Run this "one-liner" and let it keep running while you are broadcasting:
PS > while ($true) { Get-Date -Format "dddd MM/dd/yyyy HH:mm:ss" | Out-File -Encoding ascii CLOCK.txt; sleep 1 }
WSL > while :; do date '+%A %m/%d/%Y %H:%M:%S' > CLOCK.txt; sleep 1; done

When you want the clock to stop running, hit Ctrl-C. If you like, put the command in a script file and run the script.
 
Top