Jump to content

Scan specific directory at specific intervals.


clarkss12

Recommended Posts

clarkss12

I have a security cam that creates two folders each day (AM and PM), and creates a short duration of a detected motion, video.

 

I have added that location to my library, but Emby doesn't scan that location very often.  I am not sure what or where to set the library scanning option.

 

I don't know if it is possible, but I would like Emby to scan a specific directory at specific intervals, say once every half hour..

 

thanks

 

Attached photos to help explain what I am talking about.

 

post-38990-0-69398600-1545667188_thumb.jpg   post-38990-0-71449600-1545667196_thumb.jpg   post-38990-0-10538900-1545667204_thumb.jpg

Link to comment
Share on other sites

clarkss12

You probably tried this, but did you enable the “real time monitoring” option in the advanced options of that media folder?

 

246afb5347d23cf7135b981da1c6e952.jpg

Thanks for your answer, that was what I was looking for.  But, just checked and it was already set for real time monitoring.. That should have been the solution, but did not work.  Right now, (9:45 am), it only has one video at recorded at midnight.  When I do a manual update, all the recordings show up.........

Link to comment
Share on other sites

Just curious, what Media Library content type are you using? I have no problem with this on Mixed Content, anytime I add something it gets added usually within a few minutes.

  • Like 1
Link to comment
Share on other sites

Same thing for me, it usually detects changes right away.

 

Maybe it’s OS related?

 

What OS are you running and are those files stored on the same computer the server is running on?

Link to comment
Share on other sites

thelanranger

I would VERY much appreciate this feature as well. I think it feels like good practice in general.

 

The "update interval" should be a function of the individual library and not the entire server I believe. Fundamentally because (in my case I have always had this issue) if a user has one or two libraries with a large number of items (Music libraries or Home Movies) that remain primarily static, the scan time will take a lot of time. If they have other libraries that are frequently updated (like current TV episodes) they may want the full scrape done frequently so the UI shows proper data in real time. I would rather let the system run the full nightly task of cache clear/scrape/update everything on a single library maybe every 15-30 mins (because it will only take 20-30 seconds) but only run it on a static library once a week (because it will take hours).

 

It just seems like this feature (and general practice) sets the back end up to be more 'update friendly' as well. If the devs release a new version that needs to run an update to the libraries in some manner, this task could be executed as individual tasks and not as one huge lengthy task.

  • Like 1
Link to comment
Share on other sites

clarkss12

Just curious, what Media Library content type are you using? I have no problem with this on Mixed Content, anytime I add something it gets added usually within a few minutes.

I used Mixed Content.

Link to comment
Share on other sites

clarkss12

Same thing for me, it usually detects changes right away.

 

Maybe it’s OS related?

 

What OS are you running and are those files stored on the same computer the server is running on?

My server is running on a microPC running windows 10.  The NVR (security cam recorder) is running on my Synology NAS, so the files that are created are on that NAS.

Link to comment
Share on other sites

clarkss12

Same thing for me, it usually detects changes right away.

 

Maybe it’s OS related?

 

What OS are you running and are those files stored on the same computer the server is running on?

My security cam NVR is creating a new video file approximately every few minutes.

Link to comment
Share on other sites

My server is running on a microPC running windows 10. The NVR (security cam recorder) is running on my Synology NAS, so the files that are created are on that NAS.

My guess is that the “watch folder” feature only works on folders that are physically on the same machine. Remote folders probably have to be scanned.

 

You could set the system to scan those folders more often, but that can get a bit CPU intensive .

 

Go to “scheduled tasks” in the server settings and change the “scan media library” settings.

 

Hope that helps.

Link to comment
Share on other sites

  • 4 years later...
On 12/26/2018 at 9:53 PM, thelanranger said:

The "update interval" should be a function of the individual library and not the entire server I believe. Fundamentally because (in my case I have always had this issue) if a user has one or two libraries with a large number of items (Music libraries or Home Movies) that remain primarily static, the scan time will take a lot of time. If they have other libraries that are frequently updated (like current TV episodes) they may want the full scrape done frequently so the UI shows proper data in real time. I would rather let the system run the full nightly task of cache clear/scrape/update everything on a single library maybe every 15-30 mins (because it will only take 20-30 seconds) but only run it on a static library once a week (because it will take hours).

I was told to bring this feature request back up. I have the exact setup lanranger mentioned.

The TLDR of this post is that I would like to have a scheduled scan task per library because 2 libraries only need to be scanned at application startup (and then idle down) but the 3rd library needs live monitoring.  The problem is that when I enable real time monitoring for my "always on" library, emby will basically DOS (denial-of-service) the server.

CPU:  51% usr   9% sys   0% nic  37% idle   1% io   0% irq   0% sirq
Load average: 0.96 0.94 0.84 
54% /system/EmbyServer -programdata /config -ffdetect /bin/ffdetect -ffmpeg /bin/ffmpeg -ffprobe /bin/ffprobe -restartexitcode 3

When I simply disable "enable real time monitoring" for that library and setup a scheduled task to scan my library at 1 minute intervals, the server load decreases immensely.

CPU:   0% usr   0% sys   0% nic  98% idle   0% io   0% irq   0% sirq
Load average: 0.14 0.20 0.22 
0% /system/EmbyServer -programdata /config -ffdetect /bin/ffdetect -ffmpeg /bin/ffmpeg -ffprobe /bin/ffprobe -restartexitcode 3

 

The new problem that this creates is that my large archived static libraries on my 6TB drives will always be spinning now and not idling down like they do when I schedule my library scans for startup only and have my smaller library drive set to real time monitoring. 

My request is If I could keep my scheduled task to scan my entire library at startup but also have a scheduled interval scan setup only for the smaller "always on" library so my large archive libraries can idle down instead of spinning 24/7.

Everything works as it should when I use the "real time monitoring" feature only for my smaller archive but running my emby server under load just for this single feature is not preferable.

Link to comment
Share on other sites

Quote

The problem is that when I enable real time monitoring for my "always on" library, emby will basically DOS (denial-of-service) the server.

@kufkis are your folders constantly being written to?

Link to comment
Share on other sites

No. It's a mixed content Download folder so It's only updated whenever I download something new. 

I have a program that operates outside of these folders to download files and only moves the completed downloads to this Download folder and goes silent if nothing is being downloaded.

Link to comment
Share on other sites

1 hour ago, kufkis said:

No. It's a mixed content Download folder so It's only updated whenever I download something new. 

I have a program that operates outside of these folders to download files and only moves the completed downloads to this Download folder and goes silent if nothing is being downloaded.

OK, please open a new topic about the behavior you experience with the realtime monitor and we'll take a look at it. Thanks.

  • Like 1
Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...