View Full Version : best way to detect scene switch ?
mangaforall
31st May 2005, 10:39
hi,
i'm novice with avisynth and i wonder what is the best way to detect scene swith ? I aim to restore an anime, and i use improvesceneswith (of removedirt) to restore bad frame during scene swith. Unfortunately, improvesceneswith don't detect all scene switch with a ratio = 3 and with ratio = 2, it detects scene switch where there is not. So i would like use conditionalfilter to detect scene swith and then use improvesceneswith for restoring.
Thanks in advance.
loa-ash
31st May 2005, 11:22
I've used SceneChange with yatta.. use SClavc plugin in Ymc (a program with yatta) then open yatta and go to settings and you can see the scene change.
DO you want to delete freezeframe?
mangaforall
31st May 2005, 11:27
no, i don't want delete anything. I want to use improvesceneswitch wich replace frames n-1,n,n+1,n+2 with n-1,n-1,n+2,n+2. But improvesceneswitch miss some scene switch so i would like use another filter to detect scene switch for apply improvesceneswitch with low ratio :)
loa-ash
31st May 2005, 11:36
ok, so you check the scene change than save script.avs in yatta and then you can do all that you want :D
mangaforall
31st May 2005, 13:15
:thanks: I will test it :p
loa-ash
31st May 2005, 14:12
no prob. I'll await for you.
Fizick
31st May 2005, 20:12
I do not understand, what doi you want,
but my DePan plugin has scenechange function too.
mangaforall
1st June 2005, 08:47
i can't detect all scene switch with improvesceneswitch, so i have to use another filter to detect it, and next, i apply improvesceneswitch for replacing frame.
It would be something like that :
if (scenechange detect) {
improvesceneswitch()
}
There is some screenshot of my video here : http://forum.doom9.org/showthread.php?t=94610
edit: i'm blind, i found the doc of yatta :p
loa-ash
1st June 2005, 10:38
I've seen your screenshot and I can confirm that you can do that with freezeframe.... maybe I've explain not very well but you can replace the bad frame with the next frame or previous frame...
what is freezeframe?
[copy-and-paste]
The FreezeFrame filter replaces all the frames between first-frame and last-frame with a copy of source-frame. The sound track is not modified. This is useful for covering up glitches in a video in cases where you have a similar glitch-free frame available.
[/copy-and-paste]
sintax:
FreezeFrame(clip clip, int first-frame, int last-frame, int source-frame)
example:
FreezeFrame(54,54,55) <--- replace frame 55 with frame 54
You can do this with YATTA.
bye :D
mangaforall
1st June 2005, 15:09
hmm, i have to learn how to perfectly use yatta, it will be hard :p
Thanks a lot
loa-ash
1st June 2005, 17:27
Use YMC program with yatta..
scharfis_brain
1st June 2005, 17:37
scene changes can be detected in an automated way using AVIsynth:
- create a motionmask
- calculate the averageluma x()
- if [x(c) > x(p) * fac + off] AND [x(c) > x(n) * fac + off] then scenechange else noscenechange
p - previous frame
c - current frame
n - next frame
fac - multiplier (5 is good) ; defines the luma distance
off - offset ; (try) ; helping to ignore noise
mangaforall
2nd June 2005, 08:35
scene changes can be detected in an automated way using AVIsynth:
- create a motionmask
- calculate the averageluma x()
- if [x(c) > x(p) * fac + off] AND [x(c) > x(n) * fac + off] then scenechange else noscenechange
p - previous frame
c - current frame
n - next frame
fac - multiplier (5 is good) ; defines the luma distance
off - offset ; (try) ; helping to ignore noise
Thanks, does that way give better result than ymc+yatta ?
I try ymc witch detect scene switch with scenechange.dll and yatta generate freezeframe(x,x,y) code in an avs script to replace bad frame. But, some scenes change which look like have been detected (because it's the first frame of a section) are NOT replace with freezeframe(), does anybody know why ? Maybe I can interact with a parameter but I didn't see anything for that.
scharfis_brain
2nd June 2005, 08:43
scenechange.dll ?
never heard of it!
is it an AVS-plugin?
mangaforall
2nd June 2005, 08:49
I don't no, it's provide with ymc/yatta (SClavc plugin).
lamer_de
2nd June 2005, 09:05
is it an AVS-plugin?
Yes, it is. Written by akupenguin/pengvado.
http://students.washington.edu/lorenm/src/avisynth/sclavc/
But, some scenes change which look like have been detected (because it's the first frame of a section) are NOT replace with freezeframe(), does anybody know why ? Maybe I can interact with a parameter but I didn't see anything for thatI don't know the parameters influence the decision, but why don't you freeze the one it missed by hand if you're going to use yatta anyway?
CU,
lamer_de
mangaforall
2nd June 2005, 09:44
I don't know the parameters influence the decision, but why don't you freeze the one it missed by hand if you're going to use yatta anyway?
yes, I can, but 24 minutes x 152 episodes... :(
I prefer influence the decision parameter IF possible. But It looks to be better than improvesceneswitch() and faster!
loa-ash
2nd June 2005, 10:25
mangaforall, when you choose Sclavc plugin in ymc you must configure it, choose "slow" in settings then start the process... then go in yatta and do what you do :D
mangaforall
2nd June 2005, 10:33
yes, I already try. I choose "slow" for the 3 settings and I try too to choose "always" for "preme". This param will be use by yatta to create "sections" right ? It looks like that all scene change are detected BUT when I apply right click>additional>freezeframe, it misses to correct some scene change. I think it should apply a rule and don't correct all sections because some section are NOT scene change. I'm wrong ?
loa-ash
2nd June 2005, 10:45
When you have detected scenechange go to yatta in "settings" section, then you can see a list with all scene, then you choose one than click freezeframe and replace them with the next frame or previous frame... if you want i can help you in msn messenger if you use it :D
mangaforall
2nd June 2005, 10:54
I see which "settings" you speak with all sections. But some of this section don't begin with a scene change, it can be a scene with high motion, right ? So you tell me to choose manually the missed scene switch ?
I would like to find an automatic way :)
loa-ash
2nd June 2005, 11:24
ops.... sorry.. the menu is not "settings" ... you must go to "tool"....then you see the list of scene change...
sorry again...
mangaforall
2nd June 2005, 12:58
ok thanx a lot, i will have a look tonight ;)
loa-ash
2nd June 2005, 13:00
No prob. :D
mangaforall
2nd June 2005, 13:49
I found in the documentation some useful information than i didn't see the first time :
- Scene Change Freezeframe
Adds a freeze-frame around every sections with a set size. Only applies when the thresholds are met.
- Scene Change Freezeframe (Without Thresholds)
Always places freeze-frames whenever a section of a specified length is found.
I understand now why some scenes switch are missed (I only use "Scene Change Freezeframe"). But I didn't see in the different configuration's panels where I can fix this threshold ?
vBulletin® v3.8.11, Copyright ©2000-2026, vBulletin Solutions Inc.