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

mdsflyer

Portal Pro
November 14, 2005
283
6
Home Country
New Zealand New Zealand
Hi there, have you pointed the plugin configuration at the folder containing your comskip.exe? I believe there is a test button to check if it is working on that page, what results does that give (use a small file to save time). I have mine run whilst the recording is taking place and have edited the comskip.ini file to "play nice" as Erik says, i.e. it is less of a drain on the CPU

Cheers
m
 

zion22

Portal Pro
April 6, 2006
157
2
51
Home Country
Sweden Sweden
How is your write-up going? It looks like it has the right solution. I worked for ASEA as it was then called in Västerås. Now of course part of ABB.

Sorry, got caught up in something for a few days.

I use OnFile (obviously :p), but it shouldn't be a problem to use the ComSkip launcher to do everything for you.
However Mencoder use helluva lot of CPU to encode the Xvid's and that might be a problem with MP's ability to function. Might be a switch for mencoder, but I havn't researched that.

Paths:
In this example Comskip is unzipped into "C:\Comskip", Mencoder in "C:\mencoder\" and we want our resulting Xvid files in "C:\vcr\". This can ofcourse be changed.

Mp configuration:
* Point the Comskip launcher to a .Bat file (see bottom of post), located where you want

ComSkip configuration:
* Open Comskip.ini
* Change "output_edl" to 1
Tuning etc of comskip is something you might wanna do, but I refer to Comskip site for that

Mencoder:
Lots of stuff to play around with here.
* -xvidencopts pass=1:aspect=16/9:bitrate=-950000 (Here we are forcing 16/9 format and want the result file to be ~950000Kb)
* -lameopts abr:br=128 (MP3 audio @ 128kbit)
* -o "C:\vcr\%~n1_clean.avi" (Hardcoded output path of the Xvid file. Filename will be same as original but with clean appended.)
* pass=2 (Do 2 pass encoding. Recommended, but it's taking longer.)

CleanAndEncode.bat
Code:
@echo off
C:\comskip\comskip.exe %1
C:\mencoder\mencoder.exe "%1" -edl "%~dpn1.edl" -ovc xvid -oac mp3lame -lameopts abr:br=128 -xvidencopts pass=1:aspect=16/9:bitrate=-950000 -o NUL
C:\mencoder\mencoder.exe "%1" -edl "%~dpn1.edl" -ovc xvid -oac mp3lame -lameopts abr:br=128 -xvidencopts pass=2:aspect=16/9:bitrate=-950000 -o "C:\vcr\%~n1_clean.avi"

If you are really brave you can have the .bat file deleting the original recording. Not that I'd recommend that. :D
 

and-81

Retired Team Member
  • Premium Supporter
  • March 7, 2005
    2,257
    183
    Melbourne
    Home Country
    Australia Australia
    of course, you could do this:

    START /LOW C:\mencoder\mencoder.exe ...

    use that in the batch file to lower the process priority ... might be an option.

    Also, keep in mind that ComSkip wont finish until the recording does, so a high cpu load After the recording has finished would only be a problem in back-to-back recording situations.

    Hope that helps,
     

    Bleazle

    Portal Pro
    July 14, 2007
    1,122
    257
    Pukekohe
    Home Country
    New Zealand New Zealand
    Hi there, have you pointed the plugin configuration at the folder containing your comskip.exe? I believe there is a test button to check if it is working on that page, what results does that give (use a small file to save time). I have mine run whilst the recording is taking place and have edited the comskip.ini file to "play nice" as Erik says, i.e. it is less of a drain on the CPU

    Cheers
    m

    Thanks for the reply - I think I've done something basic wrong here. The plugin is pointed at comskip.exe and test works great (with "Play nice") on existing recordings.

    comskip,exe is in c:/program files/comskip & TV records to G:/TV Recordings - so how does comskip know it should be monitoring this folder for new recordings?

    Cheers

    Dave
     

    Paranoid Delusion

    Moderation Manager
  • Premium Supporter
  • June 13, 2005
    13,062
    2,978
    Cheshire
    Home Country
    United Kingdom United Kingdom
    so how does comskip know it should be monitoring this folder for new recordings?

    At a guess from TVE3 recording settings (which you are using) as mine is E\RecordedTV.

    inside each recordings folder you should get 2 text files produced as well as the xml file.
     

    johnrw

    Portal Pro
    May 30, 2007
    68
    1
    Home Country
    New Zealand New Zealand
    Excuse my lack of knowledge but where do you download Mencoder from in its correct form to be used for this commercials removal function?
     

    Bleazle

    Portal Pro
    July 14, 2007
    1,122
    257
    Pukekohe
    Home Country
    New Zealand New Zealand
    Update: comskip is working automatically - the only change I made was to make sure the plugin was enabled in MP setup AND TVServer (had tried it enabled in one or the other previously, but not both at the same time) Seems strange to me but what the hell, at least it's working now :D
     

    Mho

    Portal Member
    November 4, 2007
    33
    3
    Home Country
    Germany Germany
    Hello
    only some shorts remarks

    Code:
    @echo off
    C:\comskip\comskip.exe %1
    C:\mencoder\mencoder.exe "%1" -edl "%~dpn1.edl" -ovc xvid -oac mp3lame -lameopts abr:br=128 -xvidencopts pass=1:aspect=16/9:bitrate=-950000 -o NUL
    C:\mencoder\mencoder.exe "%1" -edl "%~dpn1.edl" -ovc xvid -oac mp3lame -lameopts abr:br=128 -xvidencopts pass=2:aspect=16/9:bitrate=-950000 -o "C:\vcr\%~n1_clean.avi"

    There is a little mistake
    it should be
    @echo off
    C:\comskip\comskip.exe %1
    C:\mencoder\mencoder.exe %1 -edl "%~dpn1.edl" -ovc xvid -oac mp3lame -lameopts abr:br=128 -xvidencopts pass=1:aspect=16/9:bitrate=-950000 -o NUL
    C:\mencoder\mencoder.exe %1 -edl "%~dpn1.edl" -ovc xvid -oac mp3lame -lameopts abr:br=128 -xvidencopts pass=2:aspect=16/9:bitrate=-950000 -o "C:\vcr\%~n1_clean.avi"

    Otherwise mencoder would do nothing.

    START /LOW C:\mencoder\mencoder.exe ...

    use that in the batch file to lower the process priority ... might be an option.

    This doesn't work for both mencoder calls, because START starts a new task. So both of them would work parallel.
    It's only possible to use this with the second call.



    Mho
     

    and-81

    Retired Team Member
  • Premium Supporter
  • March 7, 2005
    2,257
    183
    Melbourne
    Home Country
    Australia Australia
    START /LOW C:\mencoder\mencoder.exe ...

    use that in the batch file to lower the process priority ... might be an option.

    This doesn't work for both mencoder calls, because START starts a new task. So both of them would work parallel.
    It's only possible to use this with the second call.

    Add /WAIT to the command to have it wait for mencoder to finish before moving on to the next command.

    Cheers,
     

    Users who are viewing this thread

    Top Bottom