SageTV Community

SageTV Community (http://forums.sagetv.com/forums/index.php)
-   SageTV v7 Customizations (http://forums.sagetv.com/forums/forumdisplay.php?f=47)
-   -   Plugin: CommercialDetector (http://forums.sagetv.com/forums/showthread.php?t=49958)

tmiranda 08-01-2010 05:06 PM

Plugin: CommercialDetector
 
CommercialDetector is a SageTV7 plugin that automatically launches comskip after a show has recorded. It produces .edl files that can be read by the Comskip Playback plugin (which is automatically installed for you.)

I have been successfully using ComskipMonitor for a long time but thought it was time to make something more tightly integrated with SageTV7. Like ComskipMonitor this plugin is designed to be easy to configure and maintain and is aimed at users who simply want to run a commercial detection program on their recordings. if you want to do more sophisticated processing there are many other suitable solutions such as SageJobQueue (SJQ) and DirMon2.

This plugin comes equipped with the latest comskip (free version) and will work "out of the box".

The wiki contains detailed instructions on how to install and use the plugin:

http://code.google.com/p/tmiranda/wi...ercialDetector

Basic Installation:

* Make sure you are on a Placeshifter, Extender or the UI on the Sage server EVEN IF you normally access sage via a SageClient. If you have a SageClient you must also install the plugin on the SageClient, see below.

* Go to the plugin manager (Setup->SageTV Plugins->All Available Plugins) and select the "UI Mod" section (from the top row of choices.)

* Select the "CommercialDetector UI" plugin and install it.

* Go to Setup->Detailed Setup->Customize and look for "Comskip Playback Options" at the end of the list.

* From there you can configure the behavior and "look and feel" of the user interface.

* This plugin will automatically process all NEW recordings. If you have existing recordings that do not have comskip info you can process them all by selecting "Scan All Recordings Without comskip Info". See the Basic Configuration Options description below.

If your Sage server is running on Windows no further configuration is necessary.

See the wiki for more detailed information.

PLUCKYHD 08-01-2010 05:09 PM

Quote:

Originally Posted by tmiranda (Post 439753)
This space reserved.

Tease!!!:eek:

tmiranda 08-01-2010 05:41 PM

Quote:

Originally Posted by PLUCKYHD (Post 439754)
Tease!!!:eek:

That's because I have not figured out how to get the URL for a forum thread before it is submitted. Anyway, I did not tease you long.

49studebaker 08-01-2010 07:40 PM

Quote:

Originally Posted by tmiranda (Post 439753)
CommercialDetector is a SageTV7 plugin that automatically launches comskip after a show has recorded.

Would it be possible for you to add an option that disables comskipping on channels that do not have commercials? Thanks.

bialio 08-01-2010 07:55 PM

Another feature that you might want is to launch comskip while a recording is still going, rather than waiting until it's finished.

btl.

Fuzzy 08-01-2010 08:16 PM

Quote:

Originally Posted by bialio (Post 439779)
Another feature that you might want is to launch comskip while a recording is still going, rather than waiting until it's finished.

This is what I was going to suggest as well.

tmiranda 08-02-2010 04:38 AM

Those two things are already on the drawing board. Not comskipping some channels will be easy to do. Starting comskip as soon as a recording starts will take more work.

Ericft 08-02-2010 05:04 AM

I assume this version of comskip will not process .ts files from the HD PVR...if we have the donators version, where would we place that file so that those recordings can get comskipped as well?

tmiranda 08-02-2010 05:57 AM

Quote:

Originally Posted by Ericft (Post 439812)
I assume this version of comskip will not process .ts files from the HD PVR...if we have the donators version, where would we place that file so that those recordings can get comskipped as well?

You can place it anywhere you like, just make sure you configure the plugin and point it at the .exe and .ini you want to use. That's precisely why these options were included.

Alternatively you can just overwrite the version of comskip that comes with the plugin. The default comskip gets placed in INSTALLDIR\SageTV\SageTV\comskip. The .ini is very vanilla, the only things I changed was to set the verbose level to 0 and logo cleanup to 1.

Edit: I must retract this last statement. Overwriting anything in the comskip directory will cause a failure when the plugin is removed or updated. If you want to use an alternate comskip.exe or comskip.ini, place them in a different folder and configure the plugin to use those files instead of the default.

Tomahawk51 08-02-2010 06:57 AM

This is great...I was just looking at migrating out of Comskip Monitor to get concurrent sessions going. I think this is going to lower the barrier to setup by quite alot over the (albeit extremely powerful, but) more complicated SJQ.

Can't wait to try it.

Thank you.

tmiranda 08-02-2010 07:22 AM

Quote:

Originally Posted by Tomahawk51 (Post 439820)
I think this is going to lower the barrier to setup by quite alot over the (albeit extremely powerful, but) more complicated SJQ.

That is the idea. SJQ is an excellent piece of software and very powerful but it's an overkill for somebody who just wants to run comskip. My goal was to make this very easy to install and maintain.

slowpoke 08-02-2010 10:24 AM

I've never used comskip before - just never got around to setting up the required pieces so this is great. Can anyone tell me how much CPU is used and for how long after a recording? I'm trying to determine if Sage would still be usable while commercialdetector is running...

Thanks.

Fuzzy 08-02-2010 11:08 AM

comskip should run in a lower priority than sage, therefore it will only use 'spare' cpu. it shouldnt affect sages performance at all.

tmiranda 08-02-2010 11:18 AM

Yes, comskip runs at a lower priority so it should not choke your CPU. You are more likely to have hard drive throughput issues (and that is also rare) which is why the "Run Slower" option pauses after each frame is processed, it's to give the hard drives a break not the CPU.

The number of milliseconds comskip pauses after each frame can be changed in the .ini file, it just happens to default to 10ms.

I have an Intel E7300 (I think) C2D and it processes mpg files way faster than real-time. A 30 minute show takes maybe 10 minutes to process.

GKusnick 08-02-2010 11:41 AM

Quote:

Originally Posted by tmiranda (Post 439815)
Alternatively you can just overwrite the version of comskip that comes with the plugin.

But be aware that if you overwrite a file installed by a plugin, Sage will not remove the modified file when you uninstall the plugin. For clean uninstall, it's probably better to leave the plugin's files alone and put your alternate version somewhere else.

bcjenkins 08-02-2010 11:56 AM

Would that also include modifying the comskip.ini? Assuming it is based on some sort of md5 hash.

PS - Tom, I would enable your current comskip.ini to eschew the default txt file method and stick with EDL.

jptheripper 08-02-2010 12:20 PM

sorry for the noob question, but if we already have comskip working, do we have to disable anything to install this? dont want to double process files.

tmiranda 08-02-2010 01:59 PM

Greg - AFAIK Sage is not "aware" of the comskip directory at all. The comskip directory is packaged in a ZIP file along with the plugin .jar and is unzipped into the JARs directory upon installation. During the start() method I move the comskip directory to the sage install directory. My understanding is that Sage is only aware of the .jar file and not the comskip directory. Let me know if this is not true and if you have a better approach. I could not find a better way to get the plugin installer to put the comskip directory to where I wanted it to be.

bcjenkins - I tried putting output_txt=0 in the .ini but that did not work. What's the correct way to suppress the .txt file generation?

jptheripper - Unless you want to generate the .edl files twice you should uninstall/stop the current program you are using to launch comskip. If you are using ComskipMonitor just run the uninstall.bat file in the package.

GKusnick 08-02-2010 02:27 PM

Quote:

Originally Posted by tmiranda (Post 439910)
Greg - AFAIK Sage is not "aware" of the comskip directory at all. The comskip directory is packaged in a ZIP file along with the plugin .jar and is unzipped into the JARs directory upon installation. During the start() method I move the comskip directory to the sage install directory. My understanding is that Sage is only aware of the .jar file and not the comskip directory. Let me know if this is not true and if you have a better approach. I could not find a better way to get the plugin installer to put the comskip directory to where I wanted it to be.

If you look at filetracker.properties you'll see that Sage tracks all files extracted during plugin install so it can remove them later during plugin uninstall (assuming the MD5s haven't changed in the meantime). It does not do this for files created by the plugin during startup.

To install files directly into the SageTV\SageTV directory or into a custom subdirectory of it, use the Sys package type (with appropriate subdirectory paths in the zip). You do not have to have all your plugin files in one package; you can use a Jar package for the JARs and a Sys package for the comskip stuff, all within one plugin manifest.

bcjenkins 08-02-2010 03:06 PM

Quote:

Originally Posted by tmiranda (Post 439910)
bcjenkins - I tried putting output_txt=0 in the .ini but that did not work. What's the correct way to suppress the .txt file generation?

Code:

output_default=0


All times are GMT -6. The time now is 06:13 PM.

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