Comclean processes

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
wntrmte
Posts: 15
Joined: Thu Mar 23, 2006 4:30 am

Comclean processes

Post by wntrmte » Tue Mar 28, 2006 6:47 pm

erik,

I am still hammering away at trying to get a file w/o commercials.

Running comskip 7928 and 7929b2 and setting the comskip.ini output_<app>=1 for the correct app. I get the correct files it appears for mpgtx, mencoder and mpeg2schnitt.
I set

mpgtx - I get a file but no audio in it.

mencoder - lots of stutter

mpeg2schnitt - this app just plain crashes when I try to use it

cuttermaran - haven't really tried it due to complexity that was voiced by someone on the forum.

What I have: XPPro SP2, FusionHDTV5 Gold USB, obtaining ATSC signals from 480 i/p up to 1080i. Audio can be 2 channel or 5.1 channel. AC3 (I'm pretty sure).

Help?

What process do you recommend I use?
Batch parameters, etc.

Good work on the 7929b2!
Thanks,
Greg

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

Post by erik » Tue Mar 28, 2006 7:02 pm

First thing to know is what you will do with the recordings.
Playback or archive
If you intend to playback you do not need to actually remove the commercials.
You need a player that can skip the commercials based on the info generated by comskip.
If you want to archive without commercials than its more difficult.
None of the current comclean version can deal with dvr-ms so none of the will work as described for MPEG Program Stream.
The next Comskip version will have a output option to generate the audio and video Elementary Streams.
These can be used directly to feed cuttermaran. Cuttermaran will do the cutting (I hope also for AC3, did not test yet) and the you can run a muxer to create a MPEG program Stream
But if you have to go to mpeg program stream anyway why not first convert to MPEG (Tool: HDTVtoMPEG) and then run Comskip etc...

wntrmte
Posts: 15
Joined: Thu Mar 23, 2006 4:30 am

Post by wntrmte » Tue Mar 28, 2006 10:20 pm

First thing to know is what you will do with the recordings.
Playback or archive
If you intend to playback you do not need to actually remove the commercials.
You need a player that can skip the commercials based on the info generated by comskip.
If you want to archive without commercials than its more difficult.
None of the current comclean version can deal with dvr-ms so none of the will work as described for MPEG Program Stream.
The next Comskip version will have a output option to generate the audio and video Elementary Streams.
These can be used directly to feed cuttermaran. Cuttermaran will do the cutting (I hope also for AC3, did not test yet) and the you can run a muxer to create a MPEG program Stream
But if you have to go to mpeg program stream anyway why not first convert to MPEG (Tool: HDTVtoMPEG) and then run Comskip etc...

erik,

I will be doing both playback and archive. Because of a lack of cables, I am recording on one system and then hooking a laptop to my "home theater" system for playback and accessing the file over my home network.
It is a lower-powered laptop.
I am aiming towards obtaining the necessary cabling to hook up my main system that currently has GB-PVR working on it (with your wonderful comskip working. Thanks for yours, sub's, stattik's and some other help!).

After recording (I'm currently able to have the digital TV stream recorded straight to MPG using a CyberLink mux thanks to a patch from sub), comskip runs and marks the commercials. Played through GB-PVR, the commercials are automatically skipped. Great!

I want to further process the file to cut out the commercials and I end up with a MPG file that can play in any other player (software or set-top DVD player) with NO commercials.

OF the 4 options (mpgtx, mencoder, mpeg2schnitt and cuttermaran) which provides the best quality when performing the commercial cutting (and remuxing?).
'n' how you do 'dat? (batch command, app parameters, options, switches, etc.)

Thanks!

Greg

jrball
Posts: 2
Joined: Sun Apr 09, 2006 3:56 pm

Post by jrball » Sun Apr 09, 2006 4:01 pm

I too want to archive the processed MPEG's. I have run comskip and the two text files have been generated, how do I actually get the commercials cut out? I can't find how to do this either, am I missing something?

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

Post by erik » Sun Apr 09, 2006 4:19 pm

I assume you are talking about a dvr-ms input file.
One way is to convert the dvr-ms file to mpeg and then use any of the comclean's to cut the mpeg.
Another way is to use te demuxed output from comskip and to run the new comcleandvr that I am testing right now. It uses cuttermaran to do the actual cutting.

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

Post by erik » Sun Apr 09, 2006 5:15 pm

When you set
output_cuttermaran=1
and
output_demux=1
And run comskip on the dvr_ms file you get the two demux output file .mp2 and .m2v and a cuttermaran project file (.cpf).


Use this as a project file for cuttermaran.
Or use this batch file to run cuttermaran and to mux the output again to a regular mpeg file.

Code: Select all

Rem Remove the commercials
"c:\program files\cuttermaran\cuttermaran.exe" "%~dpn1.cpf"
rem del "%~dpn1.m2v"
rem del "%~dpn1.mp2"
Rem Mulxiplex again to a regular mpeg file
mplex1 "%~dpn1_clean.m2v" "%~dpn1_clean.mp2" "%~dpn1.mpg"
del "%~dpn1_clean.m2v"
del "%~dpn1_clean.mp2"
del "%~dpn1*.info"
Rem RENAME the old .mpg file and rename the new one to the old name
rem if EXIST "%~dpn1_clean.mpg" move "%~dpn1.mpg" "%~dpn1_original.mpg"
rem if EXIST "%~dpn1_clean.mpg" move "%~dpn1_clean.mpg" "%~dpn1.mpg"
[/quote]

You can download the above as comcleandvr.zip from the comskip web site. It includes mplex1.exe that is needed to mux.

Change StartDelay="0" into StartDelay="-500" inside the .cpf file if needed to get the audio on sync.[/quote]

jrball
Posts: 2
Joined: Sun Apr 09, 2006 3:56 pm

Post by jrball » Mon Apr 10, 2006 4:04 pm

Yes, sorry about not being descriptive. I tried following some instructions on the MediaPortal Forum, but I think they may have left out something or it's changed since then, because I only was getting the two text files and not getting the commercials cut out of the mpegs. Thanks again.

Taipan
Posts: 26
Joined: Sun Jun 18, 2006 12:39 am
Location: Melbourne, Australia

Post by Taipan » Thu Jun 22, 2006 11:27 am

Hi Erik,
erik wrote:One way is to convert the dvr-ms file to mpeg and then use any of the comclean's to cut the mpeg.
This is what I would like to do, convert a dvr-ms file to mpeg, run Comskip on it and then remove the commercials with Comclean - which of the following 4 options :-

mpgtx
Cuttermaran
Mencoder
Mpeg2Schnitt

do you recommend would produce the best (most accurate and most playable) final mpeg file?

Cheers,

Taipan

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

Post by erik » Thu Jun 22, 2006 11:44 am

Each has its own advantages

mpgtx is quick, dirty, simple and not very accurate, no GUI so no option for manual intervention or improvement. (I use it by default on ALL recordings, we don't mind seeing sub seconds commercials ;-), we don't archive)

Cuttermaran Not so quick because it requires first demuxing. does deliver good results and allows a easy manual check and improvement. Good for archiving.

Mencoder rather quick when creating MPEG, clean results, only for commandline use, no GUI but can also create DIVX and other output formats in one go.

Mpeg2Schnitt not so accurate but improving, again demux and muxing, GUI for manual improvement. German documentation(?)

Cuttermaran seems the best for you if you need manual checking

Taipan
Posts: 26
Joined: Sun Jun 18, 2006 12:39 am
Location: Melbourne, Australia

Post by Taipan » Thu Jun 22, 2006 11:53 am

I want to set this up to run automagically in the background (no manual checking is required), so it sounds like Mencoder is the best option - it is reasonably quick and clean?

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

Post by erik » Thu Jun 22, 2006 12:11 pm

yes, it delivers a good timeline and reasonable accurate cutting.
There is no transcoding so its quick, cutting is done on GOP basis so don't expect frame accuracy.

Taipan
Posts: 26
Joined: Sun Jun 18, 2006 12:39 am
Location: Melbourne, Australia

Post by Taipan » Sat Jun 24, 2006 4:11 am

Hi Erik,

I hope you can help me with Mencoder - I am trying to use it to cut out the commercials, but I am getting all sorts of weird errors.....

This is the content of my "seven.edl" file:

Code: Select all

0.04 76.52 0
171.44 216.40 0
1560.44 1705.52 0
2250.08 2460.08 0
2889.52 3099.40 0
3579.88 3784.80 0
4326.88 4551.88 0
5107.60 5337.64 0
6504.52 6744.56 0
7337.12 7572.36 0
7991.68 8206.72 0
8534.16 8624.16 0
9278.04 9278.08 0
I assume that these numbers are in seconds?

This is the command that I am using to invoke Mencoder:-

Code: Select all

"D:\ad removal\mencoder" "%~dpn1.mpg" -edl "%~dpn1.edl" -oac copy -ovc copy -of mpeg -o "%~dpn1_clean.mpg"
which is taken from your "comclean3.bat" file.

and this is the sort of errors I am getting from Mencoder (this is just a sample of the error messages):-

Code: Select all

Cannot seek backward in linear streams!
Seek failed

Pos:   0.9s     22f ( 0%)  12fps Trem:   0min   0mb  A-V:0.084 [0:256]
Skipping frame!

ERROR: SCR: 94.994, VPTS: 94.520, DELTA=-0.474 secs  A-V:0.075 [6001:256]
and then Mencoder terminates about half-way through the input file! I think that's where it terminates - the output file is only about 50% the size of the input file, and a lot of the show is missing.

I have tried this with the latest version of Mencoder, and I get similar errors. The input file (Seven.mpg) has been "cleaned up" with VideoRedo via its "fast frame copy", but the errors still occur... :(

Can you give me some advice on how to proceed?

Cheers,

Taipan

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

Post by erik » Sat Jun 24, 2006 7:34 am

If you have videoredo, why don.t you use videoredo to do the cutting.

set
output_videoredo=1
and comskip will generate a videoredo project file which can be run in batch mode.


What kind of recording do you use? DVB, ATSC?

Taipan
Posts: 26
Joined: Sun Jun 18, 2006 12:39 am
Location: Melbourne, Australia

Post by Taipan » Sat Jun 24, 2006 8:04 am

erik wrote:If you have videoredo, why don.t you use videoredo to do the cutting?
I would like to use VideoRedo, but I don't believe that I can execute VideoRedo from command line instructions - I am trying to set this up so that it will all run automagically, using "DirMon2" to trigger the process via a .bat file.
erik wrote:set
output_videoredo=1
and comskip will generate a videoredo project file which can be run in batch mode.
This would be ideal, but I can't see a way of doing this without manual intervention? Hence my trials with Mencoder.

erik wrote:What kind of recording do you use? DVB, ATSC?
I record DVB. I also "cleaned" the DVB file with Mencoder (mencoder.exe" -of mpeg -ovc copy -oac copy "%~dpn1_faulty.mpg" -o "%~dpn1.mpg") before running ComSkip, but still got all the errors..... :(

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

Post by erik » Sat Jun 24, 2006 8:31 am

Does comskip report any timeline errors?
If you set verbose=10 comskip will report these.

Post Reply