Clean up process?

Here you can ask your questions on how to use Comskip for the detection of commercials. Also questions on how to remove commercials are welcome
Post Reply
Oingofan
Posts: 3
Joined: Thu Nov 24, 2011 5:32 am

Clean up process?

Post by Oingofan »

I just started testing Comskip with .wtv files and so far, it looks like it is working nicely. Now...here is my question: Comskip generates files in the same directory as Recorded TV. After I delete the show within WMC, the .wtv is gone, but it leaves behind the Comskip files. After a month, I can have hundreds of files in the folder that are no longer needed. What does everyone do to clean these up? I know I can clean up manually, but is there anything that will match the current shows in the folder...and if they no longer exist, then delete the associated files? Thx!
erik
Site Admin
Posts: 3368
Joined: Sun Aug 21, 2005 3:49 pm

Re: Clean up process?

Post by erik »

many people run a simple batch file
example (you need to test and check as I made this just now)

This will walk all folders below where it is started and deletes the .txt and .log files without a .wtv file with the same base name.
Run this either manually or from a daily/weekly scheduled job.

Code: Select all

@echo off
call :recurse "."
goto :eof

:recurse
pushd "%1"
    for /d %%i in (*) do call :recurse "%%i"
    for %%f in ("*.txt") do if not exist "%%~dpnf.wtv" del /q "%%~dpnf.txt"
    for %%f in ("*.log") do if not exist "%%~dpnf.wtv" del /q "%%~dpnf.log"
popd
goto :eof
Oingofan
Posts: 3
Joined: Thu Nov 24, 2011 5:32 am

Re: Clean up process?

Post by Oingofan »

Ah! Very nice. I knew there was something out there...and you provided a great solution. I'll test it out. Thanks Erik!
adam1991
Posts: 6
Joined: Sun Nov 27, 2011 6:32 pm

Re: Clean up process?

Post by adam1991 »

Is that batch file specific to comskip files? Will it work with the similar SA files?
erik
Site Admin
Posts: 3368
Joined: Sun Aug 21, 2005 3:49 pm

Re: Clean up process?

Post by erik »

Please check what it does to see if its compatible with other programs.
I don't know mutch about SA.
Oingofan
Posts: 3
Joined: Thu Nov 24, 2011 5:32 am

Re: Clean up process?

Post by Oingofan »

Adam, SA creates .xml files. So, you just need to create one additional line in the batch file:

for %%f in ("*.xml") do if not exist "%%~dpnf.wtv" del /q "%%~dpnf.xml"
adam1991
Posts: 6
Joined: Sun Nov 27, 2011 6:32 pm

Re: Clean up process?

Post by adam1991 »

Thank you!
serge
Posts: 9
Joined: Sun Jan 01, 2012 8:21 pm

Re: Clean up process?

Post by serge »

I see files added to the "Recorded TV" folder (as Oingofan mentioned), but I also see files added to c:\users\public\Dvrmstoolbox\folders (e.g. commercialsxml and fwlogs). If I run a copy of the batch file in each location, it completely cleans the later directory structure (I assume since the .wtv files are not within this folder). Any suggestions?

I am also getting vprj and edl files. Is that normal? Should I simply add those to the batch file for cleanup?

Thanks
erik
Site Admin
Posts: 3368
Joined: Sun Aug 21, 2005 3:49 pm

Re: Clean up process?

Post by erik »

You can set

output_edl=0
and
output_videoredo=0
in your ini file to get rid of the generation of the .edl and .vpr files.
serge
Posts: 9
Joined: Sun Jan 01, 2012 8:21 pm

Re: Clean up process?

Post by serge »

Thanks, oddly enough, output_videoredo is already set to 0.

Any suggestions for the first question (cleaning up the folders)?
erik
Site Admin
Posts: 3368
Joined: Sun Aug 21, 2005 3:49 pm

Re: Clean up process?

Post by erik »

Are you sure the right ini file is used?
serge
Posts: 9
Joined: Sun Jan 01, 2012 8:21 pm

Re: Clean up process?

Post by serge »

I'm not sure what I was doing wrong, but now I only have wtv and log files in the "Recorded TV" folder and vih and xml files in the Dvrmstoolbox\commercialsxml folder. BTW, what are the vih files and are they needed?

Any suggestions for how to use (or modify) the batch file so that it cleans both of these folders correctly?

Thanks in advance.
dopdahl
Posts: 3
Joined: Sat Feb 04, 2012 5:21 am

Re: Clean up process?

Post by dopdahl »

Eh, I don't think you should be having to manually clean up any files.

DVRMSToolBox is creating those files because 'out of the box' DVRMSToolbox has about 5 different commercial processing applications enabled.

You need to go into the DVRMSToolbox GUI and I can't remember which tab it's on, but you want to turn off everything but Comskip.

It's just creating empty output files for all of the applications that are enabled but don't exist on your system.

EDIT: When I get home later I'll have a look and report back exactly... I know that it's a DVRMSToolbox configuration somewhere.

EDIT 2: I think it's a matter of changing the Preferred analyzer on the main page to Comskip instead of automatic... You may have to also change it on the Processing Tab. I'll double check later.

EDIT 3: Hmmmm. I may be flashing back to my ShowAnalyzer days. It could be the config was in there that I'm thinking about... I'll check it out.
bmblank
Posts: 55
Joined: Thu Jan 19, 2012 5:13 pm

Re: Clean up process?

Post by bmblank »

In the ini file the xxxx_output lines are what you're thinking of I think. Also in one or two of the tabs there are checkboxes for log files and junk. I think those will dump to the same place if you're not careful.
Post Reply