View Full Version : MCBob
Comatose
24th May 2008, 01:14
They are not dupes. By doing that, you reduce the temporal resolution by half (similar to half-framerate conversion with mvflowfps).
So uh, what would be the (in most cases) best way to reduce the framerate to something sane like 29.97 or 23.976 fps?
thetoof
24th May 2008, 07:39
Well, to go back to 29.97, cut your temporal resolution by half (selecteven() or selectodd()) and, to convert to 23.976, you have a few options, one being a motion compensated framerate conversion.
If you want to process an interlaced section of a telecined clip, use something like this:
raw=mpeg2source("yourd2v.d2v")
# IVTC the telecided portion of your source
a=raw.telecide().Decimate().trim(0,x) # Use your prefered IVTC method, as long as you add .trim(0,x) at the end, where x is the last frame before the credits. Be sure to check what is the number of that frame after ivtc.
#Bob the interlaced section to 60p
source=raw.mcbob() #or any other deinterlacer you want
#Get the motion vectors (these settings are... hum.. insane :p so change them if you want)
backward_vec = source.MVAnalyse(isb = true, pel=4, idx=1,search=3, overlap=6)
forward_vec = source.MVAnalyse(isb = false, pel=4, idx=1,search=3, overlap=6)
#Convert the fps of the interlaced section
b=source.MVFlowFps(backward_vec, forward_vec, num=24000, den=1001, ml=100, idx=1).trim(first frame of the credits,last frame of the credits) #Be sure to check those numbers after the framerate conversion
#and, if you have something after, ivtc it
c=raw.telecide().Decimate().trim(frame after the interlaced section,0)
a+b+c
A trick to get the correct frame # is by adding return a/b/c at the end of the script.
If you source is always interlaced (which is extremely rare for anime, if that's what you're dealing with), you can use the portion of the script from "bob" to "convert".
Anime is most likely 24 fps with bad telecining. AnimeIVTC() + documentation will soon be ready, so I'd recommend that you take a look at these. My signature will be updated when it's done, so it won't lead to the obsolete post#23.
edit: you can also use MVFlowBlur after the framerate conversion to generate a motion blur that'll make your movements look less choppy.
Inventive Software
27th May 2008, 18:27
I use MCBob with NNEDI posted on the first page I think by Wilbert, and I've had to change the RemoveGrain functions on line 222 of the combined comments + script, under the "EdiPost = 2" section, because the mode specified was out of range and the AVS file wouldn't load in VirtualDub. 20 was the number in the script, I changed it to 2. Would that work as intended?
Didée
27th May 2008, 18:45
No, that'll not do the intended operation. (20) performs a full 3x3 convolution blur, which in its negotiation gives a sharpen operation. (2) is a median-like clamping operation, clamping the center pixel to not exceed the 2nd-extremest neighbors. In the given context this will result in very weak sharpening, probably almost null.
Obviously you're using a *very* outdated version of RemoveGrain. What's the point in not updating to the "v10pre2" (July 2005) version?
Inventive Software
28th May 2008, 00:12
Because my searching skills are obviously lacking. :p Thank you Didée, I shall try again tomorrow. :)
Inventive Software
28th May 2008, 03:05
I got some (not much, but enough of an increase that makes it worthwhile on an AMD Turion64 X2) speed from using MT 0.7 properly with AviSynth 2.5.7, and a fully working MCBob, and the results are, if I may say so, rather impressive. They put into the shade the Bob() that comes with AviSynth. No shimmering to speak of. On an onboard lap at Istanbul Park taken from the F1 2005 Review DVD I had to wait around 2 hours at an average 0.69 FPS to MCBob that lap to a HuffYUV file. I now intend to try compression techniques with x264 and see what I can get.
I have one general question about encoding sports footage, specifically F1. Is it more ideal to encode it interlaced and (if using ffdshow) Kernel bob deinterlace on playback, or Bob / MCBob the source before encoding? Bobbing in general gives double the framerate, but I can't fault MCBob's amazing quality. Oh the dilemma! :D
radar
31st May 2008, 03:12
hi
im trying to use mcbob,but im getting a error "no function named mt_lut.ive read all the posts and tried the corrections sujested.
this is my script:
loadplugin("C:\Program Files\AviSynth 2.5\mcbob\mvtools.dll")
loadplugin("C:\Program Files\AviSynth 2.5\mcbob\RemoveGrain.dll")
loadplugin("C:\Program Files\AviSynth 2.5\mcbob\EEDI2.dll")
loadplugin("C:\Program Files\AviSynth 2.5\mcbob\mt_masktools-25.dll")
import("C:\Program Files\AviSynth 2.5\mcbob\MCBob_v03c.avsi")
MCBob()
please help.thanks
radar
31st May 2008, 10:58
i got mcbob to work,but the video is slow.the sound is fine.
my script:
loadplugin("C:\Program Files\AviSynth 2.5\mcbob\RepairSSE2.dll")
loadplugin("C:\Program Files\AviSynth 2.5\mcbob\mvtools.dll")
loadplugin("C:\Program Files\AviSynth 2.5\mcbob\RemoveGrainSSE2.dll")
loadplugin("C:\Program Files\AviSynth 2.5\mcbob\EEDI2.dll")
loadplugin("C:\Program Files\AviSynth 2.5\mcbob\mt_masktools-25.dll")
import("C:\Program Files\AviSynth 2.5\mcbob\MCBob_v03c.avsi")
MCBob()
the video is nice and not glitchy just slow
i got mcbob to work,but the video is slow.the sound is fine.
the video is nice and not glitchy just slow
it's normal, MCbob is slow... you need re-encoding for normal playback or a new pc
radar
31st May 2008, 11:20
i mean after its done its encoding i play it.the video is slower than the sound but the sound is the correct spd.
Add SelectEven() or SelectOdd() at the end of your script.
thetoof
31st May 2008, 23:00
Adding selecteven/odd won't change the playback speed... only the amount of frames displayed in 1 second(59.94-->29.97).
and radar, what you are describing isn't possible with mcbob(), as it only bobs the video to 60p, which has no influence on lenght nor playback speed. What is the codec of the encoded stream? If you did a lossless rendering pass in uncompressed YV12 or Lagarith, it's possible that your computer can't read it fast enough... Try changing the process priority of your media player to "high".
radar
31st May 2008, 23:46
hi thetoof
i tried changing the process priority of the player,didnt work.how can i find what codec i used???
my system is:
intel core 2 duo E6850
4 gigs of ram
nvidia geforce 8800 gts 512
thetoof
1st June 2008, 01:32
Well, what did you use to encode your file after processing it with mcbob?
Also, could you upload a small 5mb sample to see if we can reproduce your issue?
radar
1st June 2008, 01:39
im using dvd rb and cce 270.
i will upload a clip.
what upload host should i use.thanks
Didée
1st June 2008, 02:14
No need to upload anything. CCE expects input that is DVD compliant. After bobbing, you have 50fps (PAL) or 59.94fps (NTSC), which is NOT compliant with DVD specs (only 23.976 / 25 / 29.97 fps are allowed). CCE silently assumes a compliant framerate, which is why the video then is running at half speed.
In this case you either have to use SelectEven() after MCBob, or you could just use a simple same-rate deinterlacer instead.
radar
1st June 2008, 02:23
hi Didée
ok i will try SelectEven()
this is the clip:http://rapidshare.com/files/119202564/VTS_01_1.VOB
i tried SelectEven() and it corrected the slow vid.thank you very much Didée.
can i now sharpen the image.this is the clip after the mcbob.
http://rapidshare.com/files/119205728/VTS_01_1.VOB (5392 KB).
thetoof
1st June 2008, 03:55
can i now sharpen the image
Off topic. Look here (http://avisynth.org/mediawiki/External_filters#Sharpeners).
radar
1st June 2008, 04:15
can i incorperate the sharpening in with mcbob script.
how would you write the script
thetoof
1st June 2008, 05:18
whateversource("yourfile")
mcbob()
any other filter you want() #like limitedsharpenfaster()
radar
2nd June 2008, 02:32
ok i got this script,looks good but slow.
dose the script look ok.
loadplugin("C:\Program Files\AviSynth 2.5\mcbob\RepairSSE2.dll")
loadplugin("C:\Program Files\AviSynth 2.5\mcbob\mvtools.dll")
loadplugin("C:\Program Files\AviSynth 2.5\mcbob\RemoveGrainSSE2.dll")
loadplugin("C:\Program Files\AviSynth 2.5\mcbob\EEDI2.dll")
loadplugin("C:\Program Files\AviSynth 2.5\mcbob\mt_masktools-25.dll")
import("C:\Program Files\AviSynth 2.5\mcbob\MCBob_v03c.avsi")
MCBob()
SelectEven()
loadplugin("C:\Program Files\AviSynth 2.5\seesaw\degrainmedian.dll")
import("C:\Program Files\AviSynth 2.5\seesaw\SeeSaw.avsi")
backward_vec2 = last.MVAnalyse(isb = true, delta = 2, pel = 2, overlap=4, sharp=1, idx = 1)
forward_vec2 = last.MVAnalyse(isb = false, delta = 2, pel = 2, overlap=4, sharp=1, idx = 1)
a=last.MVDegrain1(backward_vec2,forward_vec2,thSAD=400,idx=1)
b = a.DeGrainMedian(mode=1)
SeeSaw(a,b, NRlimit=5, NRlimit2=6,Sstr=1.5, Slimit=9, Spower=9, Szp=16)
2Bdecided
3rd June 2008, 11:06
radar,
If you are encoding for DVD, why are you deinterlacing?
Cheers,
David.
radar
3rd June 2008, 11:58
its an old fight tape and it has interlacing.this gets gid of it.
im not sure if thats what you are asking.
2Bdecided
3rd June 2008, 13:45
I assumed the source was interlaced, because you are using mcbob - not much point using it otherwise!
However, you can encode interlaced content onto DVD just fine - if you deinterlace it, you will remove half the temporal resolution, creating a stuttery look, like the "fake-film" effect used on some TV shows.
If that's what you want, fine. However, if you just want to make a good DVD of an interlaced source, you are wasting your time deinterlacing.
Cheers,
David.
radar
3rd June 2008, 19:56
how can i make a good dvd copy with out deinterlacing.could you explain it to me ,thanks
Revgen
4th June 2008, 02:38
The only way you can make a DVD without deinterlacing is to make it 29.97fps or 23.976fps. DVD's don't support any framerate over 29.97.
radar
4th June 2008, 12:04
hi Revgen
how would you do that?
2Bdecided
4th June 2008, 14:21
radar,
If you want to do certain processing of your footage (e.g. denoising, sharpening, etc) then you do need to deinterlace, but you need to keep that at double rate, and then re-interlace at the end.
You can use this line of code to reinterlace double rate footage:
separatefields().selectevery(4,0,3).weave()
If it doesn't work, your field order is set incorrectly. In your script, you don't have an AVISOURCE statement, and you don't set your field order at all - maybe you're using it with someone that inserts these automatically, or maybe you cut them out of the part you pasted. Anyway, your previous script would change to this:
loadplugin("C:\Program Files\AviSynth 2.5\mcbob\RepairSSE2.dll")
loadplugin("C:\Program Files\AviSynth 2.5\mcbob\mvtools.dll")
loadplugin("C:\Program Files\AviSynth 2.5\mcbob\RemoveGrainSSE2.dll")
loadplugin("C:\Program Files\AviSynth 2.5\mcbob\EEDI2.dll")
loadplugin("C:\Program Files\AviSynth 2.5\mcbob\mt_masktools-25.dll")
import("C:\Program Files\AviSynth 2.5\mcbob\MCBob_v03c.avsi")
MCBob()
loadplugin("C:\Program Files\AviSynth 2.5\seesaw\degrainmedian.dll")
import("C:\Program Files\AviSynth 2.5\seesaw\SeeSaw.avsi")
backward_vec2 = last.MVAnalyse(isb = true, delta = 2, pel = 2, overlap=4, sharp=1, idx = 1)
forward_vec2 = last.MVAnalyse(isb = false, delta = 2, pel = 2, overlap=4, sharp=1, idx = 1)
a=last.MVDegrain1(backward_vec2,forward_vec2,thSAD=400,idx=1)
b = a.DeGrainMedian(mode=1)
SeeSaw(a,b, NRlimit=5, NRlimit2=6,Sstr=1.5, Slimit=9, Spower=9, Szp=16)
separatefields().selectevery(4,0,3).weave()
Hope this helps.
Looking at your clip, it looks pretty good as it is - maybe I'm not so critical after all!
Cheers,
David.
radar
5th June 2008, 09:21
2Bdecided
i changed my script with yours and ran it in dvd rb with cce.the clip played alright,but it seems to be interlaced.the script that i posted deinterlaced the clip.
loadplugin("C:\Program Files\AviSynth 2.5\mcbob\RepairSSE2.dll")
loadplugin("C:\Program Files\AviSynth 2.5\mcbob\mvtools.dll")
loadplugin("C:\Program Files\AviSynth 2.5\mcbob\RemoveGrainSSE2.dll")
loadplugin("C:\Program Files\AviSynth 2.5\mcbob\EEDI2.dll")
loadplugin("C:\Program Files\AviSynth 2.5\mcbob\mt_masktools-25.dll")
import("C:\Program Files\AviSynth 2.5\mcbob\MCBob_v03c.avsi")
MCBob()
SelectEven()
loadplugin("C:\Program Files\AviSynth 2.5\seesaw\degrainmedian.dll")
import("C:\Program Files\AviSynth 2.5\seesaw\SeeSaw.avsi")
backward_vec2 = last.MVAnalyse(isb = true, delta = 2, pel = 2, overlap=4, sharp=1, idx = 1)
forward_vec2 = last.MVAnalyse(isb = false, delta = 2, pel = 2, overlap=4, sharp=1, idx = 1)
a=last.MVDegrain1(backward_vec2,forward_vec2,thSAD=400,idx=1)
b = a.DeGrainMedian(mode=1)
SeeSaw(a,b, NRlimit=5, NRlimit2=6,Sstr=1.5, Slimit=9, Spower=9, Szp=16)
2Bdecided
5th June 2008, 12:52
If you really want to deinterlace, you do that. It's pointless for DVD, but don't let me stop you. I was just showing you how to process interlaced content through progressive-only filters, and get back to interlaced at the end. If that's not what you want, don't worry.
Cheers,
David.
radar
5th June 2008, 23:12
2Bdecided
if i use your script and put on a dvd,would you still see the interlacing lines.i see them on my computer monitor.
2Bdecided
6th June 2008, 10:08
Then your DVD playback software is not deinterlacing automatically. Most does, as many commercial DVDs are interlaced!
DVD on CRT TV: native interlaced
DVD on LCD/Plasma TV: deinterlaced by the TV
DVD on PC: deinterlaced by the software or graphics card
Remember that interlaced footage contains 60 separate images per second. Progressive footage on DVD can contain a maximum of 30, so if you insist on doing the deinterlacing yourself, you are throwing half the images away to put it onto DVD. Some people would rather do this than trust the deinterlacing in a TV or PC - I think they're mad. If you're that worried about subsequent deinterlacing, don't use DVD.
Cheers,
David.
radar
6th June 2008, 10:20
i didnt know that,thanks for the info.im going to put it on a dvd and try it
thetoof
15th June 2008, 17:48
Do you have the latest removegrain (http://home.pages.at/kassandro/RemoveGrain/RemoveGrain.zip)?
thetoof
15th June 2008, 18:43
Oh, sorry... I thought it was the latest version (I took it from http://www.removegrain.de.tf/) but it seems like the official is not the most up to date.
Get the 1.0b from the wiki : http://avisynth.org/mediawiki/Removegrain
mikeytown2
2nd July 2008, 10:16
could a slight speed improvement be achieved by using the dll version of vinverse (http://forum.doom9.org/showthread.php?p=896352#post896352)?
halsboss
9th August 2008, 01:37
Have I got this right, McBob() does double-framerate deinterlacing like TDEINT(mode=1,order=1) # mode=0=same rate output mode=1=double rate output (bobbing) order=0=BFF order=1=TFF
Darn it, which RemoveGrain for McBob ? My hard disk says I have 2 RARs ... RemoveGrain-1.0.rar and RemoveGrain-Prerelease-1.0.rar and I don't know where I sourced them.
foxyshadis
9th August 2008, 02:30
Fairly sure it's prerelease that's newest. Check the dates on the files inside, or just download the latest to be sure. (Doesn't help that kassandro keeps three versions in three places.)
halsboss
9th August 2008, 02:41
Thanks, the dates/times look the same to me. As far as I can tell, the latest versions as of today are :
# - McBob v0.3c (NNEDI + MCBOB)
# http://forum.doom9.org/showthread.php?p=1055263#post1055263
# - MVTools, preferably v1.4.13 (or newer)
# http://avisynth.org.ru/mvtools/mvtools.html
# eg http://avisynth.org.ru/mvtools/mvtools-v1.9.5.7.zip
# - MaskTools v2.0 (MT_Masktools)
# http://manao4.free.fr/?M=D
# eg http://manao4.free.fr/masktools-v2.0a35.zip
# - nnEDI 1.3 +
# http://bengal.missouri.edu/~kes25c/
# eg http://bengal.missouri.edu/~kes25c/nnedi_v1.3.zip
# - RemoveGrain/Repair package
# http://avisynth.org/mediawiki/RemoveGrain
# http://home.arcor.de/kassandro/prerelease/
# eg http://home.arcor.de/kassandro/prerelease/RemoveGrain-1.0.rar
# - ReduceFlicker (if temp-NR for ME is used)
# http://home.arcor.de/kassandro/ReduceFlicker/
# eg http://home.arcor.de/kassandro/ReduceFlicker/ReduceFlicker.zip
# - ReduceFlicker requires AvsRecursion.dll in the \windows\system32 folder unfortunately
# http://www.avsrecursion.de.tf/
# eg http://home.arcor.de/kassandro/AvsRecursion/AvsRecursion.zip
# - MedianBlur by tsp
# http://avisynth.org/tsp/
# eg http://www.avisynth.org/tsp/medianblur084.zip
Unfortunately not all these are mentioned in WarpEnterprises or the "new plugins" sticky or the Wiki.
halsboss
9th August 2008, 04:36
I got some (not much, but enough of an increase that makes it worthwhile on an AMD Turion64 X2) speed from using MT 0.7 properly with AviSynth 2.5.7, and a fully working MCBob, and the results are, if I may say so, rather impressive. They put into the shade the Bob() that comes with AviSynth. No shimmering to speak of. On an onboard lap at Istanbul Park taken from the F1 2005 Review DVD I had to wait around 2 hours at an average 0.69 FPS to MCBob that lap to a HuffYUV file. I now intend to try compression techniques with x264 and see what I can get.
Thanks for the info. Can you please share your script showing the placement and use of the MT statements ?
Also, what did you use to convert to Huffy 1st ? (I can't figure out how to use lossless properly for HC -> DVD and thought this might be a workaround ).
Adub
9th August 2008, 06:04
The "RemoveGrain-1.0.rar" is the newest one actually. It includes a fix for the SSE3 bug, as well as some greater speed when using the SSE3 version. For more info, read Kassandro's forum. I posted a link in the Avisynth wiki, so everyone should use the one labeled with "SSE3 fix" next to it.
halsboss
9th August 2008, 13:36
Oh joy, in http://forum.doom9.org/showthread.php?p=1168632#post1168632 Revgen seems to be flagging interest in investigating a speedup arising from josey_wells great work.
Adub
9th August 2008, 18:56
Yes, josey_wells has been working on threading and a few other items inside of the MVtools package.
Avenger007
10th August 2008, 02:38
The "RemoveGrain-1.0.rar" is the newest one actually. It includes a fix for the SSE3 bug, as well as some greater speed when using the SSE3 version. For more info, read Kassandro's forum. I posted a link in the Avisynth wiki, so everyone should use the one labeled with "SSE3 fix" next to it.
I'm not so sure that all bugs are fixed in RemoveGrainSSE3.dll.
I tried it with DirectShowSource and it gave different results (Huffyuv file size) with the same script, but SSE2 consistently gave the same results.
However, both SSE2 and SSE3 gave consistent results with AVISource.
Adub
10th August 2008, 03:44
I don't know if size is an accurate measure. The bugs I was speaking of where related to crashes and unstable encodes, which I haven't experienced once with the new version.
Avenger007
10th August 2008, 03:59
I had crashes with MeGUI when using DirectShowSource and SSE3; but mencoder would still run in the background. Now with the new MeGUI version and updates I no longer have those crashes.
The file size of the huffyuv files should be the same because it's the same script (no MT) and the same source and I'm using a single core processor. Thus RemoveGrainSSE3 seems to exhibit some kind of non-deterministic behavior when used with DirectShowSource.
zambelli
19th August 2008, 06:20
Unfortunately not all these are mentioned in WarpEnterprises or the "new plugins" sticky or the Wiki.
Nice summary! Perhaps Didee can add it to the top post.
sno0py
7th September 2008, 02:59
I'm having a bit of trouble with some MCBob... I've got it working, and everything looks fine in the previews, but what comes out on the other end of the encoder looks like it got hit by a flamethrower. Everything is blocked to hell, and the colors are all messed up. I also get this wierd sort of 'slanted line' thing going on... slanted lines that are actually generated by mcbob, and not in the source. I can post pics if it'd help, but I was wondering if this is perhaps a problem that's been seen before.
Again, I'll post screenshots and pc specs if that'd help. I'm hoping it's just a dumb setting i forgot, but let me know.
THANKS!! :)
thetoof
7th September 2008, 03:17
Maybe you simply don't have enough memory to run MCBob + encoder.
Try using a higher Setmemorymax() and doing a lossless rendering pass by loading your script in virtualdub and selecting "fast recompress" with Lagarith or another lossless codec. Then, throw the resulting avi to the encoder of your choice.
If it doesn't solve your issue... I've got no idea what it could be (maybe getting the latest versions of all your plugins would do something, but I assumed it was already done)
You can also give a shot to TempGaussMC_beta1 or 2 for high quality smart-bobbing.
sno0py
7th September 2008, 03:29
Hmm... I have 2GB o ram to throw around, but that is a possibility. Also, I've never heard of this 'TempGaussMC_Beta1 or 2 .... they better than MVBob? mvbob WORKS, but not WELL.... To be honest, too, I think I'd rather choose the path of least resistance, and try the TGMC instead of trying to debug mcbob if it's going to work just as well...
Just for the record, though:
CoreDuo E6750 2.67GHz
2.0GB DDR2 800
eVGA nVidia 7900 GT KO
74GB 10k WD Raptor
X-Fi Champion
but just Reglur XP pro.. not 64bit..... yet....
AVS settings:
global MeGUI_darx = 4
global MeGUI_dary = 3
DGDecode_mpeg2source("H:\intro.d2v",cpu=6,cpu2="xxxxxx",info=3)
ColorMatrix(hints=true,interlaced=true)
McBob()
crop( 8, 0, -6, -2)
Convolution3D(0,6,8,6,8,4,0)
Lanczos4Resize(720,480) # Lanczos4 (Sharp)
Limitedsharpen(ss_x=1.0,ss_y=1.0,smode=3,strength=15)
Undot() # Minimal Noise
megui settings:
program --pass 2 --bitrate 1657 --stats ".stats" --deadzone-inter 18 --deadzone-intra 10 --ref 5 --mixed-refs --no-fast-pskip --bframes 3 --b-pyramid --b-rdo --bime --weightb --direct auto --filter -1,-1 --subme 7 --partitions all --8x8dct --ratetol 2.0 --me umh --merange 32 --threads auto --thread-input --cqm "jvt" --progress --no-psnr --no-ssim --output "output" "input"
vBulletin® v3.8.11, Copyright ©2000-2026, vBulletin Solutions Inc.