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.

 

Go Back   Doom9's Forum > Capturing and Editing Video > Avisynth Usage

Reply
 
Thread Tools Search this Thread Display Modes
Old 14th May 2006, 06:45   #101  |  Link
Backwoods
ReMember
 
Backwoods's Avatar
 
Join Date: Nov 2003
Posts: 416
I've been trying every version of Crestore and FixBlendIVTC up to this point and it seems I'm getting the same results with Mrestore. Possible that this movie is not recoverable? I provided a sample below. Thanks in advance.

Right Click, Save As
Backwoods is offline   Reply With Quote
Old 14th May 2006, 12:27   #102  |  Link
MOmonster
Registered User
 
Join Date: May 2005
Location: Germany
Posts: 495
I have no avisynth here, but in virtualdub your source is progressive blended. Because your short sample has no 24fps parts Iīm not sure about the complete movie, but for your short sample Cdeblend (+ decimator if wanted) should work. Maybe you can upload a sample with a 24fps scene (fast motion or picture effects) if there is such a scene in your movie.
MOmonster is offline   Reply With Quote
Old 16th May 2006, 09:40   #103  |  Link
MOmonster
Registered User
 
Join Date: May 2005
Location: Germany
Posts: 495
@Backwoods
For your short sample Cdeblend(dmode=8,omode=1,sd=true) cleared all blends, but I really donīt know if this will work the whole movie.
MOmonster is offline   Reply With Quote
Old 16th August 2006, 09:17   #104  |  Link
MOmonster
Registered User
 
Join Date: May 2005
Location: Germany
Posts: 495
Update:
There was a bug in the profile settings. Using mode>=0 and smuse>0 doesnīt have the wished effect, so Mrestore and Crestore are separate functions again. There are some internal tweaks and the readme is changed. Crestore is recommed for 12fps sources (animes and so on) and pal restoring from ntsc footage. For other sources Mrestore should be used.
Mrestore and Crestore wonīt run together in one script, because same global variables. But using both in one script makes indeed no sence, so I didnīt change it.

Last edited by MOmonster; 21st August 2006 at 07:12.
MOmonster is offline   Reply With Quote
Old 19th August 2006, 00:11   #105  |  Link
MacAddict
XviD User
 
Join Date: Oct 2004
Location: Ky
Posts: 190
@MOmonster

Thank you very much for this _very_ useful function. I'm having excellent success using it for PAL->NTSC field blended material and vice versa. I've had several movies sitting on my drives for a year waiting for some success, now I've encoded all of them using either Crestore or Mrestore. Great work!
__________________
DFI NF4 SLI Expert | Opteron 165 CCBBE 0616 XPMW (9x325HTT=2.9Ghz) | 2x1GB G.Skill HZ (3-4-4-8-12-16-2T) | LG 62L DVD/CD | Geforce 7300GT | All SATA | Antec 650 Trio PSU | XP SP2
MacAddict is offline   Reply With Quote
Old 13th October 2006, 08:34   #106  |  Link
MOmonster
Registered User
 
Join Date: May 2005
Location: Germany
Posts: 495
@MacAddict
Thanks for the kind words and sorry for my late reaction.

I updated the R_pack with a preview Mrestore v1.5 build. It works clearly better than the older C/Mrestore.
No time to write a changelog but the readme is updated.
Nice tryout.
MOmonster is offline   Reply With Quote
Old 18th October 2006, 00:53   #107  |  Link
MBoufleur
Registered User
 
Join Date: Sep 2006
Location: Brazil
Posts: 23
Hi there,

just tried the Mrestore as below, but I get a message on top of the video Choosen *rate* won't work!!
Code:
LoadPlugin("MT_MaskTools.dll")

Import("Mrestore.avs")

AVIsource("D:\Testes\Brice_PullDown.avi")
Trim(1393,2527)

ConvertToYV12(interlaced=true) #only because of Masktools. Original is RGB32
Mrestore(rate=25)
The source file(29.97fps) is a 25fps>NTSC transcoded material with the following pattern.
A 6 Frame cadence with one whole Frame, and 5 other mixed/blended frames (turns 5 frames into 6).

Last edited by MBoufleur; 18th October 2006 at 00:57.
MBoufleur is offline   Reply With Quote
Old 18th October 2006, 01:02   #108  |  Link
Alain2
Registered User
 
Join Date: May 2005
Posts: 236
mrestore needs a bobbed input, cf. the examples in the readme.. Good choice to try the latest version of mrestore, I find it rather efficient without requiring much tweaking; but if your avi is progressive, I don't think it will be very good.
Alain2 is offline   Reply With Quote
Old 19th October 2006, 15:34   #109  |  Link
MOmonster
Registered User
 
Join Date: May 2005
Location: Germany
Posts: 495
@MBoufleur
You did all right, but like Alain allready said, you need a bobbed input if your source is progressive.
Code:
LoadPlugin("MT_MaskTools.dll")

Import("Mrestore.avs")

AVIsource("D:\Testes\Brice_PullDown.avi")
Trim(1393,2527)

Tdeint(mode=1)     #I donīt know if it works with rgb
dsource = last.ConvertToYV12(interlaced=true)   #masktools are only used for detection -> converting only dclip to yv12 will also work.
Mrestore(rate=25, dclip=dsource)
Of course you can use your favourite bobber, at the moment I donīt know what bobbingfilter works also with rgb.
You have allready tried restore24, but you should also try repal, maybe it performs really nice in your case.

@Alain2
If there is a pattern Mrestore will also work with progressive source. Its seldom, but some animes for example are converted from clear 12 fps to blended 25fps (progressive). So you use Mrestore(rate=11.998) to restore such sources. Next Mrestore release should also output higher framerates than the half input framerate fine.

Last edited by MOmonster; 19th October 2006 at 15:47.
MOmonster is offline   Reply With Quote
Old 16th November 2006, 13:41   #110  |  Link
MOmonster
Registered User
 
Join Date: May 2005
Location: Germany
Posts: 495
Update

Mrestore is now updated to version 1.6. This release works significantly better than Mrestore 1.5. There are no known bugs and the blend detection is more accurate.
changlog
- completly rewritten code
- new decimating algorythm
- improved blenddetection
- better sync
- over all better behaviour
- new parameters

As always the link in my first post is updated.
MOmonster is offline   Reply With Quote
Old 16th November 2006, 14:22   #111  |  Link
Alain2
Registered User
 
Join Date: May 2005
Posts: 236
Just to be sure, in the zip, Mrestore.avs is the correct 1.6 release ? Mrestore15beta looks like the 1.5 release but a bit different, whereas Mrestore.avs is completely different so fit the changelog and is much smaller as well

Thanks for the new release! The v1.5 was already performing very good for me with the default settings, and I was happy with the results I hadt when followed by mvdegrain2 set with a large thSAD to correct the few remaining blends. Will see if it gets even better with this new version
Alain2 is offline   Reply With Quote
Old 16th November 2006, 14:38   #112  |  Link
MOmonster
Registered User
 
Join Date: May 2005
Location: Germany
Posts: 495
Yes you are correct. The Mrestore15beta.avs is the next release of the older Mrestore 1.5 preview and the Mrestore.avs contains the 1.6 version and should work better. The readme is also for this version.
MOmonster is offline   Reply With Quote
Old 17th November 2006, 20:59   #113  |  Link
Pookie
Registered User
 
Join Date: Apr 2005
Posts: 1,339
CDeblend seems to work quite well

http://forum.doom9.org/showthread.ph...602#post901602
Pookie is offline   Reply With Quote
Old 18th November 2006, 14:21   #114  |  Link
MOmonster
Registered User
 
Join Date: May 2005
Location: Germany
Posts: 495
Good that Cdeblend works good for you. It still use an older blenddetection code and it would be really easy to implement the newest one. I think Iīll do next week.
But in general itīs recommed to use Mrestore or restore24 to restore fieldblended sources. This will give better motion (if you donīt want to keep the framerate of the bobbed clip).
MOmonster is offline   Reply With Quote
Old 23rd November 2006, 12:03   #115  |  Link
MOmonster
Registered User
 
Join Date: May 2005
Location: Germany
Posts: 495
I updated Cdeblend to version 1.1a.
changelog:
- new blenddetection code
- outputmodes has changed,
omode 4 also outputs if the current frame will be detected as a blend
- use code structur from Mrestore 1.6
MOmonster is offline   Reply With Quote
Old 23rd November 2006, 19:52   #116  |  Link
Alain2
Registered User
 
Join Date: May 2005
Posts: 236
I see Mrestore has slightly evolved as well ^^
Alain2 is offline   Reply With Quote
Old 17th December 2006, 22:07   #117  |  Link
elguaxo
Registered User
 
elguaxo's Avatar
 
Join Date: Jun 2006
Posts: 260
Hi, I have been using your latest Mrestore (23rd November 2006) and it works great! Now I want to try Cdeblend, but the parameters in the 1st sample of the readme seem to be invalid:

Cdeblend(dmode=3, thresh=130)


So I just tried Cdeblend() But I get:


Any hints? Thanks!
elguaxo is offline   Reply With Quote
Old 17th December 2006, 22:52   #118  |  Link
Alain2
Registered User
 
Join Date: May 2005
Posts: 236
Funny I tried cdeblend today as well for the first time and had the same error message (2nd one)
Alain2 is offline   Reply With Quote
Old 18th December 2006, 12:00   #119  |  Link
MOmonster
Registered User
 
Join Date: May 2005
Location: Germany
Posts: 495
Oohh, sorry for the misleading sample. It`s the same as for version 1.0. I didnīt change it, sorry.
Cdeblend v1.1 has only the discribed parameters, so dmode and thresh are no parameters of the last version.
I will change it over the week (have no zipping tool here).
And will also have a look on the basic code.
Edit: This should work:
Code:
Function Cdeblend(clip input, int "omode", float "bthresh", "mthresh", "xr", "yr", bool "fnr", clip "dclip") 
{
###### parameters ######
global thresh 	= default(bthresh,0.1)
global mthr	= default(mthresh,0.6)
global omode 	= default(omode,0)
omode   = default(omode,0)

xr	= 0.125 / default(xr, 1.5)										#x detection reduction
yr	= 0.125 / default(yr, 2.0)										#y detection reduction
fnr	= default(fnr, false)											#fast noise reduction

###### preparation ######
global output	= input
btemp 	= default(dclip,input)
global blendclip= (fnr==false ? btemp : clense(btemp)).bilinearresize(int(width(btemp)*xr)*8,int(height(btemp)*yr)*8)

rate = framerate(input)

###### masking ######
diff = mt_makediff(blendclip, blendclip.trim(1,0))
global mask	= mt_lutxy(diff, diff.trim(1,0), yexpr="x 128 - abs y 128 - abs < x 128 - abs x y + 256 - abs < & x 128 - abs x 128 - abs 0.5 ^ - 2 ^ y 128 - abs x y + 256 - abs < y 128 - abs y 128 - abs 0.5 ^ - 2 ^ x y + 256 - abs x y + 256 - abs 0.5 ^ - 2 ^ ? ? x 128 - y 128 - * 0 > -1 1 ? * 128 +", uexpr="x", vexpr="x")

###### initialising ######
global Cbp3	= thresh>0 ? 128.0 : 2.0
global Cbp2	= thresh>0 ? 128.0 : 2.0
global Cbp1	= thresh>0 ? 128.0 : 2.0
global Cbc0	= thresh>0 ? 128.0 : 2.0
global Cbn1	= thresh>0 ? 128.0 : 2.0
global Cbn2	= thresh>0 ? 128.0 : 2.0

global Cdp3	= mthr*0.5
global Cdp2	= mthr*0.5
global Cdp1	= mthr*0.5
global Cdc0	= mthr*0.5
global Cdn1	= mthr*0.5

global current	= 0

###### helper function ######
function min(a,b)
{
a = a<b ? a : b
return a
}

###### evaluation ######
function evaluate(float Cdiff, Cbval)
{
global Cdp3	= Cdp2
global Cdp2	= Cdp1
global Cdp1	= Cdc0
global Cdc0	= omode>1 ? Cdn1 : Cdiff
global Cdn1	= Cdiff

global Cbp3	= Cbp2
global Cbp2	= Cbp1
global Cbp1	= Cbc0
global Cbc0	= omode>1 ? Cbn1 : Cdp1<mthr || Cdc0<mthr ? 0.0 : (Cbval-Cbn2)/pow((Cdc0>Cdp1 ? Cdc0 : Cdp1)+mthr, 0.8)
global Cbn1	= Cdc0<mthr || Cdn1<mthr ? 0.0 : (Cbval-Cbn2)/pow((Cdn1>Cdc0 ? Cdn1 : Cdc0)+mthr, 0.8)
global Cbn2	= Cbval


global current	= Cbn1<-thresh && Cbc0>thresh || Cbn1<0 && Cbc0>0 && Cbc0+Cbp1>0 && Cbc0+Cbp1+Cbp2>0 ? 1 :
		\	Cbc0<-thresh && Cbp1>thresh || Cbc0<0 && Cbc0+Cbn1<0 && Cbp1>0 && Cbp1+Cbp2>0 ? 0 : 
		\	current==-2 ? (Cbn1>0 ? 2 : 1) : current-1
global current	= omode!=2 ? current : min(-Cbp1,Cbc0+Cbn1)>thresh && abs(Cbn1)>abs(Cbc0) ? -1 :
		\	min(-Cbp2-Cbp1,Cbc0)>thresh && abs(Cbp2)>abs(Cbp1) ? 1 : min(-Cbp1,Cbc0)>thresh ? -1 : 0 
global current	= omode>1 ? current : min(-Cbp1,Cbc0)<thresh ? 0 : omode==0 ? -1 : 1

omode==4 ? output.subtitle(string( Cbc0>0 && Cbp1<0 ? min(-Cbp1,Cbc0) : Cbc0<0 && Cbp1>0 ? -min(Cbp1,-Cbc0) : 0.0 ) + (min(-Cbp1,Cbc0)>=thresh ? " -> BLEND!! " : " ")) :
\	output.trim(0,1) ++ output.trim(2+current,0)

return last
}

###### final evaluating ######
omode>1 ? scriptclip(output, "evaluate(LumaDifference(blendclip.trim(1,0),blendclip.trim(3,0)), AverageLuma(mask.trim(1,0)))") :
	\	scriptclip(output, "evaluate(LumaDifference(blendclip,blendclip.trim(2,0)), AverageLuma(mask))")

recl = last.changefps(rate*2).changefps(rate,linear=true)
return(recl.addborders(0,0,8,0).crop(0,0,-8,-0)) 
}
The warning wonīt appear if you set omode (Cdeblend(omode=0)) or use this version.
In line 78 the local not setted variable omode is requested. Avisynth donīt use the global variable if not explicit called.
My failure.
As I said, I will fix it.

Last edited by MOmonster; 18th December 2006 at 12:11.
MOmonster is offline   Reply With Quote
Old 18th December 2006, 14:28   #120  |  Link
elguaxo
Registered User
 
elguaxo's Avatar
 
Join Date: Jun 2006
Posts: 260
It works!
elguaxo is offline   Reply With Quote
Reply

Tags
mrestore, srestore

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT +1. The time now is 05:43.


Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2024, vBulletin Solutions Inc.