SageTV Community  

Go Back   SageTV Community > SageTV Development and Customizations > SageTV Customizations

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
  #301  
Old 04-11-2009, 08:53 PM
awhenry awhenry is offline
Sage User
 
Join Date: Aug 2008
Location: Old Town, ME, US
Posts: 39
Comskip Monitor with batch file execution

Someone recently asked me if how difficult it would be to hack comskip monitor so it could run batch files, as he wanted to be able to run ccextractor on his video files. As sometimes happens, I was sort of interested in the same thing, having tried the built-in support for CC extraction in comskip and found it lacking (not that I'm complaining, it isn't really the comskip wheelhouse).

At any rate, in the continuing vein of comskip monitor feature additions that almost nobody will be interested in, I have created a version that will run an arbitrary batch file after it runs comskip/showanalyzer on a file (or concurrently if you use the multithreading). Along with the updated csm.jar file, I included a sample batch file in the zip that I have been using to run ccextractor on my own recordings. The batch file includes some rambling notes that you might be interested in if you want to write your own batch file, or even if you just want to use the sample batch file, since you will need to edit it slightly (ccextractor path) for your setup.

Note that, as before, I have not tried to include the new features in the configuration gui, so you will need to edit your properties file by hand to make use of them. If you install this csm.jar without editing your csm.properties file, comskip monitor should work just like the original version (well, actually it defaults to two threads if the config is missing, but is otherwise identical). As always, though, backup your current version before installing just in case.

Here is the install info (also included in the zip):

To install:

1) Stop the CSM service either through the service manager or via the command line ("net stop CSM").

2) Open the folder where Comskip Monitor is installed, and go to the "Data" subfolder.

3) Rename the existing csm.jar file to something else, say csm.jar.original

4) Copy the csm.jar contained in this zip to this folder

5) Move back up to the Comskip Monitor install folder root

6) Edit the csm.properties file in any text editor, such as notepad.
Add the following items, replacing fields in <angle brackets> with the value you prefer:

Code:
#Maximum number of files to process concurrently
max.threads=<number>

#Whether or not to scan subdirectories of directories specified in the file.directories property
recurse.subdirectories=<true or false>

#Directories to skip processing of, useful when recurse.subdirectories is set to true.  Same format as file.directories property
skip.directories=<one or more directories, comma seperated>

#File extensions to delete when the video file is deleted.  Unlike extensions listed in the cleanup.file.extensions property, 
# existence of files with these extensions will not prevent processing of a video file. Useful if you have supporting files for videos
# (say subtitles) generated by a different process that you want deleted automatically when the video file is deleted.
# Same format as for cleanup.file.extensions property
extra.cleanup.only.file.extensions=<one or more file extensions, comma seperated>

#Location of batch file you want to run in addition to comskip/showanalyzer
# For instance ../csm.bat for a batch file named csm.bat located in the same directory as the comskip folders
bat.location=<location of batch file>

#The batch file must generate one or more file types that are distinct from the ones comskip/showanalyzer creates.
# This is how comskip monitor knows when the batch file needs to be run on a video file.
# The files generated by the batch file must have the same file name as the video file, differing
# only by the file extension.  List the extensions your batch file generates here using the same syntax 
# as used for cleanup.file.extensions
# See the included csm.bat file for an example batch file that runs ccextractor (ccextractor is not included
# and must be obtained seperately for the example batch to function properly).  Details are included in the
# batch file (read it in a text editor, such as notepad).
bat.cleanup.extensions=<one or more file extensions, comma separated>

#Set this to yes if you want your batch file to run while the program is still recording.
# If you want it to run after the recording ends, set this to no
execute.during.record.bat=<yes or no>
7) Restart the CSM service either through the service manager or via the command line ("net start CSM").
Attached Files
File Type: zip csm.zip (45.9 KB, 265 views)
Reply With Quote
  #302  
Old 04-11-2009, 09:58 PM
MitchSchaft MitchSchaft is offline
Sage Expert
 
Join Date: Jan 2008
Posts: 717
Bagavant's dvrmsToolbox will do batch files.
Reply With Quote
  #303  
Old 05-05-2009, 01:25 PM
MavRic MavRic is offline
Sage User
 
Join Date: Jul 2008
Posts: 60
Multiple Live Recording

Hi All,

i've been using SageTv with SageMC GUI for almost a year now and i'm very happy with it.

For about half a year i've been using Comskip including having it do the live TV.

Generally it seems to work well, but it will only analyize 1 show at a time. So if we're watching 1 show live (but tune in late to skip the commericials) any other shows being recording are not analyzed. It seems they are marked somehow because they're also not analyized at a later time.

I'm now ready to add another tuner card making a total of 4 tuners and I'd like to be able to have it work live on multiple recordings/channels.

My setup uses HD extenders only and i have a 3ghz CPU/2GB RAM, so i think the machine can analyzing multiple recordings.

If anybody can point me in the right direction it would be much appreciated.
Reply With Quote
  #304  
Old 05-06-2009, 05:31 AM
hemicuda's Avatar
hemicuda hemicuda is offline
Sage Icon
 
Join Date: May 2006
Location: north of Chattanooga, Tennessee
Posts: 1,117
There is a csm.jar that has been recompiled to start multiple instances of comskip.exe

If you'll look up this thread to post #262 you should have all the answers you need; although I'm not sure how it'll react to MC (just noticed you use that UI).
__________________
Server: MS Win7 SP1; FX8350 (H2O cooled); 8GB RAM; Hauppauge HVR-2250 (OTA); HVR-1800 (OTA); SageTV 9.1.5.x; 12+TB Sage Storage

Clients: HD300 x2; HD200 x2; Placeshifter

Service: EPB Fiber (1Gb); OTA (we "cut the cord"); Netflix, Hulu, etc.

Last edited by hemicuda; 05-06-2009 at 05:36 AM. Reason: wrong post #
Reply With Quote
  #305  
Old 09-17-2009, 11:58 PM
natrlhy natrlhy is offline
Sage User
 
Join Date: Aug 2006
Posts: 70
I've been getting a lot of comskip.exe crashes lately so I went to update Comskip and Comskip Monitor. When I run through the setup.bat web based setup, when I try to point it to my comskip.exe file I see this:

Comskip Monitor Configuration
Invalid Comskip File

There is no way around it and I'm pointing it to the correct location.

Running SageTV 6.6.2

I'm also getting this:

A directory specified in csm.properties "file.directories" attribute is invalid.
Please update csm.properties with valid video file directories, and then uninstall and reinstall ComskipMonitor.

Last edited by natrlhy; 09-18-2009 at 12:07 AM.
Reply With Quote
  #306  
Old 09-18-2009, 05:26 AM
tmiranda's Avatar
tmiranda tmiranda is offline
SageTVaholic
 
Join Date: Jul 2005
Location: Central Florida, USA
Posts: 5,842
Did you run the "uninstall.bat" file before making the changes? It sounds like you still have one instance running adn you are starting another.

The "invalid directory" message is caused by trying to scan files in a directory that does not exist. Check the setup to make sure you have it pointed to the right place.
__________________

Sage Server: 8th gen Intel based system w/32GB RAM running Ubuntu Linux, HDHomeRun Prime with cable card for recording. Runs headless. Accessed via RD when necessary. Four HD-300 Extenders.
Reply With Quote
  #307  
Old 09-18-2009, 11:15 AM
natrlhy natrlhy is offline
Sage User
 
Join Date: Aug 2006
Posts: 70
I just ran uninstall.bat two times. The second time I see this so I am assuming there are no other instances running or configured:

wrapper | The CSM service is not installed - The specified service does not exi
st as an installed service. (0x424)
Press any key to continue . . .

I still get the "invalid directory" message.

Here is my csm.properties file:

#csm.properties
#Fri Sep 18 10:13:49 PDT 2009
time.between.checks=20
comskip.config=../comskip80_023/comskip.ini
process.file.extensions=.mpg, .avi
execute.during.record=yes
slow.hours=12, 11, 10, 16, 15, 14, 13, 8, 9
related.file.extensions=
comskip.parameters=
file.directories=D\:\\Sage Recordings
exclude.hours=
comskip.location=../comskip80_023/comskip.exe
cleanup.file.extensions=.txt,.log,.edl

And D:\Sage Recordings does exist.
Reply With Quote
  #308  
Old 09-19-2009, 01:11 AM
natrlhy natrlhy is offline
Sage User
 
Join Date: Aug 2006
Posts: 70
I've tried everything to resolve the "invalid directory" error that has suddenly popped up after running ComskipMonitor for many many months.

I've got DirMon2 installed and it is now processing 14 shows. This guide to setup DirMon2 was VERY helpful:

http://www.dragonglobal.biz/forums/d...p-dirmon2.html
Reply With Quote
  #309  
Old 09-21-2009, 08:15 PM
mattdcknsn's Avatar
mattdcknsn mattdcknsn is offline
Sage Aficionado
 
Join Date: Mar 2005
Location: Leesburg, VA
Posts: 338
Quote:
Originally Posted by natrlhy View Post
I've been getting a lot of comskip.exe crashes lately so I went to update Comskip and Comskip Monitor. When I run through the setup.bat web based setup, when I try to point it to my comskip.exe file I see this:

Comskip Monitor Configuration
Invalid Comskip File
Hey, just started getting this with the latest donated build of comskip (First time I have used this version). I had to go into the csm.properties file and manually edit the directory locations for comskip.exe and comskip.ini.

Once I did that I fired it up and it works just fine. So far. Once it gets done processing a file I'll see how good it worked.
Reply With Quote
  #310  
Old 01-14-2010, 08:46 AM
jhh jhh is offline
Sage Advanced User
 
Join Date: Nov 2003
Location: BE
Posts: 196
Quote:
Originally Posted by awhenry View Post
Someone recently asked me if how difficult it would be to hack comskip monitor so it could run batch files, as he wanted to be able to run ccextractor on his video files.
hm - similar situation here - I would like to use projectX to extract teletext subtitles from .ts files. Challenge is that I must be doing something wrong in the csm.properties as it looks like my batch file is not running at all.

Is someone running an additional process like this and would you be so kind to post a sample .properties ?

many thanks,
Jan
Reply With Quote
  #311  
Old 01-14-2010, 10:08 AM
erik erik is offline
Sage Aficionado
 
Join Date: May 2005
Posts: 467
I added a lot of the ccextractor functionality to comskip.
YOu can enable cc extraction functionality in the comskip.ini file.
Some people report it to be working.
Other struggle.
__________________
Support Comskip, visit the forum and donate at http://www.comskip.org/
Reply With Quote
  #312  
Old 01-14-2010, 10:11 AM
MitchSchaft MitchSchaft is offline
Sage Expert
 
Join Date: Jan 2008
Posts: 717
How can I get it to run on individual files? I have a few tv shows that didn't get scanned 'cause I had comskip shut off at the time.
Reply With Quote
  #313  
Old 01-15-2010, 08:10 AM
erik erik is offline
Sage Aficionado
 
Join Date: May 2005
Posts: 467
Drag and drop the recordings one by one on comskip.exe
__________________
Support Comskip, visit the forum and donate at http://www.comskip.org/
Reply With Quote
  #314  
Old 01-15-2010, 08:45 AM
MitchSchaft MitchSchaft is offline
Sage Expert
 
Join Date: Jan 2008
Posts: 717
Wow, that couldn't be more easy . I'm a donar, btw
Reply With Quote
  #315  
Old 01-15-2010, 11:31 AM
Phydeaux Phydeaux is offline
Sage Advanced User
 
Join Date: Aug 2008
Posts: 222
I have a question related to Comskip or Comskip Monitor, perhaps related to SageMC, but I doubt it as my symptom is the same using the default SVT:

Shortly after a recording stops, the recording disappears from the Recent Recordings view. I'm guessing Comskip has found the recording and kicked off Comskip to process the file. But why can't I watch the recording while it's being processed? And why would it take 90-120 minutes for the recording to show up again in the list (especially when it's a 1/2 hour show)? The computer not lacking resources.

Any ideas?

RLW
Reply With Quote
  #316  
Old 04-25-2010, 05:25 PM
mtyme mtyme is offline
Sage Advanced User
 
Join Date: Jan 2007
Posts: 98
I just did a server reinstall and am trying to get CSM working again. However when I try to run setup, I never get past the jetty initialization because it's trying to start up a web service on port 8181 which is in use by an already existing jetty installation which is running bmt, sagealert and the sage webserver.

How do I fix this?
Reply With Quote
  #317  
Old 05-22-2010, 10:48 PM
avogodro avogodro is offline
Sage User
 
Join Date: Apr 2010
Posts: 9
I am trying to get this figured out... I tried to install this and I get the same error that vtac got....

'java' is not recognized as an internal or external command,
operable program or batch file.
The Comskip Monitor service is starting.
The Comskip Monitor service could not be started.

A system error has occurred.

System error 1067 has occurred.

The process terminated unexpectedly.

Press any key to continue . . .

I went in and added the environmental variables... I still get the error... I see that I need both versions of JAVA installed. Does this mean that I need java service wrapper installed too? I tried to get this program and have been unsuccessful in finding it for free. I found a trial and it states it costs $60 on the site. Is this the same java service wrapper that is required? Also what am I supposed to do with the jetty software? Excuse my ignorance.
Thanks
Avogodro.
Reply With Quote
  #318  
Old 05-23-2010, 03:37 AM
tmiranda's Avatar
tmiranda tmiranda is offline
SageTVaholic
 
Join Date: Jul 2005
Location: Central Florida, USA
Posts: 5,842
I'm not sure where you went wrong, CSM should be really simple to install and it does not require any special software. Just make sure you have the Java Runtime installed (which you will have if you installed Sage), unzip to your c:\Program Files\ directory and double click setup.bat.

If it's not working properly there is probably something wrong with your Java install. I'd try uninstalling Java and then reinstalling it.
__________________

Sage Server: 8th gen Intel based system w/32GB RAM running Ubuntu Linux, HDHomeRun Prime with cable card for recording. Runs headless. Accessed via RD when necessary. Four HD-300 Extenders.
Reply With Quote
  #319  
Old 06-04-2010, 01:22 PM
mayamaniac's Avatar
mayamaniac mayamaniac is offline
Sage Icon
 
Join Date: May 2004
Posts: 2,177
I haven't used comskip for a while. Back then, my SageTV server was too under powered to run comskip, so I stopped using it. Later on, I upgraded the server hardware but still avoided comskip because it couldn't do HD-PVR files.

Now that I installed it and using it, all I can say is WOW! It's working great so far. It crunched through my recordings in a day. The little donation for comskip.exe was well worth it. And CSM is really easy to install and configure. Thanks to all the hard working developers.

By the way, how do I get comskip icons to show up on the Web Server?
__________________
Mayamaniac

- SageTV 7.1.9 Server. Win7 32bit in VMWare Fusion. HDHR (FiOS Coax). HDHR Prime 3 Tuners (FiOS Cable Card). Gemstone theme.
- SageTV HD300 - HDMI 1080p Samsung 75" LED.
Reply With Quote
  #320  
Old 07-23-2010, 04:59 PM
Gabriel Gabriel is offline
Sage User
 
Join Date: May 2006
Posts: 20
I have been a happy user of CSM for a long time. I had to recover my PC from a disc crash and now I am going crazy trying to start CSM and failing with the error 1067. I configured it to DEBUG and get the following error:

INFO | jvm 1 | 2010/07/23 19:27:01 | WrapperSimpleApp: invoking main method
INFO | jvm 1 | 2010/07/23 19:27:01 | Starting Monitor
INFO | jvm 1 | 2010/07/23 19:27:01 |
INFO | jvm 1 | 2010/07/23 19:27:01 | WrapperSimpleApp: Encountered an error running main: java.lang.NullPointerException
INFO | jvm 1 | 2010/07/23 19:27:01 | java.lang.NullPointerException
INFO | jvm 1 | 2010/07/23 19:27:01 | at ComskipMonitor.getFiles(ComskipMonitor.java:173)
INFO | jvm 1 | 2010/07/23 19:27:01 | at ComskipMonitor.execute(ComskipMonitor.java:76)
INFO | jvm 1 | 2010/07/23 19:27:01 | at ComskipMonitor.main(ComskipMonitor.java:42)
INFO | jvm 1 | 2010/07/23 19:27:01 | at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
INFO | jvm 1 | 2010/07/23 19:27:01 | at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
INFO | jvm 1 | 2010/07/23 19:27:01 | at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
INFO | jvm 1 | 2010/07/23 19:27:01 | at java.lang.reflect.Method.invoke(Unknown Source)
INFO | jvm 1 | 2010/07/23 19:27:01 | at org.tanukisoftware.wrapper.WrapperSimpleApp.run(WrapperSimpleApp.java:292)
INFO | jvm 1 | 2010/07/23 19:27:01 | at java.lang.Thread.run(Unknown Source)

Can somebody please help me out? I tried uninstalling/reinstalling java several times. Still the same problem. I am attaching the full log.
Thanks!
Attached Files
File Type: txt wrapper.txt (7.5 KB, 145 views)
Reply With Quote
Reply


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

Advanced Search
Display Modes

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 07:02 AM.


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