Log in

View Full Version : Detect scene changes in Avisynth?


AlanHK
12th August 2007, 14:12
I've got an AVI several generations removed from the original old TV capture.

One problem is that many scene transitions are scrambled and a bit jarring when viewed.
Eg, this sequence, frames 3314, 3315, 3316.

I'd like to replace the transition frame with the previous or next one:

FreezeFrame(3315,3315,3314)

This gives a more pleasant viewing experience.

The problem is of course finding all the transition scenes.
If I could get a list of all scene changes by frame number I could quickly review and fix each one if necessary.
Since a lot of encoding software needs to know where scene changes are, it seems to me this problem must have been solved. Is there a way to do it in Avisynth (or VDub)?

foxyshadis
12th August 2007, 17:22
Virtualdub does have that next scene/last scene button, the green one. Set the sensitivity in preferences and give it a try.

AlanHK
12th August 2007, 19:17
Virtualdub does have that next scene/last scene button, the green one. Set the sensitivity in preferences and give it a try.

Thanks, that seems promising. I can get most of the affected frames if I put the sensitivity at 240.

I don't use VDub a lot, except to run AVS files. Is there a simple way to make bookmarks and/or collect the frame numbers?

I suppose I'll ^G ^C ^V a lot otherwise.

mitsubishi
12th August 2007, 19:28
I was looking into this yesterday, more for a programmatic approach, but there is an avisynth filter: http://avisynth.org/warpenterprises/ (look for SceneChangeLavc), which can create a list.

There was an idea also by berrinam: http://forum.doom9.org/showthread.php?p=788250#post788250

Ebobtron
12th August 2007, 20:18
You could try HC's gui which has a create scene list feature.

Load your avs script on the first page then click the tab "Preview/Chapters", click the create SCD chapter list, when done use export chapter list to file.

I find it very accurate, but opinions differ.:)
ta

[P]ako
12th August 2007, 21:12
This is one thing at which YATTA is good for. Create an avs load it in YMC.exe, uncheck everything but Slavc, run it, it will create a .yap file containing a list of all the frames at which a new scene starts. Then load the .yap in YATTA and jump from scene to scene, use the tool button to freezeframe unwanted frames. Then save an avs.

AlanHK
13th August 2007, 19:56
Thanks all.
Slavc run via Yatta does the job.

Harukalover
13th August 2007, 21:24
SCXvid tends to be more accurate than SClavc. Yatta is compatible with SCXvid in YMC as well.