View Full Version : Deblend (RestoreFPS), help!
Dogway
27th November 2009, 01:01
Hello. Im new here and to avisynth too since a few months. So I learned how to play with basic filters, degrainers, color correction and stuff. Its just I cant deal with the most basic/needed things, those are decimation, interlacing, and deblending.
Specially frame blending, I hate it, and almost all my source files has very strange patterns frame blendings, like 8c 7b, or 1c 4b or so. Investigating a little bit I got to a thread with the unique filter capable of deblending more than 2 consecutives frames AFAIK which is RestoreFPS.
Now I dont have any clue of how to use it, Im stuck at the point of guessing the phase shift(?) using a function I found here (http://forum.doom9.org/showthread.php?&t=94091). I keep changing the phi value in the RestoreFPS flags in AvsP, ranging from 0 to 1. But as blending dissappears in one frame, it appears in the next.
Some help here? Actually the source Im testing now is 29.97fps with 1c 4b pattern where in the 4blend frames the first 2 are very slightly, like 10 or 20% and the other 2 are like 80%. The intention is to restore it to 24fps clean frames, as usual...
Guest
27th November 2009, 01:35
Post an unprocessed source stream sample.
Dogway
27th November 2009, 06:54
oh yes, thanks for your prompt reply!
-Here is the first example with a pattern of:
sample.1 (http://www.megaupload.com/?d=D758S5B4)-3Mb
8c 7b, 8c 7b,8c 7b, 8c 7b, 8c 7b
8c 3b 3c 1b, 8c 3b 3c 1b
c=clean b=blended
15fps
-The second one is a loop of 1c 4b I think, 29.97fps:
sample.2 (http://www.megaupload.com/?d=DIA55MT0)-700Kb
manono
27th November 2009, 10:52
Why are you showing us this garbage? If you want help show us a source and not something you've downloaded and that's already been ruined. Both have already been deinterlaced and nothing can be done.
Dogway
28th November 2009, 02:41
manono please, show some respect.
If you think this is downloaded just PM asking for prove and I can send you a photo with the product, or even the bill. Theres no need of prejudging.
Now, ONTOPIC: The mov file is a very strange rare footage only available through a music cd which contains this video inside. So its not your everyday meal, nor your everyday average DVD source you (and me) would like to work with. So sorry for the blended frames, thats why I came here for help, because if it was easier I would deal with it by myself. But really, its just an example, because I have many (original) sources messed up like this, so the question is not to how to fix that video, but rather how to deal with consecutives blended frames in general. My aim is for learning purposes.
I expect positive attitude feedbacks
Thank you.
poisondeathray
28th November 2009, 02:56
Not much you can do with avisynth; as manono said, it's already been deinterlaced. Most of the avisynth restore functions work on bobbing the fields then deblending, but you have no fields...
You might be able to manually fix each frame in photoshop...
Good luck
manono
28th November 2009, 05:17
If you think this is downloaded just PM asking for prove and I can send you a photo with the product, or even the bill. Theres no need of prejudging.
So now you're telling me that the fact it was in a CD you bought is proof of that MOV file being legit? Surely you're not serious? And did you just forget to try and justify that equally awful H.264 in an AVI that you also foisted on us? I wasn't born yesterday.
Are you also saying the only place that anime is available is on that horrible MOV video? I don't believe you. Both videos were encoded by idiots who don't know any better. Neither is from the (maybe) R2 Japanese DVD or TV cap sources.
I expect positive attitude feedbacks
I already told you (and poisondeathray confirmed) they can't be fixed. How much more positive can you get?
Dogway
28th November 2009, 06:04
I thought something like
1:a=clean
2:ab=blended
3:bc=blended
4:cd=blended
5:de=blended
6:e=clean
ab-a=bw1
de-e=dw1
cd-Fwdw1=cw1
bc-Fwcw1=bw2
2=bw1+bw2=b
3=bc-Fwbw1+cw1=c
4=cd-Fw(bc-bw2)=d
with some necessary fixings in calculating the frameweights could do some of the job. But I know nothing in programming stuff so sorry me if I said something stupid. Maybe - is % and+ is *, but you get the idea.
Anyways as a digital artist I do know Photoshop cant do that, maybe Nuke with expressions (?) lol
oh well... at least now I know I mustn't touch sources with more than 2 blended frames.
thanks
Dogway
28th November 2009, 06:25
Why are you showing us this garbage? If you want help show us a source and not something you've downloaded
Thats the part of the phrase you should have omitted.
So now you're telling me that the fact it was in a CD you bought is proof of that MOV file being legit?
oh man, I didnt buy a cd to the neighbor. I bought it to a UK shop, the reference is BLUED011 and this (http://en.wikipedia.org/wiki/4-Day_Weekend) is the cd info. Really, calm down.
The second source? yes, its downloaded. You want me to remove it? done. Happy? I mean its 2 seconds, I really dont care what you think the videos are, because its only the excuse to show some consecutive blending.
And if you ever heard about Morimoto Koji, you would know there are many few things he has edited, so its really a pain to get something in decent quality. Just yesterday I discovered the same MOV video is in a bluetones DVD, so I might be buying it. But really I just posted as an example, I have other morimoto stuff with similar frameblendings. If I can buy it, dont doubt it, I will buy it, its my collection. If you want to blame someone, go youtube.
Dogway
10th March 2010, 02:41
Ok. As stated I bought the DVD for my Morimoto collection, now the original ALSO has frameblending (fieldblending?), how can I repair this. I show you the source, the script I used and the result. Any ideas?
Ah, and why doesnt megui encode everything? although the m2v shows up to the 2 kids scene.
Source: 10Mb
http://www.sendspace.com/file/z6kz62
Script:
global MeGUI_darx = 4
global MeGUI_dary = 3
setmemorymax(768)
SetMTmode(5)
DirectShowSource("VTS_01_2.demuxed.m2v")
SetMTmode(2)
ColorMatrix(dest=2,hints=false,interlaced=true,threads=2)
AssumeFPS(30000,1001)
tempgaussmc_beta2(2,2,3,EdiMode="NNEDI2", qual=3)
SRestore(frate=23.976)
Result: 2.5Mb
http://www.sendspace.com/file/5hakse
manono
10th March 2010, 04:39
You'll never be able to remove all the blends because there are just too many to begin with. However, your reencoded sample is all messed up, most likely because of incorrect field order. My output doesn't play all jerky like yours does, with the duplicate frames and dropped frames. Someone else will have to help with your script because I use neither MeGUI nor that form of the bobber.
Dogway
10th March 2010, 04:59
It's funny coz prior to that encoding I did exactly the same one, TGMC+srestore, just that I used crf. And... perfect, well, satisfacting. See here (http://www.sendspace.com/file/lrm8dp), is it similar to yours right?
So makes me think srestore fails silently depending on which frame you start the encode. I just would like to know what do I have to do to predict this.
MeGUI? Ignore megui, I will start using the command line soon, as soon as I can. How do you do with the bobber and how can I define order with TGMC? Just hints... what else can I do?
manono
10th March 2010, 17:55
Ignore MeGUI? OK, then I wouldn't use DirectShowSource, which maybe all by itself is responsible for the problems. I don't know for sure as I don't (and would never) use it. Make a D2V and use MPEG2Source.
how can I define order with TGMC?
AssumeTFF()/AssumeBFF()?
Dogway
10th March 2010, 20:36
I just tested with the m2t for this thread using directshow. In real I am using the d2v with DGDecode_MPEG2Source. So yes, thats defintely the reason, but as you saw in my last post, that test which was run with the d2v it is better but still blended frames.
Yes I had in mind "assume". Thank you, let me check all these things and I come back.
Dogway
23rd March 2010, 04:48
Well everything is fixed now. I used TFF as suggested, I kept the script fast and simple just to test the deblending factor. And encoded from command line.
So... srestore is doing its thing, I can see the typical artifacts after the effort of deblending, also by framecomparing source - output. But visually speaking it only seems to deblend about 40% (quite great but), meaning that the left blending is not an isolated exception but rather a consistent annoyance. I would like to know how can I improve it or if you get better results. (other filters,srestore settings, animeivtc...?)
Script:
SetMTmode(5)
setmemorymax(768)
DGDecode_MPEG2Source("comeon.d2v")
SetMTmode(2)
AssumeFPS(30000,1001)
AssumeTFF()
bob()
SRestore(frate=23.976)
trim(1470,2206)
Source 23Mb
http://www.sendspace.com/file/nxodtq
Encoded 14Mb
http://www.sendspace.com/file/llo8eh
manono
23rd March 2010, 18:51
Unblenders depend on at least one field of every frame being 'clean'. Something like 75% of your fields are blended. There's no way to completely unblend it. And the fact that it's anime with all the repeated frames makes the problem even more difficult.
Dogway
23rd March 2010, 21:16
Pity how this gem is that screwed, it deserved something better. But anyways I will encode it this way. Do you know how can I clean the deblended frames while using frate?
Dogway
24th March 2010, 01:54
I discovered something you might have skipped, the source is 24->25->30 fps. I could detect it by checking the fields and selecting every cleanest field in every new original frame, and accidentally got 24.975. Result is quite good, I just need to drop one still blended field every 25 fields so pattern keeps stable. I will discard other fields, and convert these on frames (by resizing), I prefer less resolution than completly messy frames. This is my field pattern.
Example1, example2, keep field
b bc bc cdcd d de e ef ef gh gh gh hi hi ij jk k
a ab ab bc bc cd cd cd de de ef ef ef fg fg gh gh h
a b c d e f g h
I tried with this but dont know if its right:
separatefields
selectevery(12,1,3,6,8,11)
I also want to drop one every 25 frames, dont know if tdecimate will drop "the one" that is blended.
PD: sorry for consecutive post. I misclicked
PD2: I just realised that srestore might be doing just this (field selection), anyway, in this source just setting srestore() outputs 25fps which is normal because thats the source the ntsc version used, although the remaining blended frames reveals that the PAL 25fps version was already blended. Does that make this video optimal for frate=23.976 (original animation rate)? Or should I still srestore on normconversion?
manono
24th March 2010, 03:58
You're saying the 'true' framerate is 24.975? No, it's 23.976fps. Even by your own statement it's 23.976:
I just need to drop one still blended field every 25 fields
If you want to try dropping fields yourself, you might try using CDeblend on the bobbed fields. It's included along with SRestore, in the 'Old' folder. It'll unblend what fields can be unblended and might make your job easier.
...in this source just setting srestore() outputs 25fps which is normal because thats the source the ntsc version used,
No, that's the default behavior of SRestore. Any NTSC DVD you feed it will give you back 25fps, no matter the true 'base' framerate. You give it a 20fps blended silent film it'll still give you back 25fps unless you change it with an FRate command.
Dogway
24th March 2010, 05:13
the pattern turned to be selectevery(12,0,2,5,7,10). But thats 25fps (24+1 heavy blended field/frame). As you said it is so blended that it might be more indicated to use frate=23.976 (because before the PAL->NTSC, it was horrible telecined). There's no way to deblend everything, and using srestore actually outputs slightly better blend decimation than the selectevery, or rePal.
I dont know how srestore actually works, but all films and almost all animations are originally 24fps, only footage principally targeted to TV, or from DV cameras are over 24. I thought srestore worked based on the last stage fps conversion, by rereading this post (http://forum.doom9.org/showthread.php?p=1379076#post1379076)
zee944
24th March 2010, 07:40
Hey,
Take a quick look at here, it may help you:
http://forum.doom9.org/showthread.php?t=143888&page=1
Yadif+SRestore solved my similar problem.
vBulletin® v3.8.11, Copyright ©2000-2026, vBulletin Solutions Inc.