# Directory watch media



## Exeldro (Apr 21, 2019)

Exeldro submitted a new resource:

directory watch media - adds a filter you can add to media source to load the oldest or newest file in a directory



> adds a filter you can add to media source to load the oldest or newest file in a directory
> 
> View attachment 44924



Read more about this resource...


----------



## Exeldro (Oct 12, 2019)

Exeldro updated Directory watch media with a new update entry:

add clear hotkey, filter and extension



> add clear hotkey for clearing the vlc playlist
> add filter option to filter filename that contain a specific text
> add extension to filter files with a specific extension



Read the rest of this update entry...


----------



## Exeldro (Nov 14, 2019)

Exeldro updated Directory watch media with a new update entry:

added localization, fix memory leaks and linux build



> added localization, fix memory leaks and linux build



Read the rest of this update entry...


----------



## Exeldro (May 20, 2020)

Exeldro updated Directory watch media with a new update entry:

Version 0.2.0



> add remove and delete hotkeys
> add mac build



Read the rest of this update entry...


----------



## Exeldro (Jun 6, 2020)

Exeldro updated Directory watch media with a new update entry:

Version 0.3.0



> Add a hotkey to select a random file from the selected directory.



Read the rest of this update entry...


----------



## Exeldro (Sep 27, 2020)

Exeldro updated Directory watch media with a new update entry:

Version 0.4.0



> Add image source support
> Add installer for windows



Read the rest of this update entry...


----------



## Exeldro (Nov 22, 2020)

Exeldro updated Directory watch media with a new update entry:

Version 0.5.0



> add refresh hotkey



Read the rest of this update entry...


----------



## Exeldro (Jan 13, 2021)

Exeldro updated Directory watch media with a new update entry:

Version 0.5.1



> fix not updating when not shown
> fix installer conflict with source switcher



Read the rest of this update entry...


----------



## youjiman (Jan 17, 2021)

Hi! Thank you for a useful plugin! However, I got lower fps and higher cpu usage after updating to 0.5.1. There are no such a problems when I downgraded to 0.5.0. I’m using OBS 26.1.2 on MacOS Big Sur.


----------



## Exeldro (Jan 17, 2021)

Exeldro updated Directory watch media with a new update entry:

Version 0.5.2



> add interval option (set to 0 for scanning the directory every frame)



Read the rest of this update entry...


----------



## Promic2 (Jan 17, 2021)

is it possible to get to work with. images in a folder?
i'm trying to add the filter to a screenshot folder.
it really picks up the image. but it is black image as long as filter is active


----------



## Exeldro (Jan 17, 2021)

Exeldro updated Directory watch media with a new update entry:

Version 0.5.3



> fix rendering image sources



Read the rest of this update entry...


----------



## Krzykyle (Jan 22, 2021)

Updated to the newest version and I still can't get it to work as advertised.

With VLC video source it'll only play one video and then freeze on it's last frame. And it will only play the one video when opening up the filter, making a change in the setting, and closing it again. The video won't play on it's own when switching to the scene.

With media source it again only plays one video but at least it disappears at the end of the video. And it does play when switching to the scene.


----------



## jegadk (Feb 22, 2021)

Nice plugin to replay goals in the period break. I'm recording/streaming icehockey games.

Is there any way to get some transition to the clips. It looks not so good when playing several files because it just cut from one to another


----------



## fred_mackay (Jul 19, 2021)

Hey!

Is there any documentation on how to filter for multiple file types? I'd like to narrow the search down to just png and jpg.
Also, I noticed there's a Random hotkey, is it possible to place that option in to "Sort by" ? It would be awesome to load random images from a folder into OBS. If you use an Image source it has the "Unload file" option meaning every time it loaded it could pick a random file from a directory.
Just an idea!


----------



## Exeldro (Jul 19, 2021)

@ewat if you don't want a filter on file type you can make that field empty.
the sort by and random both have a different trigger so that would not make sense to me to combine them.


----------



## fred_mackay (Jul 19, 2021)

Exeldro said:


> @ewat if you don't want a filter on file type you can make that field empty.


@Exeldro I would like to filter for ".jpg" and ".png" because at the moment, when I hit the hotkey for "Random" in OBS, the filter sometimes loads the desktop.ini file. So I'd like to instruct it to look only for the image files in the folder.



Exeldro said:


> the sort by and random both have a different trigger so that would not make sense to me to combine them.


I understand, that makes sense. I'm currently looking through your code in an effort to see if I can make a version where the filter triggers the hotkey function for "Random" when the source is visible. I'm having a hard time though, not going to lie haha.


----------



## fred_mackay (Jul 19, 2021)

Okay so I see in the Move Value filter you have the 'obs_source_info.*' thingoe
Is it possible to get that drop down menu into the Directory Watch Media filter so that when the filter changes state throughout OBS we can do things like trigger the random function you have?


----------



## DynaDASH (Jul 31, 2021)

I created an account to just say thank you. Thanks for creating such amazing stuff Exeldro.
I just have a thing here. I can't seem to get the "sort by" to work. I pick "Created newest" but still plays the same file first (the first created) instead of the latest. I don't know if I'm doing something wrong or if that isn't the function I expected it to be. Am I doing something wrong? I don't know if I should be using "Remove first" to just keep removing matches and mentally (or taking notes) of the replays I'm using and removing? Maybe this sounds complicated.

I'm asking because I'm using it for replays for a tournament and I expect the host to analyze the latest highlight instead of watching something from a different match. 

Thanks for your time, Exeldro.


----------



## Rakurai_uk (Sep 13, 2021)

Hi, I am hopelessly stuck trying to figure out how this plugin works.

My issue is that I am trying to create a replay theatre scene containing a VLC Media Source, where all replays are saved into a specific folder. I set that VLC source with the filter, and pointed it to the replays directory - but I still can't get it to recognize any new video files when they get uploaded into that folder. It's visibility behaviour is set to "Stop when not visible, restart when visible"

Current settings on the VLC Video Player, are Looped playback, and the playlist contains the path to the replays directory. This is also configured the same in the plugin associated with it.

Do you need a video file already in the VLC Source's playlist, or can you leave it blank?

I've spent about 2 hours trying to work this out - some documentation would be highly welcome!


----------



## Hans Bélanger (Jan 21, 2022)

Is there such an alternative version of this plugin that gets every file from a folder rather than just the first one from the given sort function? 

I have this exact need the plugin fixes of often changing files that would require to manually update the content of the vlc source, except I'm working with half a dozen short files at a time rather than just the one.


----------



## Want To Learn (Jan 21, 2022)

Hi Exeldro, I am not sure, but I think this plugin may be getting in the way of the built in virtual cam. OBS 27.1.3 Mac OS High Sierra. Is their any way I can uninstall it to  see. I just used Virtual Cam for something. Right after I downloaded  and installed, "Directory watch media."  It shows up as expected, but haven't used it yet and when I click on the built in virtual webcam it darkens, but doesn't output to anything. Is it a coincidence or maybe the plugin hasn't been updated to the current version of OBS. I really need to find out as I use zoom for lessons. Thanks! Oh! It also says, OBS wants to make chanwes and to enter my password each time I turn it on.


----------



## Want To Learn (Jan 21, 2022)

Want To Learn said:


> Hi Exeldro, I am not sure, but I think this plugin may be getting in the way of the built in virtual cam. OBS 27.1.3 Mac OS High Sierra. Is their any way I can uninstall it to  see. I just used Virtual Cam for something. Right after I downloaded  and installed, "Directory watch media."  It shows up as expected, but haven't used it yet and when I click on the built in virtual webcam it darkens, but doesn't output to anything. Is it a coincidence or maybe the plugin hasn't been updated to the current version of OBS. I really need to find out as I use zoom for lessons. Thanks! Oh! It also says, OBS wants to make changes and to enter my password each time I turn it on.


Update: Before I typed that last post I really tried to get Vcam to work. I open and closed OBS and did a restart on my Mac, but it wasn't until I tried a new copy of OBS that it seems to be working again. Now all the copies I have can do the Vcam and Directory Watch Media. I've done all this in one night, so I will keep you posted after trying it a few days in case it was one of them things. Thanks for the plugin!


----------



## T68 (Jan 25, 2022)

Hi!
Can this plugin be used to play the latest file in a folder AND the previusly added files in that same folder? I´m lookin for functionality to play all the saved instant replay files in a folder, just by switching to a scene that contains this VLC video source which is set to play the folder content. 
Currently I need to re-open the source config to get it to recognize any added files in the folder.


----------



## petjo10 (Feb 28, 2022)

Exeldro said:


> Exeldro submitted a new resource:
> 
> directory watch media - adds a filter you can add to media source to load the oldest or newest file in a directory
> 
> ...


Would it be possible to start to play a file at a certain time based on the name of the file..12.30.00.mp4


----------



## Exeldro (Mar 14, 2022)

Exeldro updated Directory watch media with a new update entry:

Version 0.6.0



> clear file path when no matching file is found



Read the rest of this update entry...


----------



## PlayFan (Mar 26, 2022)

Hi ! Nice plugin ! Is there any way to have all the sub-folders of the currently watched folder ?
I want to record my last 15s with ShadowPlay for example, but unfortunately, ShadowPlay decides to create a new folder for every game.
So my watched directory is, for example "C:/Videos" but I need the filter to also watch directories like "C:/Videos/Minecraft" or "C:/Videos/Moonlighter"

Thanks !


----------



## Exeldro (Mar 27, 2022)

@PlayFan that is possible to make, but it will take more resources to do scan more directories.


----------



## PlayFan (Mar 27, 2022)

Exeldro said:


> @PlayFan that is possible to make, but it will take more resources to do scan more directories.


I understand, thank you for answering ! I'm currently using an OBS instance on a secondary computer so i'd probably not be bothered by it, but I'm sure this is another story when you're trying to scan x folders every xxxx ms while playing and streaming on the same device...
I tried to find a way to avoid a folder creation on ShadowPlay's side but it looks like im out of luck here... :(


----------



## Chidorin (Mar 27, 2022)

So ARM (raspberry pi/apple silicon) not supported?


----------



## T68 (May 4, 2022)

Hi! 
Unfortunately I cannot get this plugin to work as expected. I record instant replays into a folder which I then want to play as a looped playlist in a VLC Video source. I have created a VLC source which is assigned to this plugin by a filter setup as a poster has suggested. But when i activate the VLC video source it only plays the oldest replay video. If I open the settings of the VLC it also only lists the oldest replay video file. 
What am I doing wrong here?


----------



## T68 (May 4, 2022)

Update: it´s working! Dunno really what I did differently except to change sort order to createst newest. It still lists and plays starting with the oldest though. Strange.... but I am a happy camper now. Thanks for a good plugin!


----------



## JesperVonfel (Jun 28, 2022)

Hello,
I am looking for a plugin that find videos from a folder like this one but I would love to have the option to play  a random video, all the sorted by options are indeed sorted. Is it possible to have a random option?
Thanks a lot


----------



## fred_mackay (Jul 23, 2022)

Hey mate!
Been using this for a while now and love it, but I keep running into an issue which is wholly Windows specific BS. I have a bunch of images I want to show, and have rigged up the random key in order to cycle through them, however Windows keeps generating a desktop.ini file which I cannot for the life of me get rid of permanently. The image extensions are *.gif *.jpg *.jpeg and *.png and I'm wondering:
1) Is it possible to comma separate the extensions I want it to watch for in the "Extension" field?
or
2) Would it be possible at all to get an "Exclude" field in order to specify a file I don't want it to pick?

Keep up the great work man!


----------



## hydrilus (Aug 2, 2022)

Hello @Exeldro !  Really great plugin here, thank you for your work.  I just have a fairly simple question I think:

I'm using this to scan for the most recently created "Replay" file in a directory (after pressing a hotkey to save the OBS Replay Buffer) and load it into a regular OBS Media Source.  This source is then made visible for playback 3 seconds later (using LioranBoard for that).
The issue I'm running into is that when the source is made visible to play, it always shows a bit of the previous file that was loaded first, before then updating and playing from the most recent file after my hotkey press.

I figured this was possibly because i wasn't giving OBS enough time to save the file, and then your filter enough time to scan and load the new file path, but I've waited as long as 15 seconds before making the source visible for playback and it still plays a bit of the previous replay file before beginning the new one.  Any thoughts on this?

I've tried doing this using a VLC Media Source instead as well, and it seems to work but unfortunately I don't need a playlist format for my usage scenario.  I just want it to play one single most recent replay, and since VLC Media Source will always play the first file path that was added (i.e. the oldest file rather than the most recent added by your filter), this doesn't work for me.

Hoping you can provide some insight, thank you!


----------



## Tomasz Góral (Aug 2, 2022)

hydrilus said:


> Hello @Exeldro !  Really great plugin here, thank you for your work.  I just have a fairly simple question I think:
> 
> I'm using this to scan for the most recently created "Replay" file in a directory (after pressing a hotkey to save the OBS Replay Buffer) and load it into a regular OBS Media Source.  This source is then made visible for playback 3 seconds later (using LioranBoard for that).
> The issue I'm running into is that when the source is made visible to play, it always shows a bit of the previous file that was loaded first, before then updating and playing from the most recent file after my hotkey press.
> ...


I wait 2 sec and play replays.
For this i always got open multiview window. Some times i see new first frame from replays some not, but always after 2-3 sec i can play replay scene.


----------



## hydrilus (Aug 13, 2022)

Tomasz Góral said:


> I wait 2 sec and play replays.
> For this i always got open multiview window. Some times i see new first frame from replays some not, but always after 2-3 sec i can play replay scene.


Thanks Tomasz.

As I mentioned, I've waited as long as 15 seconds after creating the replay file, giving OBS plenty of time to do what it does, and plenty of time for the Directory Media Watch to update to the most recent file path, yet it still plays the previous file for a few seconds first, then updates.

I found a workaround using a VLC Media Source though.  Initially, since I only want to play one file, this wouldn't work for me because Directory Media Watch will continue adding file paths to the playlist with each new file it finds, and always play the first/oldest in the list when the source is made visible, instead of the most recent.  I figured out how to use LioranBoard to clear the playlist though after every replay gets shown.  This way, Directory Media Watch adds the filepath, the replay plays, then the path is cleared.

So far, this is working perfectly. :)


----------



## Tomasz Góral (Aug 13, 2022)

hydrilus said:


> Thanks Tomasz.
> 
> As I mentioned, I've waited as long as 15 seconds after creating the replay file, giving OBS plenty of time to do what it does, and plenty of time for the Directory Media Watch to update to the most recent file path, yet it still plays the previous file for a few seconds first, then updates.
> 
> ...


You can clear vlc list the same keys as save replays ;)


----------



## WesthillChurch (Nov 23, 2022)

T68 said:


> Update: it´s working! Dunno really what I did differently except to change sort order to createst newest. It still lists and plays starting with the oldest though. Strange.... but I am a happy camper now. Thanks for a g
> 
> 
> T68 said:
> ...


*Hi.  Have you any idea what you did to fix it?  Could you provide a screen shot of your media source?  I have the same problem.  My playlist in the VLC Media source only has one file from the directory.*


----------



## kaoticpunisher (Nov 30, 2022)

Hello i m having an issue, the plugin doesnt reproduce all the files of the directory, only the first or the last, depending on how i choose from the options, but doesnt make any transition into the next one.
Any solution or  tip?


----------



## T68 (Dec 7, 2022)

WesthillChurch said:


> *Hi.  Have you any idea what you did to fix it?  Could you provide a screen shot of your media source?  I have the same problem.  My playlist in the VLC Media source only has one file from the directory.*


Hi!
Sorry for late answer. Here is how i set up the filter on the mediasource that plays the playlist of captured replays. I added the letter "-R" to the replay filename and filter on this. Hop it can help.






Here is the playlist populated in the source:


----------



## kingkong991 (Tuesday at 2:30 PM)

I can't install this plugin on OBS 29 (macos M1) anyone has this problem?


----------



## Exeldro (Tuesday at 4:26 PM)

I have not made a M1 version for this plugin yet


----------

