obs-powershell icon indicating copy to clipboard operation
obs-powershell copied to clipboard

Auto-Updating/Populating OBS Scene Items

Open dhawalc opened this issue 2 years ago • 1 comments

I have a video channel running from OBS studio. I have a file named output.mp4 that keeps getting generated. What I want to do is have a script where every time output.mp4 gets generated it refreshes the media source in OBS studio. If that is not possible, we can have output files with time tags and keep playing sequentially one after another. What do you recommend?

This seems pretty straightforward .... you can update the settings on an input to refresh the file.

The "tricky" part would be getting the file change correct. There's an event you could use in .NET to watch for the file changes.

If you'd like, I'd be happy to add a minor feature to obs-powershell to support this scenario. File an issue if you'd like @ https://github.com/StartAutomating/obs-powershell

You might hit file locking issues, but that should also be solveable, by swapping files e.g. generate it to "output2.mp4", then unset the media source's path, rename the file, then set it back. another approach would be adding items to a VLC source's playlist and advancing it

Thank you so much for your reply, I'm pretty new to the whole OBS thing, it will be very helpful to get some knowledge on how to do these, they're gonna be 10-15 seconds blurbs of a video every few mins

no big deal / easy enough thing to build from where I sit.

Please file an issue on the obs-powershell repo asking for it, and I'll give you what you need.

(You can already use StreamDeck to run obs-powershell, via ScriptDeck) aka it should be something you can easily set up and control, once the feature is "in" I can think of plenty of potential uses for this sort of thing, too like, for instance, updating a portion of the screen that covers someone's bio.

I'm currently using Python but can use bash/shell on my ubuntu if needed, please let me know what else would you like to know:

Scenario:

  1. Video source for live broadcast: output.mp4 (10-15 seconds video), once played should stop playing (no loop or anything)
  2. Another output.mp4 video generated - it should trigger to play that new output.mp4 and so on

Assumption -- if needed I can create new video file to output2.mp4 and rename once we unset the sources path to avoid file locking

dhawalc avatar Jun 02 '23 05:06 dhawalc

@dhawalc thanks for the issue!

I've retitled it to what the high-level request is, and will create some additional issues to outline the solution(s) for this problem.

StartAutomating avatar Jun 02 '23 22:06 StartAutomating