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. |
2nd August 2020, 13:48 | #1 | Link |
Registered User
Join Date: Jun 2020
Posts: 7
|
Bad frameblending in anime source
Hello everyone, I've been working with a particularly poor quality Anime DVD recently and it does seem to have pretty bad frameblending. It is from a NTSC Dvd - so this was quite surprising for me.
Regular IVTC only eliminates some of the telecining, and I've tried to get rid of the rest of them by using Cdeblend, which was a considerable improvement however still hasn't gotten rid of everything. Here are some example clips. (Goes without saying that you should download and not use the google drive preview function) If there is any way to make an uncompressed clip available for testing purposes then I don't know it unfortunately, excuse me in that case. However these clips should show you the issue. Here's my script: Code:
MPEG2Source("%source_file%") Trim(11518,12518) AssumeTFF() Telecide(guide=1) Decimate() import("C:\Program Files (x86)\AviSynth\plugins64\Cdeblend.avs") Cdeblend(omode=2) I am also worried about Cdeblend because it might mess with the animation at times and make it more jittery or recreate/discard wrong frames: is this worry based in reality? |
3rd August 2020, 03:18 | #2 | Link | |
Registered User
Join Date: Feb 2002
Location: San Jose, California
Posts: 4,407
|
Quote:
__________________
madVR options explained |
|
3rd August 2020, 07:50 | #3 | Link |
Moderator
Join Date: Oct 2001
Location: Hawaii
Posts: 7,406
|
You can't IVTC it as it was never telecined. It was field-blended to bring it up to 29.97fps from a PAL 25fps source. The usual procedure is to bob it followed by using SRestore to unblend it.
LWLibavVideoSource("raw_footage.mkv") AssumeTFF()###might not be necessary for the complete video yadifmod(mode=1, edeint=nnedi3(field=-2))###or your favorite bobber SRestore(frate=25) https://www.sendspace.com/file/o291zp And, as Asmodian suggested, provide a sample untouched from the source, not something you reencoded. |
3rd August 2020, 12:10 | #4 | Link | |
Registered User
Join Date: Jun 2020
Posts: 7
|
Quote:
I hope I've done it right. I was using "Save Project and Demux Video" for this. @manono Doing exactly what you suggested: Code:
AssumeTFF() #Force Top Field First yadifmod(mode=1, edeint=nnedi3(field=-2))###or your favorite bobber SRestore(frate=25) Is there anything to be done about this? |
|
3rd August 2020, 23:29 | #5 | Link |
Registered User
Join Date: Dec 2005
Location: Germany
Posts: 1,795
|
This seems not bad. Only 2-3 blends left
Code:
tfm() srestore()
__________________
AVSRepoGUI // VSRepoGUI - Package Manager for AviSynth // VapourSynth VapourSynth Portable FATPACK || VapourSynth Database Last edited by ChaosKing; 3rd August 2020 at 23:31. |
4th August 2020, 08:10 | #6 | Link | |
Registered User
Join Date: Jun 2020
Posts: 7
|
Quote:
I tried to append this to the previous code snippets that were posted here. Unfortunately there is still blending present in scenes with a lot of motion. And now the fps is at 11.988fps, i would like to restore the appropriate 23.976fps afterwards without losing any of the original pacing of the animation. Is there any risk here? |
|
4th August 2020, 08:46 | #7 | Link |
Registered User
Join Date: Dec 2005
Location: Germany
Posts: 1,795
|
How about this?
Code:
tfm() d = vsTBilateral() Cdeblend(omode=2, dclip=d) d = vsTBilateral() srestore(frate=23.976, speed=-5, dclip=d) or use any other denoiser, it's just to improve blend detection.
__________________
AVSRepoGUI // VSRepoGUI - Package Manager for AviSynth // VapourSynth VapourSynth Portable FATPACK || VapourSynth Database |
4th August 2020, 09:15 | #8 | Link |
Registered User
Join Date: Jun 2020
Posts: 7
|
So right now my script looks like this:
Code:
yadifmod(mode=1, edeint=nnedi3(field=-2)) SRestore(frate=25) tfm() d = vsTBilateral() Cdeblend(omode=2, dclip=d) d = vsTBilateral() srestore(frate=23.976, speed=-5, dclip=d) |
4th August 2020, 09:33 | #9 | Link |
Registered User
Join Date: Dec 2005
Location: Germany
Posts: 1,795
|
Because your script does not make sense. yadif and tfm do essentially the same. Also the srestore(25) can (should) not be combined with the rest like you did.
Use either the first version or the second, but don't combine them...
__________________
AVSRepoGUI // VSRepoGUI - Package Manager for AviSynth // VapourSynth VapourSynth Portable FATPACK || VapourSynth Database |
4th August 2020, 09:42 | #10 | Link |
Registered User
Join Date: Jun 2020
Posts: 7
|
Thanks for correcting my rookie mistake here.
I have now removed the first two lines accordingly. However i am still losing keyframes. Furthermore comparing the two methods Method 1: Code:
yadifmod(mode=1, edeint=nnedi3(field=-2)) SRestore(frate=23.976) Code:
tfm() d = vsTBilateral() Cdeblend(omode=2, dclip=d) d = vsTBilateral() srestore(frate=23.976, speed=-5, dclip=d) Method 2 however removes some keyframes entirely. |
4th August 2020, 11:04 | #11 | Link |
Registered User
Join Date: Dec 2005
Location: Germany
Posts: 1,795
|
You most likely need to live with a tradeoff between no blends and missing frames or some blends but less.
Code:
tfm() d =crop(16,8,-16,-8).vsTBilateral() srestore(frate=23.976, speed=-5, dclip=d, omode=4) You could also try different thresh values and see if it helps. http://avisynth.nl/index.php/Srestore Maybe some deblend expert has some better ideas
__________________
AVSRepoGUI // VSRepoGUI - Package Manager for AviSynth // VapourSynth VapourSynth Portable FATPACK || VapourSynth Database |
4th August 2020, 13:04 | #12 | Link |
Registered User
Join Date: Jun 2020
Posts: 7
|
Thank you, but I think in my case I'd rather have more blends than missing keyframes. Anime already barely has any keyframes so taking some away does not feel appropriate
So I guess I'm looking into finding just the right settings for that. But I'd be really curious about what a deblend expert might be able to say about this. |
5th August 2020, 07:44 | #13 | Link |
Moderator
Join Date: Oct 2001
Location: Hawaii
Posts: 7,406
|
There's just too many blended fields/frames to be able to get rid of them all. In addition, the pattern changes from time to time as it was edited as video, and it takes SRestore a few frames to latch onto a new pattern. However, after thinking about what ChaosKing provided, I decided he's right that it was field blended from a 23.976fps source, not a PAL 25fps source.
So, I modified my script a bit: yadifmod(mode=1, edeint=nnedi3(field=-2)) Srestore(23.976) But your source is pretty bad, even if it is from a retail DVD. |
5th August 2020, 08:52 | #14 | Link |
Pig on the wing
Join Date: Mar 2002
Location: Finland
Posts: 5,730
|
I've sometimes created an analysis clip with ReduceBy2() and it has worked better than just denoising the original one.
I'd also just use NNEDI3 to bob, so my attempt would be like this: Code:
NNEDI3(field=-2, qual=2) d=ReduceBy2() Srestore(frate=23.976, speed=-1, dclip=d)
__________________
And if the band you're in starts playing different tunes I'll see you on the dark side of the Moon... Last edited by Boulder; 5th August 2020 at 14:59. |
5th August 2020, 14:12 | #15 | Link |
Registered User
Join Date: Jun 2020
Posts: 7
|
It is. Infamously bad. There's a bluray version of that movie with great quality however it is cropped. So i wanted to see what I can make of the uncropped DVD version.
@Boulder that does seem to be the best rate of success so far! I think I'll go with that. Thanks |
5th August 2020, 14:59 | #16 | Link |
Pig on the wing
Join Date: Mar 2002
Location: Finland
Posts: 5,730
|
Sorry, I messed up a bit. The detection clip part must be after bobbing with NNEDI3 but you probably figured it out already.
__________________
And if the band you're in starts playing different tunes I'll see you on the dark side of the Moon... |
Thread Tools | Search this Thread |
Display Modes | |
|
|