SageTV Community  

Go Back   SageTV Community > SageTV Development and Customizations > SageTV Customizations
Forum Rules FAQs Community Downloads Today's Posts Search

Notices

SageTV Customizations This forums is for discussing and sharing user-created modifications for the SageTV application created by using the SageTV Studio or through the use of external plugins. Use this forum to discuss customizations for SageTV version 6 and earlier, or for the SageTV3 UI.

Reply
 
Thread Tools Search this Thread Display Modes
  #1  
Old 02-20-2006, 12:00 AM
Jere_Jones's Avatar
Jere_Jones Jere_Jones is offline
Sage Fanatic
 
Join Date: Apr 2004
Location: Jacksonville, FL
Posts: 993
Arrow Utility: DirMon2

DirMon2 is now available! DirMon2 is a completely different program than the original DirMon so it doesn't suffer from the same flaws (i.e. it has completely new flaws).

What's new?
- It is now flexible beyond belief.
- Can run as a service (that is the prefered method now).
- Can run multiple jobs at the same time.
- Allows building of command line options with substitutions from the target filename.
- Most fields now accept Perl-style regular expressions.
- The order in which jobs are processed is now configurable.

Here are some important things you should know when you are setting it up:



When you click on the "New Button" you will be asked for a name. This name can be pretty much anything you want. Since it will be used in the Current Status tab so you can identify what is currently running and what is waiting to run.

The circled sections are the minimum sections that must be filled out for a job. What you see is a basic setup for running ShowAnalyzer.



Since the DirMon2 service isn't installed when DirMon2 is installed, you will need to install it manually via the "Install" button circled above. Anytime you want to change any of the service settings, you will need to click the uninstall and then click the install button to actually apply the settings. Of course you can also use the service management built into Windows.

A major change from the old DirMon is how deleting old files is handled. Now you can have different settings for different directories. These are managed in the "Clean up" section on the "Global Settings" tab. When you click on the "Add" button (circled above), you get the following dialog:



Fill it out and hit ok. It's that simple. One important thing is that the clean up descriptions are completely independent. So if you want to delete txt files when there isn't a mpg or an mpeg these have to be together. Otherwise any given txt file will get deleted by one cleanup or the other. Make sense? If not, let me know and I'll try to elaborate.

Now, the important step: SAVE YOUR SETTINGS!!


Now you can click on the "Start" button to start DirMon2 doing what it does.

You may be asking how you control how many jobs run at the same time. On the "Global Settings" tab there is a setting for the total number of resources available. Each job has a setting for the number of resources required. They default to 100 each so that only 1 job will run at a time. However, if you change the number of resources required, then you change how many jobs will run at once. For example, a job requiring 50 resources can have 2 jobs running at once if there are 100 resources available. Make sense? If not, let me know and I'll elaborate.

EDIT: It might be nice to let you know where to get it. Download it from here: http://www.dragonglobal.org/dirmon.htm

EDIT 2: Command Line Options Substitutions
The command line options block is a rather complicated creature.
First, if it is blank, then the target file name is added.
Example
Command Line Options:
Result: ShowAnalyzer X:/Directory/file.mpg
Second, if it is not blank, but does not have any of the substitution strings then the the target file name is put before what ever is put in the options block.
Example
Command Line Options: -status
Result: ShowAnalyzer X:/Directory/file.mpg -status
Third, if there are any substitution strings used then ONLY what is built from the options block is passed to the processor.
Example
Command Line Options: -i [[%FULLFILESPEC%]] -o [[%PATH%/%BASENAME%.avi]]
Result: ShowAnalyzer -i X:/Directory/file.mpg -o X:/Directory/file.avi

What are the substitution strings and what will the result be?
Code:
Example filename: D:/TV/Nova.mpg
%FULLFILESPEC% - D:/TV/Nova.mpg
%DRIVE% - D
%PATH% - D:/TV
%DIRECTORY% - TV
%BASENAME% - Nova
%EXTENSION% - mpg

Example filename: D:/Nova.mpg
%FULLFILESPEC% - D:/Nova.mpg
%DRIVE% - D
%PATH% - D:
%DIRECTORY% - 
%BASENAME% - Nova
%EXTENSION% - mpg

Example filename: //Media/TV/Nova.mpg
%FULLFILESPEC% - //Media/TV/Nova.mpg
%DRIVE% - //Media/TV
%PATH% - //Media/TV
%DIRECTORY% - 
%BASENAME% - Nova
%EXTENSION% - mpg

Example filename: //Media/TV/SageTV/Nova.mpg
%FULLFILESPEC% - //Media/TV/SageTV/Nova.mpg
%DRIVE% - //Media/TV
%PATH% - //Media/TV/SageTV
%DIRECTORY% - SageTV
%BASENAME% - Nova
%EXTENSION% - mpg
Additionally, anything contained within [[ ]]'s will be surrounded with quotes if necessary (i.e. there are any spaces). DO NOT NEST THEM!! Bad, bad things will happen if they are nested. If someone can come up with a possible use for nested quotes, then I'll look into supporting it. Until then, just don't do it.

Version History
0.5.0 - 19 Feb 2006
- Initial public release

0.5.1 - 21 Feb 2006
- Queued Jobs list now updates properly
- Added logging of when jobs start and end
- Process Subdirectories can now be turned off
- First line of Active Jobs list now displays the number of resources currently in use

0.5.2 - 22 Feb 2006
- Fixed crash when adding a directory when no ini file already exists.

0.5.3 - 5 Mar 2006
- Fixed typo in GUI
- Added "Allow interaction with desktop" setting
- Made changes to job search. Hopefully it will be more reliable.
- Passwords are now encrypted when they are saved in the ini file.

0.5.4 - 8 Mar 2006
- Fixed bug that would occasionally cause 100% cpu usage.

0.5.5 - 20 Apr 2006
- Added setting to adjust delay on drive idle check and file finished check.
- Fixed bug preventing custom command lines from working.
- Added DirMon2Hidden.exe for those of you that want to use DirMon2 in the same way as the original DirMon (i.e. NOT as a service)

0.5.6 - 20 Jun 2006
- Changed method used to determine if a file is being used or written to. Added "Wait until file is idle" option to reflect new methods.
- *NOTE* "Wait until file is finished" attempts to secure write access to the file in question. It will not write to or change the file in any way. Failure indicates the file is already being written to. Although this can also be caused by a program improperly setting access modes. (Windows Media Player is known to do this)
- *NOTE* "Wait until file is idle" attempts to secure delete access to the file in question. It will not delete the file. Failure indicates another program has the file open, either for reading or writing. Access restrictions to the directory can also cause this test to always flag.
- *NOTE* "Wait until drive is idle" checks the free space on the drive, waits for the number of seconds specified in the "Wait time" block, and then checks again. If the free space has decreased, then the drive is determined to be "In use".
- Added Process ID to the Active List.

0.5.7 - 26 Jun 2006
- An entry in the Activity Log will now be made when deleting a file.
- Fixed bug causing some files to never be found.
- Changed forward slashes to back slashes. (Happy?)

0.5.8 - 16 Jul 2006
- "Wait until file is idle" will now load correctly.
- Added entry in activity log for when the overseer starts and ends.
- Corrected error trapping in cleanup execution.
- Overseer shouldn't just stop anymore.

0.5.9 - 17 Jul 2006
- Jobs that are already running won't be added to the queue anymore.

0.6.0 - 4 Aug 2006
- Added another method to determine if the file is finished before running a job.

0.6.1 - 14 September 2006
- Added another method to determine if the job is finished. This should prevent jobs that crash from holding up the queue.

0.6.2 - 3 October 2006
- Potentially fixed race condition when a job stalls due to "Wait..." reasons.

0.6.3 - 27 December 2006
- Fixed a problem when trying to delete a file that was already deleted.

Enjoy,
Jere
__________________
Death to commercials!!!
Latest ShowAnalyzer Beta version: 0.9.7

Last edited by Jere_Jones; 12-27-2006 at 08:12 PM.
Reply With Quote
  #2  
Old 02-20-2006, 12:24 AM
DFA DFA is offline
Sage Expert
 
Join Date: Oct 2003
Location: Bakersfield
Posts: 638
Nice going Jere. Seems to be maturing and getting a professional polish to it. Very nice all-around utility.

DFA
__________________
Wrong information is worse than no information
Reply With Quote
  #3  
Old 02-20-2006, 12:59 AM
mightyt's Avatar
mightyt mightyt is offline
Sage Icon
 
Join Date: Jul 2004
Location: CA.
Posts: 1,293
You are awesome Jere!! ...

Thanks for continuing to improve an already great product ....

Haven't tried it yet ... but any rule of thumb on what to do if you have DirMon 0.2.5 installed already??

Upgrade over it?

or

Uninstall and Install DirMon2 0.5.0??

T.
Reply With Quote
  #4  
Old 02-20-2006, 01:08 AM
Jere_Jones's Avatar
Jere_Jones Jere_Jones is offline
Sage Fanatic
 
Join Date: Apr 2004
Location: Jacksonville, FL
Posts: 993
Quote:
Originally Posted by mightyt
Haven't tried it yet ... but any rule of thumb on what to do if you have DirMon 0.2.5 installed already??
DirMon and DirMon2 are completely different programs. Having one installed doesn't affect the other.

That said, I would recommend removing all traces of the, ahem, old DirMon before installing and running this one.

And, in case anyone is thinking about it, the settings from one can not transfer to the other.

Jere
__________________
Death to commercials!!!
Latest ShowAnalyzer Beta version: 0.9.7
Reply With Quote
  #5  
Old 02-20-2006, 01:20 AM
joe123 joe123 is offline
Sage Fanatic
 
Join Date: Jan 2006
Posts: 954
Nice Job!
Reply With Quote
  #6  
Old 02-20-2006, 01:33 AM
Jere_Jones's Avatar
Jere_Jones Jere_Jones is offline
Sage Fanatic
 
Join Date: Apr 2004
Location: Jacksonville, FL
Posts: 993
I have edited the first message to explain how the Command Line Options block works. It is another major improvement over the old, obsolete DirMon.

Jere
__________________
Death to commercials!!!
Latest ShowAnalyzer Beta version: 0.9.7
Reply With Quote
  #7  
Old 02-20-2006, 01:43 AM
Jere_Jones's Avatar
Jere_Jones Jere_Jones is offline
Sage Fanatic
 
Join Date: Apr 2004
Location: Jacksonville, FL
Posts: 993
Anyone who downloaded DirMon2 before I posted this message needs to redownload it. I forgot to un-hardcode the location of the service exe.

Jere
__________________
Death to commercials!!!
Latest ShowAnalyzer Beta version: 0.9.7
Reply With Quote
  #8  
Old 02-20-2006, 02:49 AM
sleonard's Avatar
sleonard sleonard is offline
Sage Icon
 
Join Date: Nov 2003
Posts: 1,506
Quote:
Originally Posted by Jere_Jones
Anyone who downloaded DirMon2 before I posted this message needs to redownload it. I forgot to un-hardcode the location of the service exe.

Jere
I just found that out! I just used regedit to search and modify the service location but I'll get the fixed version right away.
Reply With Quote
  #9  
Old 02-20-2006, 09:16 AM
heffe2001's Avatar
heffe2001 heffe2001 is offline
Sage Icon
 
Join Date: Mar 2004
Location: Conover, NC
Posts: 1,269
Just installed it and it seems to be working fine (is there anywhere it outputs a log file as to what it has done, etc?). Would it be too much to ask for DirMon to be able to talk to Neilm's Webserver, and use that for conditions in it's processor rules? I'm still looking for a way to process my TS in MPG wrapper files (and before anybody says just tell sage to do program streams, it doesn't work that way from firewire). I'd also like to be able to save certain shows in xvid format instead of mpg, those shows all being from certain channels. Could set a trigger that if a file is recorded from channel x, start the auto-gk routine (or even SA, then video-redo to strip commercials automatically, THEN compress).
__________________
Server: AMD Phenom 2 920 2.8ghz Quad, 16gb Ram, 4tb Storage, 1xHVR-2250, 1 Ceton Cable Card adapter, Windows 7 SP1
Reply With Quote
  #10  
Old 02-20-2006, 09:31 AM
Jere_Jones's Avatar
Jere_Jones Jere_Jones is offline
Sage Fanatic
 
Join Date: Apr 2004
Location: Jacksonville, FL
Posts: 993
Quote:
Originally Posted by heffe2001
Just installed it and it seems to be working fine (is there anywhere it outputs a log file as to what it has done, etc?).
No. You can see what it will do and what it is doing in the current status tab of the GUI. Just hit the refresh button. If you are requesting such a feature, then I can look into it.
Quote:
Originally Posted by heffe2001
Would it be too much to ask for DirMon to be able to talk to Neilm's Webserver, and use that for conditions in it's processor rules?
Yes. Besides adding an unbelievable amount of complexity, it would tie DirMon to SageTV, which is something I don't want to do.
Quote:
Originally Posted by heffe2001
I'm still looking for a way to process my TS in MPG wrapper files (and before anybody says just tell sage to do program streams, it doesn't work that way from firewire).
TS stream support is my current project (now that DirMon2 is out )
Quote:
Originally Posted by heffe2001
I'd also like to be able to save certain shows in xvid format instead of mpg, those shows all being from certain channels. Could set a trigger that if a file is recorded from channel x, start the auto-gk routine (or even SA, then video-redo to strip commercials automatically, THEN compress).
In theory, you could add a job that would query the webserver and create a trigger file. This would need another program that would do the querying and creating but such a program shouldn't be hard to write. Run it with a high priority boost and low resource usage and you should be good to go.

I'm thinking of something along the lines of creating a small utility that would create something like BatmanBegins.501 if BatmanBegins.mpg was recorded on channel 501. Another option would be creating BatmanBegins.xvidme if BatmanBegins.mpg matches some sort of criteria.

Just an idea.

Jere
__________________
Death to commercials!!!
Latest ShowAnalyzer Beta version: 0.9.7
Reply With Quote
  #11  
Old 02-20-2006, 09:41 AM
Bohica's Avatar
Bohica Bohica is offline
Sage Advanced User
 
Join Date: Mar 2005
Posts: 218
Quote:
Originally Posted by Jere_Jones
TS stream support is my current project (now that DirMon2 is out )
Jere
Just out of curiosity -- can someone point me to the ts wrapper issue in other threads here? I am curious because I create and play ts files through sage all the time. Wondering what the benefit of a wrapper is??
Reply With Quote
  #12  
Old 02-20-2006, 11:26 AM
perfessor101 perfessor101 is offline
Sage Advanced User
 
Join Date: Nov 2003
Location: Vancouver, British Columbia, Canada
Posts: 246
Are mapped network drives supported?

Hello, I was just curious as to whether or not mapped network drives are supported by dirmon2 ?

Thanks for your time,

Bobby
Reply With Quote
  #13  
Old 02-20-2006, 11:56 AM
Jere_Jones's Avatar
Jere_Jones Jere_Jones is offline
Sage Fanatic
 
Join Date: Apr 2004
Location: Jacksonville, FL
Posts: 993
Quote:
Originally Posted by perfessor101
Hello, I was just curious as to whether or not mapped network drives are supported by dirmon2 ?
While I haven't tried it, I have no reason to suspect it won't. I have tested it thoroughly with UNC paths so I know it does fine over a network.

There is one catch: you have to have DirMon run as a user. Otherwise the drives won't be mapped. You also need to make sure that the user has the "Log on as a service" right. It is not automatically granted to even administrators so you need to make sure you add it. (Google for "Log on as a service" for specific instructions for your operating system)

I'm curious to know how it goes for you.

Jere
__________________
Death to commercials!!!
Latest ShowAnalyzer Beta version: 0.9.7
Reply With Quote
  #14  
Old 02-20-2006, 12:34 PM
malbec malbec is offline
Sage Aficionado
 
Join Date: Oct 2005
Posts: 331
Jere you are awesome, you should charge for this as well.

Now, for someone who knows just enough about PC to be dangerous, is this possible, and if so, can someone point me to it/layout what I need to do?

I am looking for a script/DirMon2 setup that will re-encode my recordings to dvix or xivd and then delete the Mpeg file when done all without any loss of features in Sage (recording information). Kind of a pieced together "showsqueeze"
Reply With Quote
  #15  
Old 02-20-2006, 01:48 PM
evilpenguin's Avatar
evilpenguin evilpenguin is offline
SageTVaholic
 
Join Date: Aug 2003
Location: Seattle, WA
Posts: 3,696
Wow, Dirmon2 looks great, i'll have to play around with that this week. Thanks Jere
Reply With Quote
  #16  
Old 02-20-2006, 02:30 PM
heffe2001's Avatar
heffe2001 heffe2001 is offline
Sage Icon
 
Join Date: Mar 2004
Location: Conover, NC
Posts: 1,269
Quote:
Originally Posted by Bohica
Just out of curiosity -- can someone point me to the ts wrapper issue in other threads here? I am curious because I create and play ts files through sage all the time. Wondering what the benefit of a wrapper is??
What I ment by wrapper is, with the Firewire HD recorder, your files are dropped as a TS file, with a mpg extension. It's still just a TS file, just has a different extension. BUT it did play havoc with SA until TS detection was added a couple versions back. SA would hang when it hit a TS as MPG file, and you had to manually create a 0-byte .txt file to get it to go past it.

Since TS decoding is being worked on now, I can always just wait for it . I'd say I get better detection of commercials on my SD content with SA than I do on my HD content with comskip anyway (last couple times I used it, comskip was completely wrong about commercials in the shows I ran it on).

I tried changing my graph on the firewire capture to one that converted the TS to a PS, but never had much luck with it (lots of crashes, and it's plugged into my server, so not the best place to be playing with something like that ).
__________________
Server: AMD Phenom 2 920 2.8ghz Quad, 16gb Ram, 4tb Storage, 1xHVR-2250, 1 Ceton Cable Card adapter, Windows 7 SP1
Reply With Quote
  #17  
Old 02-20-2006, 02:35 PM
Stuntman's Avatar
Stuntman Stuntman is offline
Sage Fanatic
 
Join Date: Dec 2003
Location: Hemet, CA - USA
Posts: 784
Quote:
Originally Posted by Jere_Jones
You may be asking how you control how many jobs run at the same time. On the "Global Settings" tab there is a setting for the total number of resources available. Each job has a setting for the number of resources required. They default to 100 each so that only 1 job will run at a time. However, if you change the number of resources required, then you change how many jobs will run at once. For example, a job requiring 50 resources can have 2 jobs running at once if there are 100 resources available. Make sense? If not, let me know and I'll elaborate.
Please elaborate..



I can't seem to get anything out of the queue and actually run! To run 2 instances of ShowAnalyzer what would we need do? Create two identical jobs in the 'job management' screen and set the 'when' field to 50? The resources available in the global settings vs. the resources required.. what is the difference?

Resources available.. is that a % of free CPU that SA can use? So if I put it to 100% that means SA can use 100% of free CPU cycles?
Resources required.. is this a setting per job to dictate how much of the 'available' resources each job can use?

Currently I have two shows in the queue, but neither is starting..

Thanks!
Reply With Quote
  #18  
Old 02-20-2006, 03:29 PM
Jere_Jones's Avatar
Jere_Jones Jere_Jones is offline
Sage Fanatic
 
Join Date: Apr 2004
Location: Jacksonville, FL
Posts: 993
Quote:
Originally Posted by Stuntman
Please elaborate..



I can't seem to get anything out of the queue and actually run! To run 2 instances of ShowAnalyzer what would we need do? Create two identical jobs in the 'job management' screen and set the 'when' field to 50? The resources available in the global settings vs. the resources required.. what is the difference?

Resources available.. is that a % of free CPU that SA can use? So if I put it to 100% that means SA can use 100% of free CPU cycles?
Resources required.. is this a setting per job to dictate how much of the 'available' resources each job can use?

Currently I have two shows in the queue, but neither is starting..

Thanks!
Step 1 in troubleshooting would be to hit the "Validate Job" button. It will look for anything fishy. What did it say?

Step 2 would be making sure that DM2 is running. On the Global Settings page what is the "Current Status"?

Step 3 would be.... um.... one of those two should point us in the right direction.

Regarding the resources questions: Resources available is just some arbitrary number. It could easily be 1000000 or 1 or 10. I choose 100 because it seemed to make sense. Resources required is how many of those resources need to be available before the job can run. DM2 just keeps count of how many "resources" are in use. It is just a number with no real meaning. When DM2 kickes of a job then the "count" goes up by the "Resources Required" setting. When a job finishes then the count is reduced. If a job requires the count to go above the "Resources Available" number, then DM2 waits until the "count" has dropped sufficently.

You don't need to create identical jobs. DM2 will (well... should) kick off as many instances as it can.

Jere
__________________
Death to commercials!!!
Latest ShowAnalyzer Beta version: 0.9.7
Reply With Quote
  #19  
Old 02-20-2006, 03:39 PM
Stuntman's Avatar
Stuntman Stuntman is offline
Sage Fanatic
 
Join Date: Dec 2003
Location: Hemet, CA - USA
Posts: 784
Quote:
Originally Posted by Jere_Jones
Step 1 in troubleshooting would be to hit the "Validate Job" button. It will look for anything fishy. What did it say?

Step 2 would be making sure that DM2 is running. On the Global Settings page what is the "Current Status"?

Step 3 would be.... um.... one of those two should point us in the right direction.

Regarding the resources questions: Resources available is just some arbitrary number. It could easily be 1000000 or 1 or 10. I choose 100 because it seemed to make sense. Resources required is how many of those resources need to be available before the job can run. DM2 just keeps count of how many "resources" are in use. It is just a number with no real meaning. When DM2 kickes of a job then the "count" goes up by the "Resources Required" setting. When a job finishes then the count is reduced. If a job requires the count to go above the "Resources Available" number, then DM2 waits until the "count" has dropped sufficently.

You don't need to create identical jobs. DM2 will (well... should) kick off as many instances as it can.

Jere
Step one says: "No Problem Found"
Step two status is a green: "Started"
Step three... well.. see the above two..

I tried changing the run as from local system to admin.. and back.. didn't make any difference as Dirmon seems to start just fine.. the queue keeps getting bigger, as it seems to be finding things to run.. just doesn't seem to be running them.. I thought once, for just a second (not even that long) I saw a show pop into the 'active' area in the gui, but it vanished so fast that I can't be sure it was ever there...
Reply With Quote
  #20  
Old 02-20-2006, 03:47 PM
jlabrue jlabrue is offline
Sage Aficionado
 
Join Date: Feb 2005
Posts: 320
Quote:
Originally Posted by Stuntman
Please elaborate..



I can't seem to get anything out of the queue and actually run! To run 2 instances of ShowAnalyzer what would we need do? Create two identical jobs in the 'job management' screen and set the 'when' field to 50? The resources available in the global settings vs. the resources required.. what is the difference?

Resources available.. is that a % of free CPU that SA can use? So if I put it to 100% that means SA can use 100% of free CPU cycles?
Resources required.. is this a setting per job to dictate how much of the 'available' resources each job can use?

Currently I have two shows in the queue, but neither is starting..

Thanks!
I will concur that it has a job in queue but nothing is happening. Validate checks out as well. Old DirMon worked fine. Here are some prints of my settings. (Don't laugh at the Desperate Housewives epsiode :-)

I like the new layout as well!

dirmon1.jpg

dirmon2.jpg

dirmon3.jpg
Reply With Quote
Reply


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT -6. The time now is 01:04 PM.


Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2023, vBulletin Solutions Inc.
Copyright 2003-2005 SageTV, LLC. All rights reserved.