Set Comskip to ignore certain channel?

Discussion in 'Newcomers Forum' started by gonzo90017, October 1, 2012.

  1. gonzo90017

    gonzo90017 Portal Pro

    Joined:
    September 3, 2012
    Messages:
    238
    Likes Received:
    13
    Ratings:
    +25 / 2
    Home Country:
    United States of America United States of America
    Show System Specs
    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 (Text):
    1. Rem The part below can be used to not run Comskip on certain channels, please modify for your conveniance.
    2. Rem The channel numbers that should be skipped are the numbers between the double quotes ("").
    3. Rem You can add "if" lines as much as you want
    4. Rem To disable this behaviour use channel numbers outside the normal range, put a "rem" before the "if" or delete the "if" lines
    5.  
    6. Rem list of channels to not run comskip on
    7. Rem if "%2" == "27" goto eof
    8. Rem if "%2" == "36" goto eof
    9.  
    10. Rem this trick also makes it possible to have dedicated comskip.ini file for certain channels.
    11. Rem if "%2" == "79" goto channel79
    12. Rem if "%2" == "72" goto channel72
    13. Rem if "%2" == "65" goto channel65
    14. Rem use the default comskip.ini for all other channels
    15. goto generic
    16.  
    17. :channel79
    18. comskip --ini=channel79.ini %1
    19. goto continue
    20. :channel72
    21. comskip --ini=channel72.ini %1
    22. goto continue
    23. :channel65
    24. rem This is an example of how to reuse a previously learned logo to prevent Comskip from learning the wrong logo
    25. comskip --ini=channel65.ini --logo=channel65.logo.txt %1
    26. goto continue
    27.  
    28. :generic
    29. Rem The actual run of Comskip. Only one parameter, the name of the mpeg file to process.
    30. Rem Comskip will read its settings from the Comskip.ini found in the same directory as Comskip.exe
    31. Rem Both are supposed to be in the GBPVR default program directory. (C:\Program Files\devnz\gbpvr\)
    32. echo Launching comskip on %1 at %date% %time% >>postprocessing.log
    33. "c:\program files (x86)\Comskip\comskip.exe" %1



     
  2. Google AdSense Guest Advertisement



    to hide all adverts.
  3. kiwijunglist
    • Team MediaPortal

    kiwijunglist Super Moderator

    Joined:
    June 10, 2008
    Messages:
    6,746
    Likes Received:
    1,420
    Occupation:
    Doctor
    Location:
    New Zealand
    Ratings:
    +1,849 / 9
    Home Country:
    New Zealand New Zealand
    Show System Specs
    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: October 2, 2012
  4. gonzo90017

    gonzo90017 Portal Pro

    Joined:
    September 3, 2012
    Messages:
    238
    Likes Received:
    13
    Ratings:
    +25 / 2
    Home Country:
    United States of America United States of America
    Show System Specs
    I'm currently using Comksip Monitored since my cpu is kinda weak. Might it be possible to use this .bat with it?
     
  5. HomeY
    • Team MediaPortal

    HomeY Test Group

    Joined:
    February 23, 2008
    Messages:
    6,460
    Likes Received:
    2,627
    Gender:
    Male
    Occupation:
    Network Engineer
    Location:
    ::1
    Ratings:
    +4,737 / 16
    Home Country:
    Netherlands Netherlands
    Show System Specs
    Shouldn't be a problem, if you edit the last line of the .bat and link it to your ComSkip folder/.exe
     
  6. gonzo90017

    gonzo90017 Portal Pro

    Joined:
    September 3, 2012
    Messages:
    238
    Likes Received:
    13
    Ratings:
    +25 / 2
    Home Country:
    United States of America United States of America
    Show System Specs
    This is what I t
    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 (Text):
    1. Rem The part below can be used to not run Comskip on certain channels, please modify for your conveniance.
    2. Rem The channel numbers that should be skipped are the numbers between the double quotes ("").
    3. Rem You can add "if" lines as much as you want
    4. Rem To disable this behaviour use channel numbers outside the normal range, put a "rem" before the "if" or delete the "if" lines
    5.  
    6. Rem list of channels to not run comskip on
    7. if "%2" == "319" goto eof
    8. if "%2" == "320" goto eof
    9. if "%2" == "321" goto eof
    10. if "%2" == "322" goto eof
    11. if "%2" == "319" goto eof
    12. if "%2" == "488" goto eof
    13. if "%2" == "489" goto eof
    14. if "%2" == "490" goto eof
    15. if "%2" == "423" goto eof
    16. if "%2" == "424" goto eof
    17. if "%2" == "425" goto eof
    18. if "%2" == "426" goto eof
    19. goto generic
    20.  
    21. :generic
    22. Rem The actual run of Comskip. Only one parameter, the name of the mpeg file to process.
    23. Rem Comskip will read its settings from the Comskip.ini found in the same directory as Comskip.exe
    24. Rem Both are supposed to be in the GBPVR default program directory. (C:\Program Files\devnz\gbpvr\)
    25. echo Launching comskip on %1 at %date% %time% >>postprocessing.log
    26. "C:\MediaWah\Programs\comskip\comskip.exe" %1
    27.  
    28. :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
     

    Attached Files:

    • Channel ID.jpg
      Channel ID.jpg
      File size:
      105.4 KB
      Uploaded:
      October 11, 2012
      Views:
      7
  7. Jay_UK
    • Team MediaPortal

    Jay_UK Test Group

    Joined:
    October 6, 2009
    Messages:
    1,781
    Likes Received:
    250
    Occupation:
    Enterprise Architect
    Location:
    Derby
    Ratings:
    +271 / 0
    Home Country:
    United Kingdom United Kingdom
    Show System Specs
    Hi there,

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

    Or does it just pass the filename?

    J.
     
  8. kiwijunglist
    • Team MediaPortal

    kiwijunglist Super Moderator

    Joined:
    June 10, 2008
    Messages:
    6,746
    Likes Received:
    1,420
    Occupation:
    Doctor
    Location:
    New Zealand
    Ratings:
    +1,849 / 9
    Home Country:
    New Zealand New Zealand
    Show System Specs
    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.
     
  9. gonzo90017

    gonzo90017 Portal Pro

    Joined:
    September 3, 2012
    Messages:
    238
    Likes Received:
    13
    Ratings:
    +25 / 2
    Home Country:
    United States of America United States of America
    Show System Specs
  10. Jay_UK
    • Team MediaPortal

    Jay_UK Test Group

    Joined:
    October 6, 2009
    Messages:
    1,781
    Likes Received:
    250
    Occupation:
    Enterprise Architect
    Location:
    Derby
    Ratings:
    +271 / 0
    Home Country:
    United Kingdom United Kingdom
    Show System Specs
    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.
     
  11. kiwijunglist
    • Team MediaPortal

    kiwijunglist Super Moderator

    Joined:
    June 10, 2008
    Messages:
    6,746
    Likes Received:
    1,420
    Occupation:
    Doctor
    Location:
    New Zealand
    Ratings:
    +1,849 / 9
    Home Country:
    New Zealand New Zealand
    Show System Specs
    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)
     
Loading...

Users Viewing Thread (Users: 0, Guests: 0)

  1. This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
    By continuing to use this site, you are consenting to our use of cookies.
    Dismiss Notice
  • About The Project

    The vision of the MediaPortal project is to create a free open source media centre application, which supports all advanced media centre functions, and is accessible to all Windows users.

    In reaching this goal we are working every day to make sure our software is one of the best.

             

  • Support MediaPortal!

    The team works very hard to make sure the community is running the best HTPC-software. We give away MediaPortal for free but hosting and software is not for us.

    Care to support our work with a few bucks? We'd really appreciate it!