Log in

View Full Version : Should I cut commercials before, during or after video processing?


lbecque
3rd June 2005, 00:40
I've got several MPEG2 files that I need to cut commercials, IVTC, crop black bars, resize and then dub the audio back in that was demuxed using dgindex.

To avoid problems later with audio and video getting out of sync should I :

1. cut commercials out of the MPEG2 first and feed just the movie into the avisynth script or
2. use the trim( ) ++ trim( ) statements within the script to cut commercials
3. encode the entire file, then use ulead videostudio to cut commercials and do a smartrender to cut down on reencoding

Any advice from experience would be appreciated.

stickboy
3rd June 2005, 04:34
1. cut commercials out of the MPEG2 first and feed just the movie into the avisynth script orIf you want precise cuts, that might be hard since you can cut only on keyframes.
2. use the trim( ) ++ trim( ) statements within the script to cut commercialsYes, do that.
3. encode the entire file, then use ulead videostudio to cut commercials and do a smartrender to cut down on reencodingThat's a waste of time, because you'd end up applying filters and encoding commercials. Also, if you do any temporal smoothing, you'd be blending the commercials into the parts you keep.

yidaki
3rd June 2005, 13:16
If you want precise cuts, that might be hard since you can cut only on keyframes.Not if he's transcoding, which seems to be the case.

I recommend removing the commercials before anything.
Especially if you're going to do multi-pass encoding, otherwise the final size would be less then what you want it to be.

stickboy
3rd June 2005, 18:06
Not if he's transcoding, which seems to be the case.Why? He's going to end up decompressing all the frames and re-compressing them anyway.

yidaki
4th June 2005, 09:04
Why? He's going to end up decompressing all the frames and re-compressing them anyway.
as far as i know, recompressing also means re-keying.

Wilbert
4th June 2005, 13:15
as far as i know, recompressing also means re-keying.
Yes. But, the process he follows will result in different keyframes?

Anyway, transcoding means that you reuse much of the information that was collected during the original encoding (for example the bit allocation that is normally determined during the first pass of a conventional VBR encode, motion vector computations, scene change detection, and organizing GOP structure). See

http://forum.doom9.org/showthread.php?p=273364#post273364

yidaki
4th June 2005, 15:38
Yes. But, the process he follows will result in different keyframes?Yup.
All videos begin with a keyframe, so if he doesn't cut at a keyframe when he removes the commercial at the beginning of the video, he has to rekey the whole thing.
Will degrade quality, but as he's going to go through a recompressing-process anyway, I don't think it would hurt.

Anyway, transcoding means that you reuse much of the information that was collected during the original encoding (for example the bit allocation that is normally determined during the first pass of a conventional VBR encode, motion vector computations, scene change detection, and organizing GOP structure). See

http://forum.doom9.org/showthread.php?p=273364#post273364
Nice link, I didn't know that. :)

lbecque
8th June 2005, 18:44
Not if he's transcoding, which seems to be the case.

I recommend removing the commercials before anything.
Especially if you're going to do multi-pass encoding, otherwise the final size would be less then what you want it to be.

Not sure what you mean by transcoding as the definitions I have seen seem to be rather loose. If I did #1, removing the commercials before I did anything, what I was going to use was Ulead Video Studio 7 (VS7). When just making commercial cuts and moving from one MPEG2 file to another MPEG2 file without making any changes to the format (pixel size, bit rate, etc.) VS7 does something they call 'smart rendering'. Its must faster because VS7 only has to process the cuts and copy pieces of the file over without 'rendering' (encoding?) the file. Is this what you call 'transcoding'??

Thanks everyone for the advice.

yidaki
8th June 2005, 19:31
Not sure what you mean by transcoding as the definitions I have seen seem to be rather loose. If I did #1, removing the commercials before I did anything, what I was going to use was Ulead Video Studio 7 (VS7). When just making commercial cuts and moving from one MPEG2 file to another MPEG2 file without making any changes to the format (pixel size, bit rate, etc.) VS7 does something they call 'smart rendering'. Its must faster because VS7 only has to process the cuts and copy pieces of the file over without 'rendering' (encoding?) the file. Is this what you call 'transcoding'??

Thanks everyone for the advice.Well, before I read the link Wilbert posted, I was under the impression that transcoding only was a fancier word for decoding and encoding in the same sweep.
But it seems it's more complicated then that.

This forum is a hotpot of information, you can't avoid learning something new everytime you're here :)