View Full Version : 14.999fps to DVD: which way to go?
Chainmax
23rd April 2006, 23:30
What about going from 24fps to 25fps? Should I use one of these methods or just speed up the video?
Mug Funky
24th April 2006, 03:32
if you're already interpolating up to 24 from 14.999, then there'd be no problem just going to 25 instead of 24. but speeding up is better otherwise.
Chainmax
24th April 2006, 13:40
Oh, I'm now asking about a different clip that is 24fps and I want to convert to 25fps.
Chainmax
24th April 2006, 21:56
I'd better make a separate thread for this question.
Chainmax
1st May 2006, 23:29
When turning a progressive PAL video to NTSC, is using mvflowfps(num=30000,den=1001) a good idea or are there better solutions?
scharfis_brain
2nd May 2006, 00:17
to your former problem: add thSCD1=9999 to all mvflow calls. that should help the superresolution.
in order to convert 25p to NTSC do a resize to NTSC resolution and encode as 720x480 with 25fps progressive MPEg2. then let DGPulldown do the rest.
Chainmax
2nd May 2006, 02:16
I'll try your suggestions and post back a comparison for that scene soon, thanks :).
Are you sure that DGPulldown is the best bet? I remember reading comments that its 25-29.97 pulldown yielded more judder than usual.
@Chainmax,
What do you call "more judder than usual".
More judder than a field blended approach, yes it will, but then you have blended fields, which may or may not be acceptable for you clip.
More judder than manually doing the field replication in Avisynth, highly unlikely, the resultant field pattern is pretty much going to be the same. And you would have to encode as interlaced and waste a lot of bits in the process.
More judder than slowing down 4% to 23.976 fps and doing a more orthodox 3:2 pulldown, possibly. You are comparing a 3:2 pattern with a 3:2:3:2:2 pattern. The judder will have a lower frequency. Is that more judder?
Chainmax
2nd May 2006, 14:02
I meant more judder than a standard 3:2 pulldown and basically wanting to know if there were ways to avoid that. I'd have to consider which is the lesser of two evils: judder or slowdown. What do you think?
scharfis_brain
2nd May 2006, 15:28
I'd have to consider which is the lesser of two evils: judder or slowdown. What do you think?That depends on your taste.
I meant more judder than a standard 3:2 pulldown and basically wanting to know if there were ways to avoid that. I'd have to consider which is the lesser of two evils: judder or slowdown. What do you think?As Scharfis say it's a lot about personal preference and content.
E.g. A talking head won't matter what you do. A clip that is horizontally panning could be really annoying.
If it is really critical you can try dabbling with the world of motion vectors.
Chainmax
5th May 2006, 00:49
Here is the same frame with the new SuperResolution script:
http://img161.imageshack.us/img161/2415/superresolutiontry2sourceframe.png (http://imageshack.us)
which is this:
f=4
AVISource("X:\wherever\GKUncompressedRGB.avi",audio=false)
a=last
a.converttoyv12()
eedi2().turnleft().eedi2().turnright()
pointresize(a.width*f,a.height*f)
vf=last.mvanalyse(isb=false,blksize=16, truemotion=true)
vb=last.mvanalyse(isb=true,blksize=16, truemotion=true)
vf1=last.mvanalyse(isb=false,delta=2,blksize=16, truemotion=true)
vb1=last.mvanalyse(isb=true,delta=2,blksize=16, truemotion=true)
xf1=last.mvflow(vf1,thSCD1=9999)
xf=last.mvflow(vf,thSCD1=9999)
xb=last.mvflow(vb,thSCD1=9999)
xb1=last.mvflow(vb1,thSCD1=9999)
interleave(xf1,xf,last,xb,xb1)
temporalsoften(2,40,50,mode=2)
x=selectevery(5,2)
x.converttorgb()
xa=pointresize(a.width*2,a.height*2).converttoyv12().eedi2().turnleft().eedi2().turnright()
xb=crop(1,1,0,0).addborders(0,0,1,1).converttoyv12().pointresize(a.width*2,a.height*2).eedi2().turnleft().eedi2().turnright()
x=merge(xa,xb)
xvf=x.mvanalyse(isb=false,blksize=16, truemotion=true)
xvb=x.mvanalyse(isb=true,blksize=16, truemotion=true)
xvf1=x.mvanalyse(isb=false,delta=2,blksize=16, truemotion=true)
xvb1=x.mvanalyse(isb=true,delta=2,blksize=16, truemotion=true)
xxf1=x.mvflow(xvf1,thSCD1=9999)
xxf=x.mvflow(xvf,thSCD1=9999)
xxb=X.mvflow(xvb,thSCD1=9999)
xxb1=x.mvflow(xvb1,thSCD1=9999)
interleave(xf1,xxf,x,xxb,xxb1)
temporalsoften(2,255,255,mode=2)
selectevery(5,2)
last.mvflowfps(vb,vf,num=30000,den=1001)
BicubicResize(656,448)
Levels(0,1,245,16,235)
FFT3DFilter(sigma=6,plane=3,bw=32,bh=32,bt=3,ow=16,oh=16)
Tweak(sat=1.2)
c=last
GrainU=c.UtoY().AddGrain(4,0,0)
GrainV=c.VtoY().AddGrain(4,0,0)
Return ytouv(GrainU,GrainV).MergeLuma(c).AddGrain(10,0,0).AddBorders(24,16,24,16)
I tried to compare to the BlockTerminator script adding mvflowfps(num=30000,den=1001) right before its final resize but I kept getting an access violation error. I assume that the vf and vb switches have to be set but I have no idea how to do so.
satmonk
29th November 2006, 20:04
Hi, does anybody still have the video "sample-25p1.avi"? It's the video posted by Scharfis Brain, but it is no more on rapidshare :-(
Chainmax
29th November 2006, 21:35
This is an old thread, so the RapidShare probably just expired. Being that the clip was meant to illustrate the effects of the function it's very likely that it's long gone from scharfis_brain's HDD. In any case, I think PMing him will be a better way to know for sure. Welcome to the Doom9 forums, by the way :).
satmonk
29th November 2006, 22:42
Thanks for your quick answer.
He told me to ask in this forum, because he do not have this video anymore.
I am sitting at your superresolution script, but can't get it to work (error at line13, unrecognised exception)
The script starts with:
f=4
LoadPlugin("eedi2.dll")
LoadPlugin("mvtools.dll")
LoadPlugin("fft3dfilter.dll")
avisource("klkl.avi")
a=last
all after is the same like your last script
System:
MVTools v.1.6.2
VirtualDUB 1.5.10 build18160
AVISynth 2.5
Chainmax
29th November 2006, 22:48
Unfortunately, I deleted that video many months ago. By the way,this function was created by scharfis_brain, not me :).
satmonk
29th November 2006, 22:58
Yes, that's right, sorry, was my mistake
But probably you can help me out (you got this script running)
Pleeease.
edit: I put in "mvanalyse()" (after pointresize)
now program says that I need YUY2 or YV12 File. I have an DV-Camcorder file, I thought this is YUY2?
Chainmax
29th November 2006, 23:17
If I'm not mistaken, DV is YV12, so you have to either put ConvertToYUY2(interlaced=true) right after loading the file or ConvertToYUY2() after deinterlacing.
As for the rest, I know nothing about unrecognized exception errors, but empyrical evidence tells me that those can usually be solved by reordering the filters (for example, doing SuperResolution-->Filtering instead of Filtering-->SuperResolution), putting SetMemoryMax(x) (with x=your ram/2) at the very beginning of the script (before loading the filters and the source) or fiddling with resizes (some filters need MOD16 resolutions). I hope hat helps.
2Bdecided
30th November 2006, 11:45
I think this script (if we're still talking about the same script) is inappropriate for most DV/Camcorder output.
It's most useful for resizing content with horrible aliasing, and even then it's not really usable in its present form, except on very "easy" content.
I could be wrong, but as a new user satmonk maybe you've dropped onto the wrong script. What is it you're trying to do?
Cheers,
David.
2Bdecided
29th October 2007, 17:31
To drag this back up from the dead...
This script crashed for me with the latest version of mvtools, but it just needed pel=1 adding to all the mvanalyse lines to make it work - the (new-ish) default pel=2 made it crash on my machine.
However, it still crashes with larger source videos. The error is always just "unrecognised exception" (from within virtualdub). The larger the video, the earlier the line on which the exception ocurrs. It's always an mvtools line (mvanalyse or mvflow).
When working, the process uses about 1GB of memory. When it's not working, it doesn't grab any more than VirtualDub without a video file. It makes no attempt to hit virtual memory.
Cheers,
David.
Chainmax
29th October 2007, 22:23
Now that NNEDI and SalFPS3 have been out for a while, it would be nice to see an updated, optimized version of this converted into an AVS function :).
Leak
30th October 2007, 17:25
When working, the process uses about 1GB of memory. When it's not working, it doesn't grab any more than VirtualDub without a video file. It makes no attempt to hit virtual memory.
Well, if it grabs all of that memory in one piece it'll probably just bomb out when it tries to allocate >2GB of RAM (that's the usual address space limit for Win32 applications) because the memory allocation call itself will fail and thus not allocate any memory.
np: Savath & Savalas - El Solitario (Golden Pollen)
Fizick
31st October 2007, 06:40
mvtools scripts must use idx to decrease memory eating
2Bdecided
31st October 2007, 11:15
Fizick,
I've added idx=1 to the first pass and idx=2 to the second pass, and now it works fine with SD video (720x576). Thank you for your help Fizick.
Leak,
It looks like AVIsynth 2.57 would only grab 1GB on my system...
http://avisynth.org/mediawiki/Internal_functions/Control_functions (setmemorymax)
...but later version might try to grab more. Looks like I should explicitly setmemorymax in future. Thanks for the advice.
Cheers,
David.
Leak
31st October 2007, 12:04
It looks like AVIsynth 2.57 would only grab 1GB on my system...
http://avisynth.org/mediawiki/Internal_functions/Control_functions (setmemorymax)
...but later version might try to grab more. Looks like I should explicitly setmemorymax in future.
Errr... SetMemoryMax only tries to control the amount of memory used by AviSynth for the frames it creates, which is mostly done by limiting the size of the frame caches automatically placed between the filters you use - it can't (and won't) prevent any filter from allocating all the memory it wants.
2Bdecided
31st October 2007, 13:08
Thanks for clearing up my misunderstanding!
Cheers,
David.
ingoldie
14th March 2016, 03:45
When I try to use the following script, I receive the error message (error at line28, Unrecognized exception!)
Here is the source clip:
http://www.mediafire.com/file/jvb9vvv5cq9di1i/Sample1_SD_8mm_18_fps.avi
What is the problem?
f=4
avisource("Sample1.avi")
a=last
a.converttoyuy2()
eedi2().turnleft().eedi2().turnright()
pointresize(a.width*f,a.height*f)
vf=last.mvanalyse(isb=false,blksize=16, truemotion=true)
vb=last.mvanalyse(isb=true,blksize=16, truemotion=true)
vf1=last.mvanalyse(isb=false,delta=2,blksize=16, truemotion=true)
vb1=last.mvanalyse(isb=true,delta=2,blksize=16, truemotion=true)
xf1=last.mvflow(vf1)
xf=last.mvflow(vf)
xb=last.mvflow(vb)
xb1=last.mvflow(vb1)
interleave(xf1,xf,last,xb,xb1)
temporalsoften(2,40,50,mode=2)
x=selectevery(5,2)
x.converttorgb()
xa=pointresize(a.width*2,a.height*2).converttoyuy2().eedi2().turnleft().eedi2().turnright()
xb=crop(1,1,0,0).addborders(0,0,1,1).converttoyuy2().pointresize(a.width*2,a.height*2).eedi2().turnleft().eedi2().turnright()
x=merge(xa,xb)
xvf=x.mvanalyse(isb=false,blksize=16, truemotion=true)
xvb=x.mvanalyse(isb=true,blksize=16, truemotion=true)
xvf1=x.mvanalyse(isb=false,delta=2,blksize=16, truemotion=true)
xvb1=x.mvanalyse(isb=true,delta=2,blksize=16, truemotion=true)
xxf1=x.mvflow(xvf1)
xxf=x.mvflow(xvf)
xxb=X.mvflow(xvb)
xxb1=x.mvflow(xvb1)
interleave(xf1,xxf,x,xxb,xxb1)
temporalsoften(2,255,255,mode=2)
selectevery(5,2)
#last.mvflowfps(vb,vf,num=25,den=1)
#bicubicresize(704,576)
StainlessS
14th March 2016, 14:20
What is the problem? buggy plugin.
ingoldie, not sure I got this correct, but seems to work reasonably well.
(Converted to mvtools 2)
f=4
avisource("D:\v\Starwars.avi").Trim(10000,-1000) # 720x576@25
Org=Last # Might want to comment out
BilinearResize(Width/(4*f)*4,Height/(4*f)*4) # these 3 lines
Return PointResize(Org.Width,Org.Height) # to here (make test clip)
a=last
a.converttoyuy2() # Last is YUY2
eedi2().turnleft().eedi2().turnright()
pointresize(a.width*f,a.height*f)
srcP=Interleaved2Planar() # Last is Planar YUY2
super=srcP.MSuper(Planar=True)
vf =super.manalyse(isb=false,blksize=16, truemotion=true)
vb =super.manalyse(isb=true,blksize=16, truemotion=true)
vf1=super.manalyse(isb=false,delta=2,blksize=16, truemotion=true)
vb1=super.manalyse(isb=true,delta=2,blksize=16, truemotion=true)
xf1=srcP.mflow(Super,vf1,Planar=true)
xf =srcP.mflow(Super,vf,Planar=true)
xb =srcP.mflow(Super,vb,Planar=true)
xb1=srcP.mflow(Super,vb1,Planar=true)
interleave(xf1,xf,srcP,xb,xb1)
srcI=Planar2Interleaved()
srcI.temporalsoften(2,40,50,mode=2)
xI=selectevery(5,2)
xRGB=xI.converttorgb()
xaI=xRGB.pointresize(a.width*2,a.height*2).converttoyuy2().eedi2().turnleft().eedi2().turnright()
xbI=xRGB.crop(1,1,0,0).addborders(0,0,1,1).converttoyuy2().pointresize(a.width*2,a.height*2).eedi2().turnleft().eedi2().turnright()
xI=merge(xaI,xbI)
xP=xI.Interleaved2Planar() # Planar YUY2
xSuper=xP.MSuper(Planar=True)
xvf =xSuper.manalyse(isb=false,blksize=16, truemotion=true)
xvb =xSuper.manalyse(isb=true,blksize=16, truemotion=true)
xvf1=xSuper.manalyse(isb=false,delta=2,blksize=16, truemotion=true)
xvb1=xSuper.manalyse(isb=true,delta=2,blksize=16, truemotion=true)
xxf1=xP.mflow(xSuper,xvf1,Planar=True)
xxf =xP.mflow(xSuper,xvf,Planar=True)
xxb =XP.mflow(xSuper,xvb,Planar=True)
xxb1=xP.mflow(xSuper,xvb1,Planar=True)
interleave(xf1,xxf,xP,xxb,xxb1)
xI=Planar2Interleaved()
xI.temporalsoften(2,255,255,mode=2)
selectevery(5,2) # YUY2
Return Last # .bicubicresize(704,576) # Added
FPS=50 # This was just for test (mod to whatever)
last.Interleaved2Planar.mflowfps(Super,vb,vf,num=FPS,den=1,Planar=True).Planar2Interleaved()
Return bicubicresize(704,576)
about as good as I can do, perhaps others can improve.
EDIT: Mega.nz that hosts Ingoldie sample offer to download with browser (I picked), or use their download program,
on download, offers to play clip or save, if chose play then will delete after playing. (stores file in your TEMP folder,
grab it before it gets deleted.)
EDIT: I hope that you are not in a hurry, tis a bit slooooow.
The dupes and jerkiness of your source clip (just downloaded and viewed) are bound to play havoc with the motion vector stuff.
EDIT: I notice that your clip has 18FPS in the name, as already converted to 29.97 fps, will be a problem for motion vectors,
better to start with original 18fps (I think).
StainlessS
14th March 2016, 17:29
I believe that there is a bug in original script (and also my conversion of it)
correction in BLUE
f=4
avisource("Sample_SD_8mm_18_fps.avi")
###### Make Test Clip
#avisource("D:\v\Starwars.avi").Trim(10000,-10000) # 720x576@25
#BilinearResize(Width/(4*f)*4,Height/(4*f)*4) # Might want to comment out these lines (Lo rez)
#SelectEven() # Half frame rate
#Return PointResize(Width*f,Height*f) #
#######
a=last
a.converttoyuy2() # Last is YUY2
eedi2().turnleft().eedi2().turnright()
pointresize(a.width*f,a.height*f)
srcP=Interleaved2Planar() # Last is Planar YUY2
super=srcP.MSuper(Planar=True)
vf =super.manalyse(isb=false,blksize=16, truemotion=true)
vb =super.manalyse(isb=true,blksize=16, truemotion=true)
vf1=super.manalyse(isb=false,delta=2,blksize=16, truemotion=true)
vb1=super.manalyse(isb=true,delta=2,blksize=16, truemotion=true)
xf1=srcP.mflow(Super,vf1,Planar=true)
xf =srcP.mflow(Super,vf, Planar=true)
xb =srcP.mflow(Super,vb, Planar=true)
xb1=srcP.mflow(Super,vb1,Planar=true)
interleave(xf1,xf,srcP,xb,xb1)
srcI=Planar2Interleaved()
srcI.temporalsoften(2,40,50,mode=2)
xI=selectevery(5,2)
xRGB=xI.converttorgb()
xaI=xRGB.pointresize(a.width*2,a.height*2).converttoyuy2().eedi2().turnleft().eedi2().turnright()
xbI=xRGB.crop(1,1,0,0).addborders(0,0,1,1).converttoyuy2().pointresize(a.width*2,a.height*2).eedi2().turnleft().eedi2().turnright()
xmI=merge(xaI,xbI)
xP=xmI.Interleaved2Planar() # Planar YUY2
xSuper=xP.MSuper(Planar=True)
xvf =xSuper.manalyse(isb=false,blksize=16, truemotion=true)
xvb =xSuper.manalyse(isb=true,blksize=16, truemotion=true)
xvf1=xSuper.manalyse(isb=false,delta=2,blksize=16, truemotion=true)
xvb1=xSuper.manalyse(isb=true,delta=2,blksize=16, truemotion=true)
xxf1=xP.mflow(xSuper,xvf1,Planar=True)
xxf =xP.mflow(xSuper,xvf,Planar=True)
xxb =XP.mflow(xSuper,xvb,Planar=True)
xxb1=xP.mflow(xSuper,xvb1,Planar=True)
interleave(xxf1,xxf,xP,xxb,xxb1) # BUG HERE used xf1 instead of xxf1
zI=Planar2Interleaved()
zI.temporalsoften(2,255,255,mode=2)
selectevery(5,2) # YUY2
FPS=25
#Interleaved2Planar.mflowfps(super,vb,vf,num=FPS,den=1,Planar=True).Planar2Interleaved()
Return bicubicresize(704,576)
It dont seem to make much difference to result.
EDIT: Also think maybe should have mod to this (or maybe not, not sure if 'f' is intended to be 'tuneable')
xaI=xRGB.pointresize(a.width*(f/2),a.height*(f/2)).converttoyuy2().eedi2().turnleft().eedi2().turnright()
xbI=xRGB.crop(1,1,0,0).addborders(0,0,1,1).converttoyuy2().pointresize(a.width*(f/2)),a.height*(f/2))).eedi2().turnleft().eedi2().turnright()
otherwise size mismatch if f = 2 (EDIT: at framerate conversion, 2nd last line)
Although maybe would be better to just not do the 2nd batch of motion vector stuff, from ConvertToRGB onwards (if f==2),
(EDIT: or do another Super() & MAnalyse()'s on result clip prior to framerate conversion).
EDIT: Damndest thing is, it renders (EDIT:quite a bit) faster WITH the framerate conversion step than without it.
EDIT: your clip looks to be 18fps with dupes. I removed dupes with this
avisource("Sample_SD_8mm_18_fps.avi")
Assumepfs(30.0)
MDec2(rate=18.0,Create=false,dir="")
Return Last
Above is 2nd pass, 1st pass Create=True, is MultiDecimate alternative.
StainlessS
14th March 2016, 21:29
I removed the YUY2 stuff, was just so awkward, converting to YV12.
This is what I got, added Blur for SuperPrefilt, analyse blurred, used plain super for MFlow.
f=4
#avisource("Sample_SD_8mm_18_fps.avi")
avisource("18.avi")
ConvertToYV12
a=last
eedi2().turnleft().eedi2().turnright()
pointresize(a.width*f,a.height*f)
superPrefilt=Last.Blur(0.6).MSuper() # All Levels for MAnalyse
super=Last.MSuper(Levels=1) # MFlow needs only 1 level
vf =superPrefilt.manalyse(isb=false,blksize=16, truemotion=true)
vb =superPrefilt.manalyse(isb=true,blksize=16, truemotion=true)
vf1=superPrefilt.manalyse(isb=false,delta=2,blksize=16, truemotion=true)
vb1=superPrefilt.manalyse(isb=true,delta=2,blksize=16, truemotion=true)
xf1=Last.mflow(Super,vf1)
xf =Last.mflow(Super,vf)
xb =Last.mflow(Super,vb)
xb1=Last.mflow(Super,vb1)
interleave(xf1,xf,Last,xb,xb1)
temporalsoften(2,40,50,mode=2)
selectevery(5,2)
RGB=converttorgb()
xaI=RGB.pointresize(a.width*2,a.height*2).converttoYV12().eedi2().turnleft().eedi2().turnright()
xbI=RGB.crop(1,1,0,0).addborders(0,0,1,1).converttoYV12().pointresize(a.width*2,a.height*2).eedi2().turnleft().eedi2().turnright()
xP=merge(xaI,xbI)
xSuperPrefilt=xP.Blur(0.6).MSuper() # All Levels for MAnalyse
xSuper=xP.MSuper(Levels=1) # MFlow needs only 1 level
xvf =xSuperPrefilt.manalyse(isb=false,blksize=16, truemotion=true)
xvb =xSuperPrefilt.manalyse(isb=true,blksize=16, truemotion=true)
xvf1=xSuperPrefilt.manalyse(isb=false,delta=2,blksize=16, truemotion=true)
xvb1=xSuperPrefilt.manalyse(isb=true,delta=2,blksize=16, truemotion=true)
xxf1=xP.mflow(xSuper,xvf1)
xxf =xP.mflow(xSuper,xvf)
xxb =XP.mflow(xSuper,xvb)
xxb1=xP.mflow(xSuper,xvb1)
interleave(xxf1,xxf,xP,xxb,xxb1)
temporalsoften(2,255,255,mode=2)
selectevery(5,2)
NUM=30000 DEN=1001
mflowfps(super,vb,vf,num=NUM,den=DEN)
bicubicresize(704,576)
TWriteAVI("Out.AVI",fourCC="ULY0",Overwrite=True) # Write to AVI as play clip.
Is not very good result especially due to jerkiness (although the latter part of clip is not so bad).
Intention of script is to increase rez of low rez clip, your clip aint that lo in rez and so final result is not
going to be that much different to source (final result not much different to source rez).
EDIT: And I bet that the camera for Scharfis Brain demo clip was fixed ie not jumping about.
EDIT: Changed to Levels=1 for Super clip [MFlow needs only 1 Level].
ingoldie
14th March 2016, 21:38
I don't think that script increases the resolution and image detail.
I'm asking for a SuperResolution script to increase image detail.
To do this:
http://i65.tinypic.com/2mfnsbd.jpg
Super-resolution imaging
https://en.wikipedia.org/wiki/Super-resolution_imaging
StainlessS
14th March 2016, 21:49
Scharfis Brain demo clip looked quite incredible [EDIT: or rather the still images of it], but rapid moving objects and moving camera are not a good combination and unlikely to produce many miracles (consistently).
EDIT: I would not personally hold my breath waiting for that el dorado to materialise.
StainlessS
15th March 2016, 00:35
InGoldie,
Try this out, has some amount of configuration, framerate conversion working quite well and reduces jitteryness of the clip.
f=4 # 4 or 2 or 1 (PointResize OFF)
#
VAGUE=2.5 # PreFiltering (Spatial Only), -1.0 = OFF, 0.0=AUTO, maybe about 0.0 to 3.0
BLUR=1.58 # up to 1.58 only, Prefilter
BS = 16 # 16 or 8
OVERLAP = BS/2 # BS / 2 or 0
PRECISE=True # MRecalculate
MRECALC_ON_PREFILT_SUPER = True # Cant decide which one should be used, you pick one :)
#
MOCOMP=True
MOCOMPBLOCK=True
FFT3D=True
FFT_SIGMA=2.4
FFT_SHARPEN=0.5
TEMPSFT_RADIUS = 1 # 2 or 1 (When FFT3D is false)
#
CHANGEFPS=True
BLOCKFPS=True
NUM=30000 DEN=1001 BLENDFPS=False
########
avisource("18.avi") # MDEC2() Decimated 18FPS
ConvertToYV12
a=last
eedi2().turnleft().eedi2().turnright()
pointresize(a.width*f,a.height*f)
PostPoint = (f>1) ? Last : a
Prefilt=(VAGUE>=0.0)?PostPoint.VagueDenoiser(threshold=VAGUE,method=1,nsteps=6,chromaT=0,interlaced=false):PostPoint
superPrefilt=Prefilt.Blur(BLUR).MSuper() # All Levels for MAnalyse
super=PostPoint.MSuper(Levels=1) # MFlow/MCompensate/ and FPS stuff requires only 1 Level.
vf1=superPrefilt.manalyse(isb=false,delta=2,blksize=bs, overlap=OVERLAP, truemotion=true)
vf =superPrefilt.manalyse(isb=false,blksize=bs, overlap=(CHANGEFPS&&BLOCKFPS&&!PRECISE)?0:OVERLAP, truemotion=true)
vb =superPrefilt.manalyse(isb=true,blksize=bs, overlap=(CHANGEFPS&&BLOCKFPS&&!PRECISE)?0:OVERLAP, truemotion=true)
vb1=superPrefilt.manalyse(isb=true,delta=2,blksize=bs, overlap=OVERLAP, truemotion=true)
recalcSuper = (MRECALC_ON_PREFILT_SUPER) ? superPrefilt : super
v2f1 = (PRECISE) ? MRecalculate(recalcSuper, vf1 ,blksize=bs/2, overlap=OVERLAP/2,thSAD=100) : vf1
v2f = (PRECISE) ? MRecalculate(recalcSuper, vf , blksize=bs/2, overlap=(CHANGEFPS&&BLOCKFPS)?0:OVERLAP/2,thSAD=100) : vf
v2b = (PRECISE) ? MRecalculate(recalcSuper, vb, blksize=bs/2, overlap=(CHANGEFPS&&BLOCKFPS)?0:OVERLAP/2,thSAD=100) : vb
v2b1 = (PRECISE) ? MRecalculate(recalcSuper, vb1, blksize=bs/2, overlap=OVERLAP/2,thSAD=100) : vb1
xf1=(MOCOMPBLOCK)?PostPoint.MCompensate(super,v2f1):PostPoint.mflow(Super,v2f1)
xf =(MOCOMPBLOCK)?PostPoint.MCompensate(super,v2f):PostPoint.mflow(Super,v2f)
xb =(MOCOMPBLOCK)?PostPoint.MCompensate (super,v2b):PostPoint.mflow(Super,v2b)
xb1=(MOCOMPBLOCK)?PostPoint.MCompensate (super,v2b1):PostPoint.mflow(Super,v2b1)
interleave(xf1,xf,PostPoint,xb,xb1) # TEMPSFT_RADIUS==1, and FFT3D only uses middle 3
(FFT3D) ? FFT3DFilter(Plane=4,Sigma=FFT_SIGMA,Sharpen=FFT_SHARPEN) : temporalsoften(TEMPSFT_RADIUS,40,50,mode=2)
(MOCOMP) ? selectevery(5,2) : PostPoint
# MBlockFPS Requires OVERLAP=0
(CHANGEFPS) ? ((BLOCKFPS)?MBlockFPS(super,v2b,v2f,num=NUM,den=DEN,Blend=BLENDFPS):mflowfps(super,v2b,v2f,num=NUM,den=DEN,Blend=BLENDFPS)) : NOP
bicubicresize(720,480) # Whatever resizer you like
(F==1 && !MOCOMP && !CHANGEFPS) ? Subtitle("NO Change",align=5) : NOP
return TWriteAVI("Out7.AVI",fourCC="ULY0",Overwrite=True) # Write to AVI as play clip.
I've taken out the second RGB/upscaling stuff, too unstable.
EDIT: Added PRECISE.
EDIT: Added MRECALC_ON_PREFILT_SUPER
EDIT: Some more changes.
ingoldie
15th March 2016, 17:22
I'm getting "TWriteAVI: Couldn't open a compressor with Fourcc code ULY0" error.
How can I fix it?
StainlessS
15th March 2016, 20:07
Install UT_Video codec or use another Lossless one eg Lagarith, HuffYUV, Magic. [EDIT: Change FourCC to whatever one it uses].
EDIT: In VDub, open Compression and see what codec fourCC's you have available, and pick a lossless one, just as you would in VD.
EDIT: Your Trees in background @ beginning of sample are always going to be a problem for Mocomp framerate conversion,
lots of black vertical 'things' spread across a whitish sky, jumping in real ground space about 20 meters each (camera movement)
and the mv stuff cannot tell if jumping left or right (ie which is it, right tree jumping left or left tree jumping right).
But the rest of the clip is pretty good.
vBulletin® v3.8.11, Copyright ©2000-2026, vBulletin Solutions Inc.