How-To use Comskip to cut out commercials via MediaPortal (1 Viewer)

WalkmanAA

Portal Pro
January 5, 2007
85
3
Home Country
United States of America United States of America
Also, just out of interest... I'm considering writing a TV3 plugin based on the ComSkip Launcher but for general post-processing of recordings. Basically, it could be used to convert recordings into DivX or run Comskip or things like that... some sort of scripted actions... And it would be rules-based, so you could filter by channels or recording types and things like that ... I haven't started and I'm quite busy with other things, but maybe in the next month or so I'll get onto it ... so that might be of some interest to the comskip crowd too ...

I would love a plugin like that. It would be nice to have recordings automatically commercial scanned and then cut and transcoded to xvid. BeyondTV has a plugin that does this perfectly called AutoXvid.
 

and-81

Retired Team Member
  • Premium Supporter
  • March 7, 2005
    2,257
    183
    Melbourne
    Home Country
    Australia Australia
    Hey all,

    I've had some requests for information on how to selectively run comskip depending on the channel the recording is on.

    Here's an example batch file to filter out channels you don't want to run comskip on...

    Make a file with a ".bat" extension (just open notepad and save the file as a .bat) with the following code in it:

    Code:
    @ECHO OFF
    
    REM Plugin parameters must start with:  "{6}"
    REM eg. "{6}" --playnice "{0}"
    
    IF %1=="Channel Name 1" GOTO End
    IF %1=="Channel Name 2" GOTO End
    
    START "ComSkip" "C:\Program Files\ComSkip\ComSkip.exe" %2 %3 %4 %5 %6 %7 %8 %9
    
    :End

    Modify the file to suite your needs, and then point the ComSkip Launcher plugin at this file instead of the comskip exe. The first parameter passed to the file needs to be the channel name ( "{6}" ). You could use it to filter on some other detail if you wanted to ... but I'll leave that as an exercise for the reader.

    Also, I've made a change to the TV2 launcher plugin so you can now run it when a recording starts.

    Cheers,
     

    johnrw

    Portal Pro
    May 30, 2007
    68
    1
    Home Country
    New Zealand New Zealand
    Aaron

    Thanks for the earlier advice when auto commercial skipping was released in the SVN. At the time, my system was wonkey and needed a re-bore which I have done, but not without challenges - for some reason my computer clock got reset 20 days back and because of that no EPG data would show - took a while to notice that had happened - rest the clock and all worked normally.

    Anyway, your auto skipping when watching after recording TV is probably the best thing since sliced bread - so far, evrything has worked fine. I am trying the running of Comskip from the start of recording to see what that looks like.

    Has anyone ever requested that when a recorded TV program is deleted within MP single seat, it also deletes all the Comskip created files? I find I have to do that cleanup every now and then or am I missing something by way of a "delete all associated files" setting?

    A huge thankyou Aaron - my system is now near perfect, especially with auto Comskip and MCE Replacement Plugin being used simply for blasting my Sky TV set top box (although my second set top box does not respond to blasting from learned IR codes).
     

    Rudi99

    Portal Pro
    October 3, 2007
    238
    4
    Home Country
    Germany Germany
    Has anyone ever requested that when a recorded TV program is deleted within MP single seat, it also deletes all the Comskip created files? I find I have to do that cleanup every now and then or am I missing something by way of a "delete all associated files" setting?
    That would be nice!
     

    and-81

    Retired Team Member
  • Premium Supporter
  • March 7, 2005
    2,257
    183
    Melbourne
    Home Country
    Australia Australia
    It should already delete the .txt file. You can modify the comskip ini to get rid of some of the other files when it finishes.

    I can't remember the parameters, but crack open the ini file and take a look. Also, check the comskip web page.

    ALSO, I've made a correction to the batch file example above. Thanks to Taipan for pointing this out.

    Cheers,
     

    johnrw

    Portal Pro
    May 30, 2007
    68
    1
    Home Country
    New Zealand New Zealand
    I have run this with MP 0.2.3 Final and selected at "start of recording" in the Comskip MP Configuration options. When a recording was carried out, it did not create the .txt file which contains the logo. It was before the updated SVN was loaded. I then tried to switch to "after recording" option and that option would check okay with the radio button but did not save it because on immedialtely closing MP Configuration and restarting MP Configuration, the "start of recording" option was checked. I am unable to change the option "at start" back to "after recording". Any ideas?
     

    and-81

    Retired Team Member
  • Premium Supporter
  • March 7, 2005
    2,257
    183
    Melbourne
    Home Country
    Australia Australia
    johnrw:

    This has me a little confused. The start of recording option is not available in 0.2.3.0 final, so I assume you are running an SVN on top of that?

    You can force the setting manually by modifying the mediaportal.xml configuration file. Do a search in the file for "comskip" and you should find it.

    Is anyone else experiencing this? I can't seem to reproduce the problem here... yet.

    Cheers,
     

    johnrw

    Portal Pro
    May 30, 2007
    68
    1
    Home Country
    New Zealand New Zealand
    I read my text in my reported issue again and I can see how I have confused. Here is another shot as the issue.

    With 0.2.3.0 Final plus the SVN which first introduced auto-skip with Comskip run after recording, the logo.txt file was produced and all worked in auto skip.

    When I updated to later SVNs containing the option to run Comskip from start of recording, no logo.txt file was produced (the other two txt files were produced) so auto skip or even manual skip with the remote did not work.

    If I go back to MP Configuration to reset Comskip to run at end of recording, it will not hold the setting and just stays on running Comskip from start of recording.

    When I change back to the older SVN (16599 I think), it works again.

    I have changed back and forth with the SVNs two or three times and it is consistent.

    Cheers

    Just checked the mediaportal.xml file:

    When I select Comskip after end of recording in MP Configuration, then close MP setup, then check the .xml file it shows "no"to run at start.

    When I go back to MP Configuration, open the Comskip plugin, the radio button shows run at start. If I click on run at start, then check the .xml file it shows "yes". If I start MP Configuration again, click on run Comskip at end, a re-check of this setting in MP Configuartion, after I have previously shut it down and re-opened, shows the radio button on at start. Once more then if I shut MP Configuration and check the .xml file it shows "no".

    It so far looks like the .xml file gets updated eevn though the MP Comskip plugin display never holds the at end button selection.

    The end result is that whatever I have in .xml "no" or "yes", the logo.txt file does not get produced.

    Done one more check:

    When the Comskip plugin is opened within MP Configuration, the radio button always defaults to run at start. This saves "yes" into the .xml file. When I set the radio button to at end of recording, save and shut down MP Configuration without reopening the Comskip plugin to check the radio button (which if I did would always go back to the run at start position), then check the .xml file, it shows "no".

    The first part of the problem is that MP Configuration Comskip plugin always defaults and saves "yes" in the .xml file if the plugin is opened.

    I have made sure the .xml is in the "no" position so I will check tonight what happened to see if a logo.txt file is created. The second potential problem is that if it is in the "yes" position (in the .xml fil) it does not produce the logo.txt file and maybe when it is in the "no" position (in the .xml file) it does produce the logo.txt file. Tonight's test will reveal.
     

    and-81

    Retired Team Member
  • Premium Supporter
  • March 7, 2005
    2,257
    183
    Melbourne
    Home Country
    Australia Australia
    ok, thanks for the detailed description.

    I'll take another look at it.

    It sounds like there are two issues present:
    1. The plugin is not loading it's configuration properly.
    2. ComSkip is not processing the DVR-MS files properly when run at start.

    We may need to contact erik if we can show that "2" is right.

    I'll go fix "1" now.

    Cheers,
     

    Users who are viewing this thread

    Top Bottom