Set Comskip to ignore certain channel? (1 Viewer)

gonzo90017

Portal Pro
September 3, 2012
238
26
21
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,749
    New Zealand
    New Zealand New Zealand
    Country flag
    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
    21
    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,466
    4,635
    45
    ::1
    Netherlands Netherlands
    Country flag
    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
    21
    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

    Jay_UK

    Test Group
  • Team MediaPortal
  • October 6, 2009
    1,781
    283
    Derby
    United Kingdom United Kingdom
    Country flag
    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,749
    New Zealand
    New Zealand New Zealand
    Country flag
    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
    United Kingdom United Kingdom
    Country flag
    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,749
    New Zealand
    New Zealand New Zealand
    Country flag
    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 (Users: 0, Guests: 1)

    OP Similar threads Forum Replies Date
    da3dsoul [Request] An MVP Plugin example for custom settings in MP2 Plugin Development 2
    M.Hulot MP plays in Internal Blu-ray-Player-mode always first audio stream not the one I chosen in settings General Support 1
    R Correct setting for recordings on shared folder General 0
    J New computer with win10 and how will i set Mediaportal up ? Newcomers Forum 55
    M [fixed] [MP2-831] 12h time format shown in TV Guide with Swedish language settings Submit: Bug Reports 27
    joEhSuper Backup Setting - ErrorBackupFolder TV-Server 9
    Rob Hexenmeister [solved] Customising Fanart Handler settings Fanart Handler 3
    joecrow AMD Radeon Settings app. won't start after hibernation. General Support 0
    L [solved] Modifying programmed recording after setting it General 0
    B [solved] How to manually set MAC of TV Server for WOL Installation, configuration support 2
    X MadVR Settings Video & DVD 2
    J Resume from Standby Last Module TV Showing TV Server Settings Television (MyTV frontend and TV-Server) 2
    D Correct wake-on-lan settings General 3
    G MP Crashed during setting up recording. Newcomers Forum 1
    cbr954rr Overtake/overwrite settings for all clients Feature Requests 0
    cbr954rr Same settings on all Clients? General 6
    framug 1.22.0 BasicHome Editor settings for DefaultWide HD skin not kept when update 1.22 3
    N [Question] [MP2-493] Default culture not saved in settings MediaPortal 2 0
    cbr954rr Movie sets in films General 20
    D PC rebuild & MP2 upgrade - how to preserve database and settings? General 1
    cbr954rr Possibillity to export and import all client settings? General 0
    morpheus_xx [Finished] [MP2-802] TV-Settings availability in all TV screens MediaPortal 2 12
    N [will not fix] Changed settings do not take effect until MP2-Client is stopped and restarted. Submit: Bug Reports 4
    ajs [solved] Latest Media Handler - Skin settings - Custom latests items number Fanart Handler 27
    Rob Hexenmeister [solved] Latests Media Handler - Skinning an updating window or control Fanart Handler 26
    Similar threads

























    Top Bottom