Log in

View Full Version : another restore function


Pages : 1 2 3 4 5 6 [7] 8 9 10 11 12 13 14 15 16 17 18

18fps
24th November 2008, 11:23
Thank You! I'll try it.

krosswindz
25th December 2008, 07:57
@momonster I am not sure what the problem is but I am facing issues with srestore with movies over 150mins with the rip crapping out. If I replace dont use srestore for de-interlacing everything goes fine.

manono
25th December 2008, 16:10
Not just you, krosswindz. It seems to have a memory leak. It uses up all my memory (2 GB) and then quits. I sometimes have to divide the Lagarith creation into 2 parts when using SRestore.

While encoding with a script using SRestore, do a CTRL-ALT-Delete from time to time and have a look at the encoder's (VDubMod for me) memory usage.

krosswindz
26th December 2008, 17:38
Not just you, krosswindz. It seems to have a memory leak. It uses up all my memory (2 GB) and then quits. I sometimes have to divide the Lagarith creation into 2 parts when using SRestore.

While encoding with a script using SRestore, do a CTRL-ALT-Delete from time to time and have a look at the encoder's (VDubMod for me) memory usage.

in all my avisynth scripts I have setmemorymax(512) as a result of which whenever I check my encoder xvid_encraw/x264 never seem to take more than 500-600MB. I only have 1G of memory in my computer :(.

elguaxo
14th January 2009, 13:36
Not just you, krosswindz. It seems to have a memory leak. It uses up all my memory (2 GB) and then quits. I sometimes have to divide the Lagarith creation into 2 parts when using SRestore.

the memory leak is huge. I had memory leak issues in the past (see here (http://forum.doom9.org/showthread.php?p=1092652#post1092652)), but not this big. I'm doing a lossless first pass and I'm using srestore's default cache value, but 2GB of RAM is not enough.

It seems I must use manono's trick and divide the encode into smaller parts.

levi
16th January 2009, 20:53
I can also confirm a memory leak :(

Perscitus
19th January 2009, 09:59
I am trying to fix a blending problem using mretsore, it's my first time using the filter so I'm sure I've done something wrong. With this script I still get blending, it's occurring mostly at the scene changes. Any suggestions on an adjustment that might improve it?
d2vpath="C:\DVD\Encodes\gto\gto01test.d2v"
DGDecode_mpeg2source(d2vpath)

d = last.bob(-0.2,0.6).reduceflicker(strength=1)
tdeint(mode=1)
mrestore(numr=2, denm=5, mode=0, dup=1, dclip=d)

crop(8,6,-8,-10)
Tweak(sat=1.1)
Lanczos4Resize(640,464)

My Source: Download here (http://wesker.home.comcast.net/GTO-01-testsample.demuxed.m2v)

MOmonster
27th January 2009, 13:03
@all
Yes there is a memory leakage. That more things are calculated inside the conditional enviroment that bigger it gets. I don't know how to fix it. If I find the time for this after my next exams I will start writing v3.0, but it will need its time.
If your script is not to complex, use setmemorymax(64) for the start. If this doesn't work you have to divide the encode into parts (lossless isn't always needed). I'll try to fix it in the future.

@Perscitus
I download your sample and will have a look on it. Did you already tried it with default settings?

thetoof
27th January 2009, 14:57
MOmonster, maybe the solution (or the beginning of it) lies in GRunT. I don't think there was a memory leak fix... but heh, could be worth giving a try. If you feel like posting there for help: http://forum.doom9.org/showthread.php?t=139337
edit: Oh, just saw you already went in that thread...

MOmonster
27th January 2009, 15:57
@Perscitus
Sorry, but your source is just not repairable.

@thetoof
I already had the same idea, but GRunT doesn't change anything. Like I said, if I'll find the time, there will be v3.0.

thetoof
28th January 2009, 03:16
Remember that nice chroma_rep you wrote a few months ago? (stoopid question since it's only a few posts above, but heh :p)
I tried it on this (http://www.mediafire.com/?o2jn124wbjm) sample posted in the AnimeIVTC thread (check the beam blast at the beginning, as well as a few thingies throughout the sample) and it did more bad than good, even though it looked like the same problem as the Simpson sample you originally wrote it for.

Any hints?
Thanks.

MOmonster
30th January 2009, 08:35
Chroma_rep is really special, that's why I don't support it so much;)
This is a real NTSC double blending, but only present in the chroma. In the German forum there was already such a source (Batman NTSC).
This was the result:
matched = last.tfm(mChroma=false,field=1,mmsco=false,micmatching=0)
bdeint = last.fielddeinterlace(blend=true,threshold=16,dthreshold=4)
bdeint = mergeluma(last,bdeint)
bdeint.srestore(omode="pp0")
mergeluma(last,matched)
tdecimate(mode=1,chroma=false)

It doesn't work 100% perfect, but the output is pretty good.

Arshad07
1st February 2009, 01:09
anyone can help me sort out these ghosting problems please:confused:

http://imuploader.com/images/b486jtl2es1gwk3pfot.png http://imuploader.com/images/9cgxk3oicy11evd6lab.png http://imuploader.com/images/twp82ue6escxzk4gfo.png http://imuploader.com/images/8wg7juqcvze0vjeb5pr.png http://imuploader.com/images/cfvwv6n2eesr5c5uyz1v.png http://imuploader.com/images/tr0v1r82t5rga60yqmo7.png http://imuploader.com/images/kzbubjphdd4jweoqw2t1.png http://imuploader.com/images/xmwqo8byfpbl9z9g8sx.png http://imuploader.com/images/sn20lncn8q6rschxwogg.png http://imuploader.com/images/vopg4yx7lulnymdb581c.png

Script

import("E:\k-lite\R_pack\srestore.avs")
DGDecode_mpeg2source("E:\Bewafaa (2005) Untouched DVD9 NTSC DrG\rip\B.d2v", info=3)
ColorMatrix(hints=true, interlaced=true, threads=0)
srestore(frate=25,omode=6,dmode=4,blocks=16,chroma=true)
crop( 2, 52, -2, -56)
Spline64Resize(656,288)

Sample

http://www.sendspace.com/file/lv4mau

thanks :)

manono
1st February 2009, 02:54
Hi-

Pictures do no good at all. You wasted your time adding them. We don't need a 75MB 90 second sample. And the one you chose wasn't all that good because of all the quick cuts. A nice 10-15 second sample with steady movement is usually enough to figure out what's going on. In this case, though, the script was enough. You have to bob the video before using SRestore:

Yadif(Mode=1,Order=1)#or your favorite bobber
SRestore()

I can't get your script to open, what with all the errors. Maybe you're using an older version of SRestore. Or maybe I don't know what I'm doing. And, if I were you, I'd also try and do something about the horribly blown-out whites and crushed blacks typical of lousy Indian DVDs.

thetoof
1st February 2009, 04:12
This is a real NTSC double blending, but only present in the chroma.
Maybe I'd get it if I wasn't that tired, but atm I need an explanation of the difference between the 2 "double chroma blending" since they look pretty similar to me.

MOmonster
1st February 2009, 19:22
@Arshad07
I'm downloading your file and will report later.

@thetoof
This is the NTSC-Doubleblending pattern:
aa bb bc cd dd ee
The Chroma is blended this way but the luma is just interlaced this way (pulldown). Srestore can be used for this.

The simpson sample has (at least I remember it this way) such sequences:
aa bb cd cd dd ...
And these sequences are sporadic. Chroma_rep use the correlation between chroma and luma to find these doubleblends. This case is very special.

MOmonster
2nd February 2009, 21:15
@Arshad07
Just bob the source before using srestore. Deblocking could also help.

EuropeanMan
4th February 2009, 01:45
Strange...with mRestore, I couldn't work on sources longer than ~ 120 minutes or so...but these days having no problem with 180+ minute films with sRestore...no memory leak whatsoever. Could anyone explain this?

MOmonster
4th February 2009, 08:10
There is still a memory leakage in srestore. On my pc it's reduced compared to mrestore, but depending on the Avisynth version and some other things it seems to be the oposite case. I don't know why, but I try to do it better in the next version.

EuropeanMan
4th February 2009, 18:47
^ will wait for next version as well. fyi, i just finished encoding 227 minute film via srestore...had no issues at all. will try it now on a ~360 minute film (Fanny och Alexander; Ingmar Bergman film)

i've got a intel core2duo t5550 lappy with 3GB ram...that's it. i did NOT use setmemorymax/MT at all either...

jason288
6th February 2009, 05:38
Originally posted in the animeIVTC thread:
Can anyone tell me what I should be using for this mess: http://www.mediafire.com/download.php?itmminhzm4m

I have tried mode=1 and mode=2 but it doesn't get rid of the ghosting.

Thetoof suggested that I ask over here in case anyone had any ideas. So here I am.

Any help is greatly appreciated.

MOmonster
6th February 2009, 07:20
#your bobber
srestore(frate=23.976)
This will improve the output compared to default settings, but the output is still everything else than perfect. Some parts are just overblended and srestore has problems to follow the jumpy pattern.
I will use your sample to improve the next version.

canuckerfan
6th February 2009, 09:18
^i have a sample here in which i wasn't able to get rid of all the blends (I tried all the modes in srestore 2.7c). I've uploaded it here in case anyone wants to take a look: http://www.sendspace.com/file/uwkt1y

manono
6th February 2009, 11:26
Hi-

Have you already tried:

Yadif(Mode=1,Order=1)#or your favorite bobber
SRestore(Frate=23.976)

You'll never be able to unblend it entirely because there are often 3 or more blended fields in a row. Bob it and check out the birds flying about half way through. For an unblender to work 100% you need more "clean" fields than you have there. The same thing happens when the domed buildings come into view a bit later. About the best you can hope for is to get the right framerate with a minimum of blends left over, and for it to play smoothly.

canuckerfan
6th February 2009, 19:18
^yea, I did try that. and you're right. there is some residual blending on birds and the side of the domes. still looks way better than before, though. maybe the next version might improve things a bit. either way, thanks for lookng:)

thetoof
7th February 2009, 18:42
@thetoof
This is the NTSC-Doubleblending pattern:
aa bb bc cd dd ee
The Chroma is blended this way but the luma is just interlaced this way (pulldown). Srestore can be used for this.

The simpson sample has (at least I remember it this way) such sequences:
aa bb cd cd dd ...
And these sequences are sporadic. Chroma_rep use the correlation between chroma and luma to find these doubleblends. This case is very special.
"Rested eyes see well" - someone sometime
I just had a look and it's obvious; chroma is double blended in the last sample and is swapped between fields in the Simpson sample. I had no access to the files and didn't recall that difference when I posted... Nways, thanks.

canuckerfan
8th February 2009, 01:08
Hi-

Have you already tried:

Yadif(Mode=1,Order=1)#or your favorite bobber
SRestore(Frate=23.976)

You'll never be able to unblend it entirely because there are often 3 or more blended fields in a row. Bob it and check out the birds flying about half way through. For an unblender to work 100% you need more "clean" fields than you have there. The same thing happens when the domed buildings come into view a bit later. About the best you can hope for is to get the right framerate with a minimum of blends left over, and for it to play smoothly.
i'm happy to report that using tempgaussmc as a bobber has improved the results. the blending is still slightly visibly, but not as much now. wow, didn't know a good bobber could make such a difference.

stej4u
8th February 2009, 05:33
Can someone help me with deinterlacing this indian source:

sample 1: http://www.sendspace.com/file/f6glkv

sample 2: http://www.sendspace.com/file/ysmmrb

If a script works for sample 1 then it doen't work for sample 2 and vice versa.

this is what i have:

yadif(mode=1,order=1)
srestore()


ends up at 25fps

thetoof
8th February 2009, 05:42
I have a new challenge for you MOmonster: http://forum.doom9.org/showthread.php?p=1246756#post1246756

Dunno if anything can be done since more than 2 frames in a row are affected, but this looks like something chroma_rep is made for.

MOmonster
8th February 2009, 09:45
@stej4u
Use srestore(frate=23.976) instead. There are still the temporal artefacts of a filter used after blending, but the blending is gone and the motion smooth.

@thetoof
Allways these exotics you are coming up with. Theoretical with a very very complex filter restoring would be possible. But this is the theory. Have a look at the V-Plane, it's completly overblended. Y and U are fine, but the V-Plane is really a mess:
tdeint(mode=1)
mt_lut("128",y=1,u=1,v=3)

manono
8th February 2009, 15:30
Can someone help me with deinterlacing this indian source
Welcome to the forum,

Most of Sample 2 is useless for determining the framerate. The only decent part is the woman walking along outside the house. Someone talking on the phone does no good at all. The No Entry sample, while unnecessarily large, is a much better sample because there's nearly non-stop movement. In the future please try and find samples with steady movement. The framerate is 23.976fps, but srestore(frate=23.976) isn't good enough. No disrespect is intended to MOmonster who, I'm sure, has better things to do than examine every sample carefully. It leaves too many blended frames and duplicate frames, and drops too many unique frames. I had my best luck with:

Yadif(Mode=1,Order=1)#or your favorite bobber
SRestore(Frate=29.97)
TDecimate(Mode=0,Cycle=15,CycleR=3)

stej4u
8th February 2009, 23:57
Welcome to the forum,

Most of Sample 2 is useless for determining the framerate. The only decent part is the woman walking along outside the house. Someone talking on the phone does no good at all. The No Entry sample, while unnecessarily large, is a much better sample because there's nearly non-stop movement. In the future please try and find samples with steady movement. The framerate is 23.976fps, but srestore(frate=23.976) isn't good enough. No disrespect is intended to MOmonster who, I'm sure, has better things to do than examine every sample carefully. It leaves too many blended frames and duplicate frames, and drops too many unique frames. I had my best luck with:

Yadif(Mode=1,Order=1)#or your favorite bobber
SRestore(Frate=29.97)
TDecimate(Mode=0,Cycle=15,CycleR=3)
thx you MOmonster and manona for your time.

I've already tried: srestore(frate=23.976), its doest work smoothly
I found something similar to that of manona:

yadif(mode=1, order=1)
CDeblend()
BlendBob(badFrames=0)
TDecimate(Mode=0,Cycle=15,CycleR=3)


edit: sorry im still a noob but why did you use frate=29.97 when it is already 29.97 after yadif?

manono
9th February 2009, 00:30
Because it isn't 29.97fps after Yadif. Yadif is being used as a bobber (Mode=1) and after using it (and before the other 2 lines) the framerate is 59.94fps.

stej4u
9th February 2009, 03:55
Because it isn't 29.97fps after Yadif. Yadif is being used as a bobber (Mode=1) and after using it (and before the other 2 lines) the framerate is 59.94fps.
Thanks I forgot mode=1 was bobbing. Which one would be a better choice then, Srestore or BlendBob to reduce it to 29.97 fps?

manono
9th February 2009, 04:19
For your current source SRestore is better. Where'd you get that script anyway? BWT? It sounds like something I used and maybe recommended before SRestore was around and when MRestore wasn't working well with some source.

stej4u
9th February 2009, 04:47
For your current source SRestore is better. Where'd you get that script anyway? BWT? It sounds like something I used and maybe recommended before SRestore was around and when MRestore wasn't working well with some source.

I read it on a site, I just checked again and found this: [for a source] "At this time Srestore didnt exist when i was testing on this..."

MOmonster
9th February 2009, 11:39
... The framerate is 23.976fps, but srestore(frate=23.976) isn't good enough. No disrespect is intended to MOmonster who, I'm sure, has better things to do than examine every sample carefully. It leaves too many blended frames and duplicate frames, and drops too many unique frames. ...

You are right, I took only a short look on the sample (just short on time).
Will do it better the next time. Thanks for your correction.

Lucky Luciano
15th February 2009, 00:47
Hi! First of all thank you very much for this script! It has helped me on numerous occasions! But now I think I'm stuck.

I have a DVD without any interlaced or combed frames but it has a pattern of 4 progressive frames and 2 blended ones. The DVD runtime was about 4% lower than IMDb so I assumed a PAL->NTSC transcode yet srestore doesn't work and I'm getting a 3:2 pattern with 25fps. I've tried playing with the speed and mode parameters but with no better result.

You can find a couple of small samples in any of the links below (50 MB)
http://www.mediafire.com/download.php?a2wdjzmmdmt
http://rapidshare.com/files/198126594/samples.zip
http://www.megaupload.com/?d=M66I6PD6

I'd greatly appreciate any advice!

MOmonster
15th February 2009, 19:57
This is IVTC-Doubleblending. Basically this is restoreable, but in your source the blend weights aren't constant. Until now there is no function that can restore this.

stej4u
17th February 2009, 04:16
Welcome to the forum,

Most of Sample 2 is useless for determining the framerate. The only decent part is the woman walking along outside the house. Someone talking on the phone does no good at all. The No Entry sample, while unnecessarily large, is a much better sample because there's nearly non-stop movement. In the future please try and find samples with steady movement. The framerate is 23.976fps, but srestore(frate=23.976) isn't good enough. No disrespect is intended to MOmonster who, I'm sure, has better things to do than examine every sample carefully. It leaves too many blended frames and duplicate frames, and drops too many unique frames. I had my best luck with:

Yadif(Mode=1,Order=1)#or your favorite bobber
SRestore(Frate=29.97)
TDecimate(Mode=0,Cycle=15,CycleR=3)
Well, I encoded the entire film and I'm still not satisfied. try to encode this sample with Yadif(Mode=1,Order=1).SRestore(Frate=29.97).TDecimate(Mode=0,Cycle=15,CycleR=3)
and some unique frames get deleted.

sample: http://www.sendspace.com/file/xka2rh

canuckerfan
17th February 2009, 04:46
Well, I encoded the entire film and I'm still not satisfied. try to encode this sample with Yadif(Mode=1,Order=1).SRestore(Frate=29.97).TDecimate(Mode=0,Cycle=15,CycleR=3)
and some unique frames get deleted.

sample: http://www.sendspace.com/file/xka2rh
try TDecimate with mode=1. i don't know if it'll work, but at this point for you it's probably worth a shot.

stej4u
17th February 2009, 05:04
try TDecimate with mode=1. i don't know if it'll work, but at this point for you it's probably worth a shot.
no, still deletes unique frames. I tried

yadif(mode=1, order=1)
BlendBob(badFrames=0)
TDecimate(Mode=0,Cycle=15,CycleR=3)

I'm not sure why but it seems to work better.

canuckerfan
17th February 2009, 06:05
^in some cases it just might. but go with whatever you prefer. if you have residual combing after that script, you can try a yadif+nnedi combo. or if your computer is ready for it you can try mvbob/mcbob/tempmcgauss. a good smart bobber will only help blendbob more.

MOmonster
17th February 2009, 07:54
I had a closer look on your source (sample 1), but I can`t recommed this (just because of the pattern):
SRestore(Frate=29.97).TDecimate(Mode=0,Cycle=15,CycleR=3)
Just for fun I tested tdeint(mode=1).srestore(frate=24) and in the first sample it just worked (no annoying blends, dups or missing fields). I like it more than the blendbob methode, maybe it's something with your encoding (srestore don't like all encoders:mad:) or maybe I just tested the wrong scenes.

stej4u
17th February 2009, 09:37
Just for fun I tested tdeint(mode=1).srestore(frate=24) and in the first sample it just worked (no annoying blends, dups or missing fields). I like it more than the blendbob methode, maybe it's something with your encoding (srestore don't like all encoders:mad:) or maybe I just tested the wrong scenes.
still deletes some unique frames [on one scene]. :(

stej4u
19th February 2009, 06:40
I used yadif and then used srestore to bring this particular source down to 25 fps but ghosting is created: http://i39.tinypic.com/mjpf7d.jpg

are there any settings that I can use to remove/reduce the ghosting?

Who Am I ?
10th March 2009, 13:46
^
those are more off nasty edge sharpening ( induced/retained ? ) halo's .. try something like dehalo_alpha( agressive settings ) and something like fizzkiller() or checkmate() to clean the dancing noise off as well which seems pretty evident in there .

jason288
12th March 2009, 01:32
So I was wondering if anyone might know what I could do with this: http://www.mediafire.com/?njmw5yj4nmm

Its from the new powerpuff girls DVD. I asked in the animeivtc thread and thetoof said that he had an idea and then he retired.

I have something for it thanks to MOmonster's good tips, but I'm looking into how it could be automated to become a viable solution.

Any help with this would be appreciated.

MOmonster
14th March 2009, 01:52
With a pretty complex function the chroma problem can be reduced a lot (reduced, not solved!), but at the moment I really don't have the time for this. If you have any possibilty to get a better source, imo you should use it.

jason288
14th March 2009, 16:59
With a pretty complex function the chroma problem can be reduced a lot (reduced, not solved!), but at the moment I really don't have the time for this. If you have any possibilty to get a better source, imo you should use it.

I will look and see if I can find anything better, however I don't think these is. If I cant find anything then I will wait until you have some free time to come up with a script. Thanks again for all your help.