Welcome to Doom9's Forum, THE in-place to be for everyone interested in DVD conversion. Before you start posting please read the forum rules. By posting to this forum you agree to abide by the rules. |
20th May 2008, 03:59 | #1 | Link |
Registered User
Join Date: Feb 2008
Posts: 56
|
anime: scene change - bad frame replacement
Hello gurus,
I am attempting to find a solution to my strange problem. It seems there has never been such discussion on the forum or I didn't find it although I did a looong search. What I'm talking about is the bad montage (keyword i searched for with no result) or if you prefer bad editing or again bad frame pasting. Actually I don't know what it's called but I find it so often that it's starting to annoy me, so I was wondering weather there is a way to eliminate this problem. It seems that in old anime on every scene change there is a bad frame (1 or 2 at max) that results in an annoying frame jump and I was wondering if there was an automatic way to detect scene changes and replace the frame accordingly. Example: - detect scene change on frame 200 - replace frame at 200 with frame at 201 anyway here are a couple of screenshots so you can better understand what i mean: You can see the distortion (or whatever it's called) at the top in the frame. Thanks in advance for any help -gg edit: appearently the keyword was "scene switch" and freezeframe but the only solution is performed manually with yatta which is a bit time consuming... edit: still, only one topic... so in doom9 gurus I trust Last edited by grumpygamer; 20th May 2008 at 04:08. Reason: topic found |
20th May 2008, 18:36 | #4 | Link |
Member
Join Date: Dec 2001
Location: somewhere far beyond
Posts: 270
|
You want something like Improvesceneswitch. It was once part of the removedirt filter:
http://forum.doom9.org/showthread.ph...ovesceneswitch http://forum.doom9.org/showthread.ph...ovesceneswitch Sclav by akupenguin should also help. No clue where you can find it atm, use forum search/google. |
21st May 2008, 01:51 | #5 | Link |
Registered User
Join Date: Feb 2008
Posts: 56
|
thanks, seems nothing automated is available in 2008...
I could try and code it myself if I had the skills. As already stated it is quite simple. If (keyframe detected) and (scenehaschanged) then framereplace(thisFrame-1, thisFrame-2) assuming the detection occurs on the second first frame of the scenechange and framereplace args are framereplace (thisframe, with thatframe) meh... kind'a hard |
21st May 2008, 02:36 | #6 | Link |
Sleepy overworked fellow
Join Date: Feb 2008
Location: Maple syrup's homeland
Posts: 933
|
Following = big guess because it's the first time I've ever seen this.
Maybe this it is the result of some bad ivtc... it looks like it's missing a line from one of the fields. Could you upload a small unprocessed sample containing such a scene change?
__________________
AnimeIVTC() - v2.00 -http://boinc.berkeley.edu/- Let all geeks use their incredibly powerful comps for the greater good (no, no, it won't slow your filtering/encoding :p) |
21st May 2008, 04:34 | #7 | Link |
A geek wannabe
Join Date: Apr 2007
Posts: 231
|
Sclav is part of YATTA's plugin pack.
While it seems quite simple to you, an automated approach to what you want it may leave you with broken pans. I know it's time consuming, but I think it is manual freezeframing with YATTA. I recall somebody having the same issue as you and a user sugguested him to use this: http://avisynth.org/stickboy/RemapFrames.zip Last edited by [P]ako; 24th May 2008 at 15:45. Reason: oops missing word |
21st May 2008, 06:37 | #8 | Link |
Hates all his encodes
Join Date: Sep 2003
Posts: 166
|
These problems arise from older cel animation having their film literally cut together.
What you're seeing is glue and/or tape. The easy fix is freezeframing, and this actually great, except it is not useful on panning shots or shots in which the very next frame is different... Also, this reduces jitter to an almost unnatural point (I know we encoders often try to reduce frame jitter, but let's face it, it's technically natural to the source), so it may look awkward to have a frame or two of absolute steadiness. The hard solution is painstakingly photoshopping these frames as some newer anime remasters do. They digitally remove the splices of these frames, but by no means is this automated... EDIT: Here's an example of *Terrible* case of a scene change, and the restored version on the right. (2000 R1 vs. 2007 R2)
__________________
http://thevideophile.blogspot.com/ Watch and be amazed by my frustration over the video world! Last edited by dbzgundam; 21st May 2008 at 06:40. |
21st May 2008, 07:16 | #9 | Link |
Registered User
Join Date: Feb 2008
Posts: 56
|
I understand your idea of photoshopping the bad frames, but believe me at the time being I don't have THAT amount of time!
Also replacing them manually is a not feasible at the moment. So i guess I'll try Remapframes and hope for the best. @thetoof hi! come to help me over here as well?? (now where is that donate button) :P you can see the same artifacts in scene changes also on the other thread's samples http://forum.doom9.org/showthread.php?t=137893 if you already have them samples downloaded you can just check at the bottom of the frame before a scene change, they occur at the bottom there but the concept is the same: glue or cellar tape, damn them, what cheap stakes! Anyway scene change detection is still a problem, manual freezeframe is not a viable solution for me so I guess I'll just have to wait for a remaster or some other guru that might come up with a ultra-sophisticated function! |
21st May 2008, 15:14 | #10 | Link |
Registered User
Join Date: Dec 2007
Posts: 639
|
I noticed the frame movement after scene changes as well, in Flanders no Inu.
It's better there... but the colors change a bit as well. first frame of scene | second frame of scene sample 1 - 1 | 2 sample 2 - 1 | 2 sample 3 (color/brightness change is more visible here) - 1 | 2 I remember there was one scene where the change was horrible. It was a dark scene, and it looked like somebody did Tweak(bright=10) on the first frame. Very blergh. Is there something I can use to detect scene changes? This happens on *every* scene change with no exception, so using that script to freezeframe the first frame of each scene would be sufficient. Later, I could play only those frames with interleave to make sure I didn't lose any motion. |
21st May 2008, 16:15 | #12 | Link | |
warpsharpened
Join Date: Feb 2007
Posts: 787
|
Quote:
|
|
21st May 2008, 17:31 | #13 | Link |
LaTo INV.
Join Date: Jun 2007
Location: France
Posts: 701
|
Try this:
Code:
function BadSCReplace(clip i, int "thr") { thr = default(thr, 50) test = i.YDifferenceFromPrevious() change = ( test > thr ) ? i.trim(0,1) : i return change } --> ajust the "thr" as you like the result (low = accurate, high = useless) Last edited by LaTo; 21st May 2008 at 17:34. |
21st May 2008, 18:19 | #14 | Link |
Registered User
Join Date: Apr 2002
Location: Germany
Posts: 5,391
|
LaTo, that ain't work at all. Functions of Avisynth's conditional environment can only be used - you guess it - in Avisynth's conditional environment.
Besides, a simple thresholded difference to the previous frame isn't smart enough. That diff might be rather low e.g. in dark scenes, and might be rather high e.g. in pannings, explosion scenes and such, yielding to frame freezes in places where you definetly don't want them. This method has been used already yeeaars ago. The result is it works in some places and in some not. High thresholds will miss many scenechanges, low thresholds give many false detections. In between, you get a mix of both. I'd rather try try examining the 2nd derivative ... example: look at the diff-to-previous over three frames. If the middle one is reasonably bigger then the surrounding two ones, then a scenechange is likely. To be sure, take a 5-frame window, and evaluate the proportion of the diff-of-differences at the start & the end of that window to the one in the middle.
__________________
- We´re at the beginning of the end of mankind´s childhood - My little flickr gallery. (Yes indeed, I do have hobbies other than digital video!) Last edited by Didée; 21st May 2008 at 18:23. |
21st May 2008, 18:42 | #15 | Link | |
LaTo INV.
Join Date: Jun 2007
Location: France
Posts: 701
|
Quote:
Any way to do this outside of Avisynth's conditional environment ??? |
|
21st May 2008, 19:23 | #16 | Link | |
Registered User
Join Date: Apr 2002
Location: Germany
Posts: 5,391
|
Why outside? It's not that difficult. In the Avisynth doc's, we read:
Quote:
__________________
- We´re at the beginning of the end of mankind´s childhood - My little flickr gallery. (Yes indeed, I do have hobbies other than digital video!) |
|
21st May 2008, 20:45 | #18 | Link |
Registered User
Join Date: Apr 2002
Location: Germany
Posts: 5,391
|
No, no way. The Conditional Filters give runtime results on a frame-per-frame basis. Function parameters are static, their input parameters are determined when the script gets initialized.
Depending on what exactly you want to to, you probably can include the content of your "other function" into the Conditional Environment, so that it can evaluate the results of those runtime functions. (Not that it were a shiny example of clean coding, but - ) you might have a look into the script "Restore24". There, there is lots of stuff going on in the conditional environment, a good bunch of userdefined functions are running completely within the Cond.Env., feeding each other with their results etc.
__________________
- We´re at the beginning of the end of mankind´s childhood - My little flickr gallery. (Yes indeed, I do have hobbies other than digital video!) |
22nd May 2008, 10:43 | #20 | Link | |
LaTo INV.
Join Date: Jun 2007
Location: France
Posts: 701
|
Quote:
|
|
Tags |
anime |
Thread Tools | Search this Thread |
Display Modes | |
|
|