How to automate dvrcut?

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
Ralph
Posts: 12
Joined: Wed Dec 07, 2005 11:16 pm

How to automate dvrcut?

Post by Ralph »

Hi erik,

I'm using comskip and comclean now for quite a while and it's working very well.

For mpeg files comskip and comclean are working well for me.
Comskip detects the commercials and after that comlean starts automatically and cuts out the commercials. I'm using mpgtx for that.

I just got the latest version and would like cut a dvr-ms file.
But I cannot get it work, right.
Comskip is detecting, but what do I need to edit to get dvrcut to cut out the commercials right after comskip has finished?
Is it the postprocessing.bat, or do i need a comclean.bat for that, too?

Thanks in advance
Ralph
erik
Site Admin
Posts: 3369
Joined: Sun Aug 21, 2005 3:49 pm

Post by erik »

Set
output_dvrcut=1
in comskip.ini
This will generate a .bat file with the same name as the mpeg file.
The .bat file has two parameters, first is input filename, second is output filename.

The replace the comclean line in postprocessing.bat with

call "%~dpn1.mpg" "%~dpn1.dvr-ms" "%~dpn1_clean.dvr-ms"

Make sure comcut is somewhere in the search path, for example in c:\windows
Ralph
Posts: 12
Joined: Wed Dec 07, 2005 11:16 pm

Post by Ralph »

Hi erik,

what I would like to do is to detect and cut the commercials out of a dvr-ms file.
I'm not using GBPVR but MediaPortal.
I set output_dvrcut=1 and I get the bat file you mentioned.
Now I want dvrcut.exe to cut out the commercials right after the .bat file has been created.

what I did now is changed the last line in postprocessing.bat that's called
rem comclean %1
to
call "%~dpn1.mpg" "%~dpn1.dvr-ms" "%~dpn1_clean.dvr-ms"

But know comskip does not cut any commercials, it just keeps going on scanning every dvr-ms file that's in my recordings folder?
I need to shut down comskip via task mananger to stop it.

I thing something is missing? why do I need to call "%~dpn1.mpg"?
I only have dvr-ms files?

Do I still need comclean? Or just dvrcut.exe?

Hope you know what mean?

Regards
Ralph
erik
Site Admin
Posts: 3369
Joined: Sun Aug 21, 2005 3:49 pm

Post by erik »

Change

call "%~dpn1.mpg" "%~dpn1.dvr-ms" "%~dpn1_clean.dvr-ms"
to
call "%~dpn1.bat" "%~dpn1.dvr-ms" "%~dpn1_clean.dvr-ms"


Better is to first make a separate file called clean.cmd file that contains

echo on
call "%~dpn1.bat" "%~dpn1.dvr-ms" "%~dpn1_clean.dvr-ms"

Then, for those files that comskip has processed and that have the .bat file with the same base name as the .dvr-ms file drag and drop the .dvr-ms onto the clean.cmd to see if the cleaning is working.

At the moment I don't understand why comskip should be looping.
Ralph
Posts: 12
Joined: Wed Dec 07, 2005 11:16 pm

Post by Ralph »

That's it.
But now DVRCut starts with an error message:
DVR occured a problem and has to be closed.

in the dos prompt I get an info:
WRN: Assembly binding logging is turned OFF.
To enable assembly bind failure logging, set the registry value [HKLM\Software\Microsoft\Fusion!EnableLog] (DWORD) to 1.
Note: There is some performance penalty associated with assembly bind failure logging.
To turn this feature off, remove the registry value [HKLM\Software\Microsoft\Fusion!EnableLog].


I looked into registry and found microsoft\fusion
but I got no entry called !enablelog.
Tried to add this entry but still got an error message when dvrcut is about to start.

Do you know this message?

Regards
Ralph
erik
Site Admin
Posts: 3369
Joined: Sun Aug 21, 2005 3:49 pm

Post by erik »

Do you het .net version 2 installed?
Ralph
Posts: 12
Joined: Wed Dec 07, 2005 11:16 pm

Post by Ralph »

Yes, .NET 2 installed, 'cause it's needed for MediaPortal, too.

That means on your machine DVRCut is working?

Regards
Ralph
erik
Site Admin
Posts: 3369
Joined: Sun Aug 21, 2005 3:49 pm

Post by erik »

No, I don't have a XP machine with the right filters installed, I only have a windows 2000 machine.
But people have reported it works.
It is actually based on a microsoft code example
The source is available for you to debug it on your machine.
Post Reply