View Full Version : MVBob, stuttering motion
anton_foy
25th December 2005, 14:33
I just tried MVBob, the best deinterlacer I ever tried.
Great work there. Although one problem is it renders a stuttering motion as if it was rendering:
frame 1, frame 3, frame 2, frame 4, frame 6, frame 5 and so on.
My footage is HDV (1440x1080 25i PAL) mpeg-2 and I dont know if this script was written for NTSC or something, ever encountered this problem?
Also I wonder if anyone have seen the MSU Deinterlacer and if it is compareable with MVBob?
Thanks
scharfis_brain
25th December 2005, 16:01
use assumetff() or assumebff() to set the correct fieldorder.
msu-deinterlace isn't available to the pubicity IMO.
anton_foy
25th December 2005, 19:37
Thank you scarfis, I tried both but assumetff() gets: frame 1, 2, 3, 10, 4, 5, 6, 13 or something like that.
Assumebff() gets like tff but 10, 11, 12, 3, 13, and so on... very strange. Also some chroma displacement occurse in the moving areas aswell as blocking artifacts (see below).
original interlaced
http://www.xtreem.nu/jonas/original.png
MVBob deinterlaced
http://www.xtreem.nu/jonas/MVBob_TFF.png
(I enlarged the inerlaced/deinterlaced areas)
my script is:
DirectshowSource("C:\HD\Projekt\hdv.mpg")
ConverttoYV12()
AssumeTFF() #or BFF
MVBob()
AI
25th December 2005, 19:46
if clip is interlaced, need use ConverttoYV12(true)
PS You use latest mvbob?
PPS if yes, you update mvtools to v.1.0.1?
scharfis_brain
25th December 2005, 20:08
Do you have enough RAM installed into you computer? (1GB will be the lower limit!)
Do you use the plugin versions delivered with the package?
deactivate plugin autoloading and only load plugins that you really need!
Chroma displacement is caused by converttoyv12(). converttoyv12(interlaced=true) needs to be used in this case!
Do NOT use directshowsource! It may be responsible for the stuttering!
Use MPEG2Source instead (with DGIndex and Dgdecode.dll)
mpeg2source() will deliver YV12 by itself, so you won't need Converttoyv12.
also MPEG2source is faster, nore reliable, and consumes less memory.
anton_foy
25th December 2005, 20:16
Thanks guys!
Allrighty Scharfis that sounds great I will use MPEG2Source() instead.
My MVTools ver. is 0.9.9.1 Where can I get the new one?
Is this the newest MVBob, maybe im not using the right one?
LoadPlugin("C:\Program\AviSynth 2.5\plugins\LeakKernelDeint.dll")
LoadPlugin("C:\Program\AviSynth 2.5\plugins\undot.dll")
LoadPlugin("C:\Program\AviSynth 2.5\plugins\tomsmocomp.dll")
LoadPlugin("C:\Program\AviSynth 2.5\plugins\MVTOOLS\mvtools.dll")
LoadPlugin("C:\Program\AviSynth 2.5\plugins\masktools.dll")
#Modified from scharfis_brain's post:
#http://forum.doom9.org/showthread.p...er=2#post566854
#requires UnDot v0.0.1.1, TomsMoComp v0.0.1.7, MVTools 0.9.8.5, MaskTools 1.5.6, and LeakKernelDeint 1.5.3
function MVbob(clip c,int "blksize", int "pel", int "lambda", int "thy", int "thc", int "bobth", bool "predenoise", bool "showmask")
{
#Helper functions:
function tmcstupid(clip c)
{ input=c.converttoyuy2(interlaced=true).separatefields.tomsmocomp(1,-1,0)
a = getparity(input) ? input.selectodd : input.selecteven
b = getparity(input) ? input.selecteven : input.selectodd
a=stackvertical(a.crop(0,0,0,1-a.height),a.crop(0,0,0,-1))
output = getparity(input) ? interleave(b,a) : interleave(a,b)
output.assumeframebased().converttoyv12()
}
#disable all scene detection, because it is self-correcting
sc=255
showmask=default(showmask,false)
# luma and chroma thresholds for correcting false detected motion
thy=default(thy,20)
thc=default(thc,10)
# threshold of kerneldeint
bobth=default(bobth,8)
#denoise the video for kerneldeint (better static areas for noisy video)
predenoise=default(predenoise,false)
blksize=default(blksize,4)
scd=(blksize==8)? 300 : round(300/4)
pel=default(pel,2)
#I decided lambda=0 being better, cause it stupidly trys to catch everything. errors are corrected afterwards.
lambda=default(lambda,0)
#determine clip Fieldorder
order=(c.getparity==true)? 1:0
# create clip for motion analysis and hole-filling
bobx=predenoise ? c.temporalsoften(2,5,7) : c
bobx=bobx.leakkernelbob(order=order,threshold=bobth).undot()
bobd=bobx.verticalreduceby2()
#bobd=bobd.lanczos4resize(bobx.width,bobx.height)
bobd=bobd.tomsmocomp(-1,-1,0).undot()
# create clip for motion compensation
fields=c.tmcstupid().undot()
# define clip for hole filling
fields1=bobx
# create motion vectors
mvf=bobd.mvanalyse(blksize=blksize,pel=pel,isb=false,search=3,searchparam=10)
mvb=bobd.mvanalyse(blksize=blksize,pel=pel,isb=true, search=3,searchparam=10)
# detect mismatched areas of motion compensation
bobdf=bobd.mvcompensate(mvf,mode=1,thscd1=scd,thSCD2=sc)
bobdb=bobd.mvcompensate(mvb,mode=1,thscd1=scd,thSCD2=sc)
difff=interleave(bobdf,bobd).motionmask(thy1=thy,thy2=thy,thc1=thc,thc2=thc,thSD=sc).selectodd()
diffb=interleave(bobdb,bobd).motionmask(thy1=thy,thy2=thy,thc1=thc,thc2=thc,thSD=sc).selectodd()
diff=logic(difff,diffb,"OR")
# do the deinterlacing
even1=c.separatefields().selecteven()
odd1a=fields.mvcompensate(mvf,mode=1,thscd1=scd,thSCD2=sc)
odd1a=maskedmerge(odd1a,fields1,difff,y=3,u=3,v=3).selecteven()
odd1b=fields.mvcompensate(mvb,mode=1,thscd1=scd,thSCD2=sc)
odd1b=maskedmerge(odd1b,fields1,diffb,y=3,u=3,v=3).selecteven()
odd1=mergeluma(odd1a,odd1b,0.5).mergechroma(odd1b,0.5)
odd1=(order==1) ? odd1.separatefields().selecteven() : odd1.separatefields().selectodd()
even2=c.separatefields().selectodd()
odd2a=fields.mvcompensate(mvf,mode=1,thscd1=scd,thSCD2=sc)
odd2a=maskedmerge(odd2a,fields1,difff,y=3,u=3,v=3).selectodd()
odd2b=fields.mvcompensate(mvb,mode=1,thscd1=scd,thSCD2=sc)
odd2b=maskedmerge(odd2b,fields1,diffb,y=3,u=3,v=3).selectodd()
odd2=mergeluma(odd2a,odd2b,0.5).mergechroma(odd2b,0.5)
odd2=(order==1) ? odd2.separatefields().selectodd() : odd2.separatefields().selecteven()
even=interleave(even1,odd1)
even=even.weave()
odd=interleave(even2,odd2)
odd=odd.weave()
# output
interleave(even,odd)
analysis=maskedmerge(last.levels(0,1,255,0,200),diff,diff,y=3,u=3,v=3)
showmask ? analysis : last}
scharfis_brain
25th December 2005, 20:21
hmmm. that is a pretty old mvbob with a modification I never tried myself.
try this updated one:
http://home.arcor.de/scharfis_brain/mvbob/mvbob.rar
It already includes all needed plugins. and loads them automatically.
your own script should just inculde those lines:
import("path\mvbob.avs")
loadplugin("path\dgdecode.dll")
mpeg2source("blah.d2v")
mvbob()
AI
25th December 2005, 20:30
I will use MPEG2Source() instead.
that I know, this filter not get frame on right order, when random access to frame. (my English is bad)
I ask about version becose latest mvbob use MVtools v1.0.0, but this version have leak memory.
I don't know about your version and about newest version (possible I test version in the middle)
anton_foy
25th December 2005, 21:06
Avisynth open failure:
MPEG2Source: DGindex/DGDecode mismatch. You are picking up a version of DGDecode, possibly from your plugins directory, that does not match the version of DGIndex used to make the D2V file.
Search your hard disk for all copies of DGDecode.dll and delete or rename all of them except for the one that has the same version number as the DGIndex.exe that was used to make the D2V file.
Hmmm...I only have DGDecode.dll in one place
Fizick
25th December 2005, 21:20
http://home.arcor.de/scharfis_brain/mvbob/mvbob.rar
It already includes all needed plugins. and loads them automatically.
scharfis_brain,
Thank you for your work, but:
Your must distribute only whole package of MVTools and other plugins.
(read GPL license).
At least please add info about all plugins authors and download links to your readme.
Fizick
25th December 2005, 21:21
To all:
Latest MVTools version is 1.0.1 today (see my site).
AI
25th December 2005, 21:27
(it is written by means of Russain language on white - russian humor ;) )
Use DGIndex for make *.d2v file
and read manual DGindex/DGDecode....
scharfis_brain
25th December 2005, 23:37
@Fizick: is it REALLY needed to put all sources & stuff into my package to ensure GPL conformity?
I am just an of enduser and putting all of this stuff into the package will blow it up unneccessary to maybe some MB which will become really uncomfortable and useless cause joe -avisynth- average (who uses that script) won't recognize the sources at all. (I haven't read the GPL yet. I'll maybe find some time next year)
For sure I agree with you to name the Authors and the places I got the packages from.
Wilbert
26th December 2005, 00:39
@Fizick: is it REALLY needed to put all sources & stuff into my package to ensure GPL conformity?
No, just a link to the sources is fine.
Fizick
26th December 2005, 00:50
scharfis_brain,
Sources probably may be omitted, but why omit plugins manuals?
anton_foy
28th December 2005, 01:55
hi again!
I still havent figured out how to import my .mpg -file as *.D2V -file.
Note that my file is try.mpg not try.d2v, I should convert it somehow?
Im such a newbie :P
foxyshadis
28th December 2005, 01:57
DGIndex (http://neuron2.net/dgmpgdec/dgmpgdec.html). :p
anton_foy
28th December 2005, 02:01
yeah well the thing is when I open the try.mpg -file in DGIndex it is just a black screen. Can't even play it...
When I try to save project it says: "No data. Check your PIDS"
scharfis_brain
28th December 2005, 02:13
Stream -> Detect PIDs
is your way to go. You need to set the PIDs (Video and Audio) manually.
anton_foy
28th December 2005, 02:19
OK thanks Scharfis_brain it generated a D2V file!
edit: WOW no stuttering ... plus IT IS TEN TIMES FASTER RENDERING NOW!!!
Thank you all! I will probably be back with more problems though hehe
scharfis_brain
28th December 2005, 02:22
do you have other mvtools.dll-files besides the one in my package on your PC?
if so, (re)move them, so that AVISynth cannot autoload them.
mp3dom
29th December 2005, 00:01
Scharfis, I've tried your latest mvbob (from your latest link) but I receive the error:
"There is no function named "merge"
mvbob.avs line 95
mvbob.avs line 193"
In the Avisynth "plugins" dir I have only the basics dll that came with Avisynth installation. All plugins are in another dir to avoid autoload of old filters.
I'm using Avisynth 2.55. The script is:
Import("x:\mvbob\mvbob.avs")
LoadPlugin("x:\dgindex\dgdecode.dll")
MPEG2Source("x:\movie.d2v")
mvbob()
scharfis_brain
29th December 2005, 00:11
install the newest AVS 2.56 alpha
morsa
3rd January 2006, 03:11
Scharfis:
I've been playing around with this new version of mvbob.
It looks nice to my eyes.My biggest problem with it at this very moment is I'm getting quite unusable frames after every scene change.
I know for sure that I should be doing something wrong.I keep the last setting I was using with the older version:
mvbob(4,2,4000)
PS: Sometimes I'm also getting some weirds artifacts I would call "worm artifacts".they appear whenever I have a shot with a metallic fence and a horizontal travelling (pan)
thanks
scharfis_brain
3rd January 2006, 05:43
you need to name parameters.
morsa
3rd January 2006, 08:59
This way?
mvbob(blksize=4,pel=2)
Ok, I guess I get it it seems I've been so stupid all this time as to not see that 4000 number was a confusion with the lambda parameter of MVtools...
Sorry again...
Note: It seems that as time goes by I'm , instead of improving, becoming more and more dumb.....:(
iceborne
2nd February 2006, 22:48
i was trying out mvbob from the lastest link above on one of my interlaced source in virtualdub and i get this error:
---------------------------
VirtualDub Error
---------------------------
Avisynth open failure:
Script error: mvanalyse does not have a named argument "truemotion"
(˜ñ, line 203)
(C:\Documents and Settings\Administrator\Desktop\hybrid progressive interlaced.avs, line 9)
---------------------------
here's my script:
LoadPlugin("C:\Program Files\DGMPGDec\dgdecode.dll")
mpeg2source("D:\tanw\test.d2v")
crop(14,4,-14,-4)
#denoise
#limitedsharpenfaster()
# Set SAR in encoder to 4 : 3
mvbob()
foxyshadis
3rd February 2006, 01:17
You need new mvtools from the truemotion thread (http://forum.doom9.org/showthread.php?t=102071).
Boulder
16th February 2006, 20:03
Has anybody converted MVBob for using with MaskTools v2.0 alpha? I'm a bit unsure regarding MotionMask<->mt_motion.
vBulletin® v3.8.11, Copyright ©2000-2026, vBulletin Solutions Inc.