Log in

View Full Version : Splitting at scene changes; jitters


rKane
13th June 2002, 07:27
While watching Eva DVD's (I'm on disc5) right now, I've noticed that there are lots of areas where the 'camera' jitters a little bit, shifting to the side by a number of pixels and then immediately back. This is very distracting to have happen, since the particular scenes have very little other motion in them.

So I started looking for a way to make the jitter go away. Searching the forum produced a link to Dynapel SteadyHand (http://www.dynapel.com/private/sh_upgrade.htm); the trial version seems to work well, except that it doesn't seem to understand the idea of scene changes; when flipping from one scene to another, it often ends up scrolling one image off-center (leaving big black bars at opposite edges) and then switching scenes.

I also tried the DigiStudio Stabilizer VDub filter (http://digistudio.netfirms.com/product.htm), and although that seemed decent for single scenes, it suffered far more from scene changes, often sliding one scene over the next rather than the camera cutting from one to the other.

Is there any way I can set up AviSynth to split up one .avi into different parts for every scene? I

Better yet, are there any other VDub or AviSynth plugins that would help me in this situation?

(Aside: Since I'm working with IVTC'd material, the Steady Deinterlace (http://sandman_mmc.tripod.com/steady.htm) mentioned in a previous thread doesn't help much either.)

Any help is greatly appreciated :). Thx.

-rK

hakko504
13th June 2002, 08:10
The VDD filter could be used in AVIsynth in this way:
function VD_filter(clip clip){
LoadVirtualDubPlugin("stabilizer.vdf")
return clip.convertToRGB().stabilizer(some parameters).ConvertToYUY2()
}

video=AVIsource("video.avi")
part1a=video.trim(0,100) #first scene change between frame 100 and 101
part1=VD_filter(part1a)
part2a=video.trim(101,250) #next scene change at frame 250/251
part2=VD_filter(part2a)
part3a.... #and so on...

total=part1+part2+...
return total

rKane
13th June 2002, 15:51
Thanks, that looks good.

Now I just need to find out if AviSynth can split the video up at scene changes. (I forgot to mention this earlier, but the entire thing is currently compressed in Huffy, so any thoughts on dividing up the video by keyframes won't really work.) Also, anything that would generate a list of frame numbers where the scene changes would work just as well, since I could just use a Perl script to auto-generate the avs.

Any idea if this splitting or scene-change-detection is possible?

TPN
13th June 2002, 23:15
DivX 1st-pass logfile? DivX tries to put key-frames where scene changes...

rKane
14th June 2002, 00:25
Wow, I hadn't even thought of that. I just ran a video clip through the DivX first-pass and it has a nice entry in the log file saying exactly when there's a scene change. That's awesome :D. Now I just need to scrape enough money together to get that VDub filter...

Whenever I get this finished (and working well) I'll post the perl script and a step-by-step guide for how to get it working properly.

Thanks much for ideas and suggestions (and of course more ideas and suggestions are welcome.)

-rK