Question / Help [solved] Image Source won't Update when file is changed

Hartze

New Member
Hello,
I am new to OBS and have tried to use an AutoHotKey script to display animated GIF files in my stream.
What it basically does is to overwrite an empty GIF file with a short animation.
Wait a few seconds and overwrite it over again with the empty gif from a backup.

It works as it should (as I can see it in Windows Explorer, the Thumpnail changes to an animation and disappears after a few seconds), but in the preview window in the OBS does not change the GIF.

When I open the image properties and reinsert the path and / or click the "Unload image when not displayed" checkbox,
the source will update properly.


The script is prety silmilar to this https://youtu.be/B8Zlwfw0CCo tutorial.

Is OBS even able to update images as I plan?

Excuse me for my bad English I gave my best :/

Thanks in advance.

EDIT: try to better explain what my script does.
 
Last edited:

Hartze

New Member
I think i sloved it by my self.
According to this Thread: https://obsproject.com/forum/threads/auto-updating-images-workaround.54874/ there is/was a Bug in OBS so it only reload an image when the "last modified " attribute of the file changes, wich AHK seams not to do when just copy/overwrites a file.

As i have downloaded all of my test gifs as a .rar packet and unpacked them all at the same time they had all the same time stamp when they where last modified. So i just run this Powershell command:
Code:
$(get-item foo.gif).lastwritetime=$(get-Date)
for each gif and now my script works as i intended to.

I hope if someone runs in to a similar Problem he understands my poor English and this Thread will help him.
 
Top