Comclean on 1080i or 720p HD TS file?

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
acegolfer
Posts: 8
Joined: Tue Jan 09, 2007 5:38 am

Comclean on 1080i or 720p HD TS file?

Post by acegolfer »

Erik,

Can I use comclean to remove commercials (after running comskip) of a 1080i or 720p HD TS(or TP) file?

Will different frame rate matters?
erik
Site Admin
Posts: 3369
Joined: Sun Aug 21, 2005 3:49 pm

Post by erik »

Comskip can be used on 1080i and 720p TS or PS with framerates of 25, 29.97, 50 and 59.9something. Sound can be in mpeg2 or AC3 in any of the formats.
If it fails you can upload to my ftp server and I will try to fix.
acegolfer
Posts: 8
Joined: Tue Jan 09, 2007 5:38 am

Post by acegolfer »

erik wrote:Comskip can be used on 1080i and 720p TS or PS with framerates of 25, 29.97, 50 and 59.9something. Sound can be in mpeg2 or AC3 in any of the formats.
If it fails you can upload to my ftp server and I will try to fix.
I have been using comskip on HDTV shows. My question was will COMCLEAN work on HDTV files?
erik
Site Admin
Posts: 3369
Joined: Sun Aug 21, 2005 3:49 pm

Post by erik »

Comclean will work on any MPEG PS regardless of the format.
I have never tried it on TS files. TP is identical to TS.
if it works on SD it will also work on HD. Comclean is to stupid to see the difference.
You MUST set the right framerate in comclean.bat. Open comclean.bat in a text editor to change the framerate.

If you want to be sure you better use mencoder. comclean3.bat can be used to run mencoder.

Even better is to set
output_edl=1
in comskip.ini
and use mencoder with edl input directly to do the cutting.
You can also search for comcut, or comskip monitor.
Both have been tested on various formats.
kerryklarson
Posts: 116
Joined: Sun May 14, 2006 9:15 am

Post by kerryklarson »

erik wrote:If you want to be sure you better use mencoder. comclean3.bat can be used to run mencoder.
Can PIDs be specified with Mencoder to create an *.mpg from a source *.tp/*.ts file? If so, can anyone provide a sample command line using the PID and Comskip-generated *.edl? Thanks.
erik
Site Admin
Posts: 3369
Joined: Sun Aug 21, 2005 3:49 pm

Post by erik »

This works:
mplayer −edl <filename.edl> -vid 49 -aid 52 %1
where 49 and 52 are the decimal PID's of video and audio.
You can use the same switches for transcoding to mpeg PS

"c:\mplayer\mencoder" %1 -edl "%~dpn1.edl" -vid 49 -aid 52 -oac copy -ovc copy -of mpeg -o "%~dpn1_clean.mpg"

I did not test this
It is even possible to remove the logo with mplayer

Full doc of mplayer/mencode can be found here
http://www.mplayerhq.hu/DOCS/man/en/mplayer.1.html
kerryklarson
Posts: 116
Joined: Sun May 14, 2006 9:15 am

Post by kerryklarson »

Thanks very much. I looked at the Mencoder documentation and it's overwhelming.
erik
Site Admin
Posts: 3369
Joined: Sun Aug 21, 2005 3:49 pm

Post by erik »

I tested the logo removal and it works!
See my other post
erik
Site Admin
Posts: 3369
Joined: Sun Aug 21, 2005 3:49 pm

Post by erik »

And now you are going to ask me to generate the mencoder command line listing the EDL file, the decimal PID's and the logo removal parameters, and all that for free!!!!! :D
kerryklarson
Posts: 116
Joined: Sun May 14, 2006 9:15 am

Post by kerryklarson »

erik wrote:And now you are going to ask me to generate the mencoder command line listing the EDL file, the decimal PID's and the logo removal parameters, and all that for free!!!!! :D
You read my mind! I made my paltry donation. Aren't I entitled to personalized technical support and free program customization for life? :twisted: Okay, you can skip the logo removal.
anthonyshephard
Posts: 29
Joined: Sun Jan 21, 2007 10:01 pm

Post by anthonyshephard »

Hi,
The time used for mencoder/mplayer for edl is different with a TS file as it is obtained from the file itself and changes according to broadcast. So I have not found a way of using edl with mencoder if it is a TS file. An MPEG file is fine of course, as the time information is not available.

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

Post by erik »

Both TS and PS files do have PTS and DTS info.
The only problem with TS files is that they are often digital broadcasts and therefore can contain many errors causing missing frames in the timeline.
This results in problems when the cutter refers to the PTS info instead of counting the frames. mencoder is even worse because it refers to the byte position in the file and it ignores the PTS completely.
So it depends on how the errors are in the recording (missing or corrupt frames) what the effect will be.
I introduced the max_repair_size to facilitate the repairing of the timeline. However that does not always work with all cutters, such as VRD or mencoder
With perfect TS files I assume mencoder could do a good job.
Post Reply