Set Comskip to ignore certain channel? (1 Viewer)

gonzo90017

Portal Pro
September 3, 2012
238
26
24
Home Country
United States of America United States of America
Is there a way to have Comskip ignore certain channels? Here in the US we have a channel called PBS that airs Zero commercials. So instead of having comskip run on PBS's recordings (which is a lot) i'd rather have comskip ignore it.

Someone on the NPVR forums wrote a batch file which tells comskip to skip certain channels. Wondering if there is a way to do something like this using MediaPortal.
Code:
Rem The part below can be used to not run Comskip on certain channels, please modify for your conveniance.
Rem The channel numbers that should be skipped are the numbers between the double quotes ("").
Rem You can add "if" lines as much as you want
Rem To disable this behaviour use channel numbers outside the normal range, put a "rem" before the "if" or delete the "if" lines
 
Rem list of channels to not run comskip on
Rem if "%2" == "27" goto eof
Rem if "%2" == "36" goto eof
 
Rem this trick also makes it possible to have dedicated comskip.ini file for certain channels.
Rem if "%2" == "79" goto channel79
Rem if "%2" == "72" goto channel72
Rem if "%2" == "65" goto channel65
Rem use the default comskip.ini for all other channels
goto generic
 
:channel79
comskip --ini=channel79.ini %1
goto continue
:channel72
comskip --ini=channel72.ini %1
goto continue
:channel65
rem This is an example of how to reuse a previously learned logo to prevent Comskip from learning the wrong logo
comskip --ini=channel65.ini --logo=channel65.logo.txt %1
goto continue
 
:generic
Rem The actual run of Comskip. Only one parameter, the name of the mpeg file to process.
Rem Comskip will read its settings from the Comskip.ini found in the same directory as Comskip.exe
Rem Both are supposed to be in the GBPVR default program directory. (C:\Program Files\devnz\gbpvr\)
echo Launching comskip on %1 at %date% %time% >>postprocessing.log
"c:\program files (x86)\Comskip\comskip.exe" %1
 

kiwijunglist

Super Moderator
  • Team MediaPortal
  • June 10, 2008
    6,746
    1,751
    New Zealand
    Home Country
    New Zealand New Zealand
    That .bat file is not NPVR specific it could be used with any media centre, you just need to adjust it to your needs.

    The .bat file is designed to be called with %1 being the recording file and %2 being the channel name

    eg. comskip.bat %filename% %channel_id%
     
    Last edited:

    gonzo90017

    Portal Pro
    September 3, 2012
    238
    26
    24
    Home Country
    United States of America United States of America
    I'm currently using Comksip Monitored since my cpu is kinda weak. Might it be possible to use this .bat with it?
     

    HomeY

    Test Group
  • Team MediaPortal
  • February 23, 2008
    6,475
    4,645
    47
    ::1
    Home Country
    Netherlands Netherlands
    I'm currently using Comksip Monitored since my cpu is kinda weak. Might it be possible to use this .bat with it?
    Shouldn't be a problem, if you edit the last line of the .bat and link it to your ComSkip folder/.exe
     

    gonzo90017

    Portal Pro
    September 3, 2012
    238
    26
    24
    Home Country
    United States of America United States of America
    This is what I t
    That .bat file is not NPVR specific it could be used with any media centre, you just need to adjust it to your needs.

    The .bat file is designed to be called with %1 being the recording file and %2 being the channel name

    eg. comskip.bat %filename% %channel_id%

    I replaced the path to comskip.exe to comskip.bat in Comskip Monitor. This is what my .bat file looks like but it isn't working. It's still running on PBS channels:
    Code:
    Rem The part below can be used to not run Comskip on certain channels, please modify for your conveniance.
    Rem The channel numbers that should be skipped are the numbers between the double quotes ("").
    Rem You can add "if" lines as much as you want
    Rem To disable this behaviour use channel numbers outside the normal range, put a "rem" before the "if" or delete the "if" lines
     
    Rem list of channels to not run comskip on
    if "%2" == "319" goto eof
    if "%2" == "320" goto eof
    if "%2" == "321" goto eof
    if "%2" == "322" goto eof
    if "%2" == "319" goto eof
    if "%2" == "488" goto eof
    if "%2" == "489" goto eof
    if "%2" == "490" goto eof
    if "%2" == "423" goto eof
    if "%2" == "424" goto eof
    if "%2" == "425" goto eof
    if "%2" == "426" goto eof
    goto generic
     
    :generic
    Rem The actual run of Comskip. Only one parameter, the name of the mpeg file to process.
    Rem Comskip will read its settings from the Comskip.ini found in the same directory as Comskip.exe
    Rem Both are supposed to be in the GBPVR default program directory. (C:\Program Files\devnz\gbpvr\)
    echo Launching comskip on %1 at %date% %time% >>postprocessing.log
    "C:\MediaWah\Programs\comskip\comskip.exe" %1
     
    :eof

    I'm sure I did something wrong? Maybe i'm using the wrong channel IDs? I got the channel ids by:
    Tv Server Configuration> TV Channels> Select Channel> Edit
     

    Attachments

    • Channel ID.jpg
      Channel ID.jpg
      105.4 KB

    Jay_UK

    Test Group
  • Team MediaPortal
  • October 6, 2009
    1,781
    283
    Derby
    Home Country
    United Kingdom United Kingdom
    Hi there,

    Does Mediaportal pass the channel ID as a commandline option for comskip?

    Or does it just pass the filename?

    J.
     

    kiwijunglist

    Super Moderator
  • Team MediaPortal
  • June 10, 2008
    6,746
    1,751
    New Zealand
    Home Country
    New Zealand New Zealand
    If it doesn't pass the channel id or channel name the .bat file won't be able to ignore certain channels as it will have no knowledge of what channel it is processing.
     

    Jay_UK

    Test Group
  • Team MediaPortal
  • October 6, 2009
    1,781
    283
    Derby
    Home Country
    United Kingdom United Kingdom
    Hi there,

    I'm sure the channel ID is not passed.

    The only thing you could do is to extract the channel name from the file name?

    J.
     

    kiwijunglist

    Super Moderator
  • Team MediaPortal
  • June 10, 2008
    6,746
    1,751
    New Zealand
    Home Country
    New Zealand New Zealand
    I see two possible options

    1. Investigate for the record plugin. It might have rules based setup, or it might have the ability to pass on the channel name or id to a .bat file, or it might have the ability to store recordings in a folder based on the channel name (which would allow you to monitor every directory excl the channel you don't want to process)

    2. as above suggestion extracting the channel name from the file name. You could learn a simple programing language/tool eg, autohotkey and write your own script that would only process certain files. The autohotkey forum is very active and could help you with any problems you encounter, (but you'd have to make a start on your own, I don't think they'd write the script for you without you making an attempt, but i might be wrong)
     

    Users who are viewing this thread

    Top Bottom