Question / Help Dynamic Images

Reesebiz

New Member
Quick question: How can I set up dynamic images in OBS? When I update a text file it refreshes on stream, but when I add an image it doesn't.
 

FerretBomb

Active Member
Are you talking about an image slideshow? If it's set to watch a directory, you may need to refresh the source (disable/re-enable it, so long as it's not set up as a Global) to get any new images dropped in to enter the rotation.
 

Reesebiz

New Member
I'm not looking for something where I need to be at the computer to disable/re-enable the sources, need something automatic. I have a program that overwrites the image file and I need OBS to refresh it when it changes.
 

FerretBomb

Active Member
Not sure that's possible; pretty sure OBS caches the images the first time they're loaded, for efficiency. Overwriting the file on disk would do nothing at that point.
 

Reesebiz

New Member
Didn't look possible so I used the CLR Browser Source plugin and created a file called image.html and put this inside:

HTML:
<img id="myimg" src="userimage.png">

    <script src="https://ajax.googleapis.com/ajax/libs/jquery/2.1.4/jquery.min.js"></script>
    <script>
        $(document).ready(function() {
            setInterval(function() {
                $("#myimg").attr("src", "userimage.png?" + new Date().getTime());
            }, 2000);
        });
    </script>

After I just loaded that file with the plugin and it refresh the image every 2 seconds. There's probably a better method, but I just hacked this together.
 

FerretBomb

Active Member
Just remember, if it's stupid and it works, then it's not stupid.

Thanks for posting the workaround!
 
Top