Log in

View Full Version : Finding two nearly indentical frames?


hkl8324
23rd July 2006, 00:05
I have some VHS type recorded from TV I want to digitalize and convert to H.264. And some of my type have commercials recorded.
What I want to is to cut out the commercials and merge the parts before the CM and after the CM seamlessly.
I think maybe I need to find out the repeated frames before the CM and after the CM to do this? or I have another option?

(OK, I posted in this AVIsynth section because I dont know where I should put it and I think this forum is frequented by the most advance user in the whole doom 9 forum...)

foxyshadis
23rd July 2006, 01:41
In TV shows commercials are usually met by a fade-out/in during the show, so picking any black frames should be fine. In movies, they usually try to put them between fades when possible; if they can't, it's almost always at a scenechange. So dupe frames are rarely important.

Even if you can find the commercials programmatically, you'll probably need an NLE anyway for frame-exact cutting to ensure no extra black frames are left.

AVIL
23rd July 2006, 11:11
Hi,

To cut commercials I use a manual method with Virtualdub. First, I select all the frames of the commercial and delete it. After, after brightening the video I delete, in a frame basis, those totally black. I never have found duped frames but, if any, I would have a second view of the video with virtualdub with the last of the frames I would retain and operating in the main session I would visually delete duped frames until I reach the frame marked in the second session. Another tech is delete a frame, move 1 frame before until the frame is duplicated. Then do the last delete.

Good luck.

Fizick
23rd July 2006, 15:35
In my country, TV channel logo are always disabled at commercials. So, we can use some logo detector to detect and cut this frames.

hkl8324
23rd July 2006, 19:50
Oh, sorry, maybe my english is too bad and I cant state my situation clearly. What I want to do is as follows:

-------|------|--------------|-------|------------------------------------->
(part A)(partB)( commercial )(part B)(the file/TV programme continue to play)

I have two part B here before and after the commercial, which is indetical...

How can I cut the 3 middle parts and merge part A and the last part seamlessly?

Mug Funky
24th July 2006, 04:11
you could grab the audio out and look for matching waveforms of the part you're wanting to check out.

any methods based on checking one part of video against a test clip would be quite slow indeed, wheras looking at the corresponding audio waveforms can be quite a lot quicker.

though either way you do it there's going to be a fair bit of manual work.

HeadlessCow
24th July 2006, 04:53
I just open it in vdub and scroll through the video holding shift so it only shows keyframes. Commercials always start with a keyframe (well, it's not required or anything, but it's a scenechange so it almost certainly does) and there's a couple in a row so you can generally see them even when scrolling at a decent speed.

Didée
24th July 2006, 08:08
You could use e.g. the CutFinder (http://www.avisynth.org/CutFinder) helper script for finding the right trim-points for a seamless match.