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 24th May 2010, 20:18   #461  |  Link
Forteen88
Herr
 
Join Date: Apr 2009
Location: North Europe
Posts: 556
Quote:
Originally Posted by LoRd_MuldeR View Post
Nope. But the MaskTools v2 plugin should be called "mt_masktools-25.dll" or "mt_masktools-26.dll", depending on whether you use the Avisynth 2.5.x or 2.6.x version.
Hmm, I didn't know that :P What's the disadvantage of using "mt_masktools-26.dll" on Avisynth 2.5.8? It worked for me.

EDIT: Thanks for the answer Gavino.
EDIT2: I took a screenshot with mt_masktools-25.dll and one with mt_masktools-26.dll, and the frames were identical (binary).

Last edited by Forteen88; 24th May 2010 at 22:52.
Forteen88 is offline   Reply With Quote
Old 24th May 2010, 21:00   #462  |  Link
Gavino
Avisynth language lover
 
Join Date: Dec 2007
Location: Spain
Posts: 3,431
Quote:
Originally Posted by Forteen88 View Post
What's the disadvantage of using "mt_masktools-26.dll" on Avisynth 2.5.8? It worked for me.
You got lucky.
See this post.
Gavino is offline   Reply With Quote
Old 30th May 2010, 20:16   #463  |  Link
dansrfe
Registered User
 
Join Date: Jan 2009
Posts: 1,210
I'm using the bet2u version with nnedi3, nns=3, and lossless=3 and I must say the output is nothing less than magical. I'm using all the SSE3 versions of the plugins but I'm not sure if they are better to use than the SSE2 versions since I've heard many stories in regards to the stability of SSE3. Also I'm curious to know how MCBobUv6 compares to TempGaussMC_beta2u. Thanks!
dansrfe is offline   Reply With Quote
Old 8th June 2010, 12:00   #464  |  Link
Leinad4Mind
Please, DeInterlace me!
 
Leinad4Mind's Avatar
 
Join Date: Jan 2007
Location: Portugal, Porto
Posts: 81
Hi there, I have made an update. Use at your own risk
Attached Files
File Type: txt TempGaussMC_beta2z.avsi.txt (26.4 KB, 825 views)
__________________
Who am I?! I'm GOD... 8for it... father of my godchilds.

Last edited by Leinad4Mind; 8th June 2010 at 15:04.
Leinad4Mind is offline   Reply With Quote
Old 8th June 2010, 14:49   #465  |  Link
WorBry
Registered User
 
Join Date: Jan 2004
Location: Here, there and everywhere
Posts: 1,197
With all respect, I would suggest that you change the name of your name of your modification to TempGaussMC_beta2'Something-or-other'.
IMHO, TempGaussMC_beta'x' should be reserved for official updates by the author, Didee. Then there is a clear distinction between official versions and unofficial modifications thereof.....of which there are a number floating about. I'm sure he and others would agree.
__________________
Nostalgia's not what it used to be

Last edited by WorBry; 8th June 2010 at 14:59.
WorBry is offline   Reply With Quote
Old 8th June 2010, 15:06   #466  |  Link
Leinad4Mind
Please, DeInterlace me!
 
Leinad4Mind's Avatar
 
Join Date: Jan 2007
Location: Portugal, Porto
Posts: 81
Yeah u're right... I have fix it. ^^ But personally I will continue using as 3. xD It's more simple to write -.-
__________________
Who am I?! I'm GOD... 8for it... father of my godchilds.
Leinad4Mind is offline   Reply With Quote
Old 8th June 2010, 15:29   #467  |  Link
aegisofrime
Registered User
 
Join Date: Apr 2009
Posts: 478
Quote:
Originally Posted by Leinad4Mind View Post
Hi there, I have made an update. Use at your own risk
Can I ask what was changed? It's not immediately obvious.
aegisofrime is offline   Reply With Quote
Old 8th June 2010, 17:12   #468  |  Link
Leinad4Mind
Please, DeInterlace me!
 
Leinad4Mind's Avatar
 
Join Date: Jan 2007
Location: Portugal, Porto
Posts: 81
Fixed chroma shifting 'cause in "josey well" MVtools it's not fixed yet, AFAIK, and added a parameter to change rfilter method. It works for me. ^^

Best regards.
__________________
Who am I?! I'm GOD... 8for it... father of my godchilds.
Leinad4Mind is offline   Reply With Quote
Old 9th June 2010, 15:57   #469  |  Link
me7
Registered User
 
Join Date: Mar 2007
Posts: 217
Since this is still in beta state I was wondering whether it defaults to reasonable values yet. Can I just call "TempGaussMC_beta2()" in my script and get reasonable results, or are input parameters expected?
me7 is offline   Reply With Quote
Old 9th June 2010, 16:23   #470  |  Link
Gser
Registered User
 
Join Date: Apr 2008
Posts: 418
Quote:
Originally Posted by Leinad4Mind View Post
Hi there, I have made an update. Use at your own risk
It would have been nice of you to retain the original appereance of the avs, now its a pain in the rear end to read. And perhaps the letter z is not the best choice if someone else wants to add to it as "z" is the last English letter. Try "w".

Quote:
Originally Posted by me7 View Post
Since this is still in beta state I was wondering whether it defaults to reasonable values yet. Can I just call "TempGaussMC_beta2()" in my script and get reasonable results, or are input parameters expected?
Look at the script and see what the parameters mean. Then decide if you want to change them. The explanations are quite clear.

Last edited by Gser; 9th June 2010 at 16:28.
Gser is offline   Reply With Quote
Old 15th June 2010, 14:34   #471  |  Link
dcrht
Registered User
 
Join Date: Jan 2009
Posts: 4
Does anyone know how to deinterlace this one? I can't determine its field order.
http://www.mediafire.com/?mgujn1njrno
dcrht is offline   Reply With Quote
Old 15th June 2010, 15:23   #472  |  Link
Revgen
Registered User
 
Join Date: Sep 2004
Location: Near LA, California, USA
Posts: 1,545
^Looks like a video/telecine hybrid. I'd suggest using TIVTC with Hint=true and experiment with different hybrid modes in tdecimate.
__________________
Pirate: Now how would you like to die? Would you like to have your head chopped off or be burned at the stake?

Curly: Burned at the stake!

Moe: Why?

Curly: A hot steak is always better than a cold chop.
Revgen is offline   Reply With Quote
Old 15th June 2010, 17:50   #473  |  Link
txporter
Registered User
 
Join Date: Nov 2009
Posts: 110
I was replying to a thread over on Videohelp and started doing some testing with TGMC with various settings to determine speed impact. I have the results summarized over on Videohelp if anyone is interested. I didn't record the final bitrate (which I should have) and didn't look at each of the videos to determine quality. I did look at the default settings and the minimum settings tdeint (#5), as well as a few others. The shimmer that I was trying to get rid of was addressed to my satisfaction with all the ones that I looked at. Obviously, different sources and personal preference will determine what you can live with.

Quick summary here:
1080i PBS HD broadcast of Story of India
converting with x264 (r1602) @ default preset (not x264 limited)
avs file:
Code:
setmtmode(5,0)
MPEG2Source("Path\To\Story.of.India.E1-clip.d2v",cpu=3)
setmtmode(2)
lanczosresize(1280, height)
TempGaussMC_beta2(1,1,0,0,0,0,edimode="tdeint",Smode=1,SLmode=1,Sbb=1,SVthin=0.0,pelsearch=1)
srestore(frate=25)
lanczosresize(width, 720)
removegrain(1)
*modified my version of TGMC to use tdeint because 64bit yadif wasn't available at the time

Results table attached.
Attached Images
 
txporter is offline   Reply With Quote
Old 16th June 2010, 20:25   #474  |  Link
txporter
Registered User
 
Join Date: Nov 2009
Posts: 110
Ok, I am trying to find an easy way to determine the relative amount of flicker for various deinterlace methods. I saw the example floating around some time ago for the Stockholm sequence (4 horizontally stacked videos). That shows it very well for that sequence since it has only panning motion. On a more normal case (TV show/movie), the flickering isn't always so obvious. I have been playing around with overlay and subtract a bit. If I take a clip that I convert with TGMC (baseline settings) and then subtract another clip that I converted with tdeint or yadif, is it the flashing/strobing luma that is referred to as bob shimmer? If so, that method seems to highlight effect well. Just trying to make sure that I am not misleading myself.

I am hoping to use this method to 'detune' TGMC and compare to a default clip to verify that I haven't lost the de-flickering ability in TGMC.
txporter is offline   Reply With Quote
Old 18th June 2010, 19:53   #475  |  Link
txporter
Registered User
 
Join Date: Nov 2009
Posts: 110
Ok, did another pass at TGMC fps by settings. This time a little more systemically and without extra filters in avisynth to skew the results.

Most of these tests were run on a Q6600, 4gb RAM, Vista64 using Avisynth64 and x264_r1629_x64. The results for EEDI2, NNEDI and nnedi2 were run on my dual core laptop using Avisynth32 (2.5.8MT) and x264. For some reason the EEDI2 pass on my desktop crashed half way through, so I don't have those results and NNEDI and nnedi2 have not been compiled for 64bit. I re-ran run#6 (defaults with bicubic) and used the fps from that run to interpolate the fps for EEDI2, NNEDI and nnedi2 at dual core speeds. Based on fps results from the halfway point of the 64bit EEDI2 run, it looks like the fps could be ~3% slower on the 32bit system.

At any rate, my avs file was simple as was my x264 command line (speed would be a little faster without the ssim/psnr calls):
Code:
setmtmode(5,0)
MPEG2Source("video1.d2v")
setmtmode(2)
TempGaussMC_beta2(2,2,1,4,0,4,edimode="EEDI2",Smode=2,SLmode=2,Sbb=1,SVthin=1.0,pelsearch=2)
Code:
x264 --crf 18 --ssim --psnr -o video.mp4 video.avs 2>video.log
TGMC settings were changed as per the following table.


I have included the fps results from x264 and used the default settings to baseline the change in speed. I have included the resultant bitrate so you can get a feel for compressability and also included x264 ssim and psnr results (for what they are worth). I have also included what I am going to be using as my "default" TGMC settings (run19) for converting NTSC DVDs of PAL video.

Mediainfo on file (NTSC DVD Torchwood clip):
Code:
General
Complete name                    : D:\Temp\test\PAL\TGMC_speed_tests\encode\video.mpg
Format                           : MPEG-PS
File size                        : 117 MiB
Duration                         : 2mn 0s
Overall bit rate                 : 8 210 Kbps

Video
ID                               : 224 (0xE0)
Format                           : MPEG Video
Format version                   : Version 2
Format profile                   : Main@Main
Format settings, BVOP            : Yes
Format settings, Matrix          : Default
Duration                         : 2mn 0s
Bit rate mode                    : Variable
Bit rate                         : 7 436 Kbps
Nominal bit rate                 : 9 800 Kbps
Width                            : 720 pixels
Height                           : 480 pixels
Display aspect ratio             : 16:9
Frame rate                       : 29.970 fps
Standard                         : NTSC
Resolution                       : 8 bits
Colorimetry                      : 4:2:0
Scan type                        : Interlaced
Scan order                       : Top Field First
Bits/(Pixel*Frame)               : 0.718
Stream size                      : 106 MiB (91%)

Audio
ID                               : 128 (0x80)
Format                           : AC-3
Format/Info                      : Audio Coding 3
Duration                         : 2mn 0s
Bit rate mode                    : Constant
Bit rate                         : 448 Kbps
Channel(s)                       : 6 channels
Channel positions                : Front: L C R, Surround: L R, LFE
Sampling rate                    : 48.0 KHz
Stream size                      : 6.41 MiB (5%)
txporter is offline   Reply With Quote
Old 24th June 2010, 12:02   #476  |  Link
Terka
Registered User
 
Join Date: Jan 2005
Location: cz
Posts: 704
when someone is dealing with small 'unstable areas' (which you could see after using TGMC) you can try following:
put the green code between the bold original TGMC`s code.
functions GlobalMOCO and LUTDeCrawl are needed. I changed the LUTDeCrawl a litte by adding a global motion compensation line to it.
http://www.aquilinestudios.org/scrip...-20081003.avsi
the masking part is stolen from idontknow whos script.
Quote:
# apply sharpness limiting (SLmode 3|4), or has "draft" been requested?
stage3 = (draft==2) ? t .subtitle("Draft 2")
\ : (draft==1) ? t1 .subtitle("Draft 1")
\ : (SLmode==3) ? ( (SLrad<2) ? stage2.repair(edi,1) : stage2.repair(stage2.repair(edi,12),1) )
\ : (SLmode==4) ? stage2.mt_clamp(pmax,pmin,Sovs,Sovs,U=3,V=3)
\ : stage2

#LUtdecrawl
ythresh=25
cthresh=50
maxdiff=206
GrassDontDance=stage3.LUTDeCrawlGlobalMOCO(ythresh=ythresh,cthresh=cthresh,maxdiff=maxdiff)

#mask the static, use LUtdecrawl on static only
maskp1 = stage3.MMask(fvec1, kind=1, ysc=255).UtoY()
maskp2 = stage3.MMask(fvec2, kind=1).UtoY()
maskp3 = stage3.MMask(bvec1, kind=1, ysc=255).UtoY()
maskp4 = stage3.MMask(bvec2, kind=1).UtoY()
maskf = average(maskp1, 0.25, maskp2, 0.25, maskp3, 0.25, maskp4, 0.25).spline36resize(stage3.width, stage3.height)
stage3=Overlay (GrassDontDance,stage3, mask=maskf)





# "Lossless" stage
#==================
Quote:
function GlobalMOCO (clip clp, int "prev", int "next", int "subpixel", bool "matchfields", float "pixaspect", bool "info")
{
#input has to be ConvertToYV12()
#
prev = default( prev , 0 )
next = default( next , 1 )
subpixel = default( subpixel , 2 ) #quality of matching 0-2
matchfields = default( matchfields, True ) # xxx todo
pixaspect = default( pixaspect , 1.094 ) #PAL
info = default( info , false ) #PAL

# procedure ##############
mdata = DePanEstimate (clp) #motion data
depa = DePanInterleave(clp, data=mdata, matchfields =matchfields,prev=prev, next=next,pixaspect=pixaspect,subpixel=subpixel,info=info)
return (depa)
}
function LUTDeCrawlGlobalMOCO(clip input, int "ythresh", int "cthresh", int "maxdiff",
\ int "scnchg", bool "usemaxdiff", bool "mask") {

Assert(input.IsYV12(),"LUTDeCrawl: YV12 input only")

cthresh=default(cthresh,15)
ythresh=default(ythresh,10)
cthr=string(cthresh)
ythr=string(ythresh)
scnchg=default(scnchg,25)
sc=string(scnchg)
maxdiff=default(maxdiff,50)
md=string(maxdiff)
usemaxdiff=default(usemaxdiff,true)
org=input

tri=org.GlobalMOCO(1,1)
org_minus=org.Trim(0,-1)+org.Trim(0,org.framecount-1)
org_plus=org.Trim(1,0)+org.Trim(org.framecount,0)

org_minus=tri.selectevery(3,0)
org_plus=tri.selectevery(3,2)


org_y=org.Greyscale()
org_minus_y=org_minus.Greyscale()
org_minus_u=UToY(org_minus)
org_minus_v=VToY(org_minus)
org_plus_y=org_plus.Greyscale()
org_plus_u=UToY(org_plus)
org_plus_v=VToY(org_plus)

average_u=mt_lutxy(org_minus_u,org_plus_u,"x y - abs "+cthr+" < 255 0 ?")
average_v=mt_lutxy(org_minus_v,org_plus_v,"x y - abs "+cthr+" < 255 0 ?")
average_y=mt_lutxy(org_minus_y,org_plus_y,"x y - abs "+ythr+" < x y + 2 / 0 ?")

diffplus_y = mt_lutxy(org_plus_y, org, "x y - abs "+md+" < 255 0 ?")
diffminus_y = mt_lutxy(org_minus_y, org, "x y - abs "+md+" < 255 0 ?")
diffs_y = mt_logic(diffplus_y, diffminus_y, "and").Greyscale()

ymask=average_y.mt_Binarize(threshold=0,upper=false)
ymask=usemaxdiff ? mt_logic(ymask, diffs_y, "and") : ymask
cmask=mt_logic(average_u.mt_Binarize(upper=false),average_v.mt_Binarize(upper=false),"and")
cmask=cmask.PointResize(cmask.Width()*2, cmask.Height()*2)

themask=mt_logic(ymask,cmask,"and")

fixed_y=mt_lutxy(average_y,org_y,"x y + 2 /",y=3,u=2,v=2)

output=MergeChroma(mt_Merge(org_y,fixed_y,themask),org)
output=ConditionalFilter(org, org, output, "YDifferenceFromPrevious()", ">", sc)
output=ConditionalFilter(org, org, output, "YDifferenceToNext()", ">", sc)

return (default(mask,false)?themask: output)

}
you got more stable result, a little blurring in some affected areads, and about 4% better compressibilty on clips i have tested (for --crf 22)
speeddown or speedloss not tested.

Last edited by Terka; 24th June 2010 at 12:10. Reason: updated the code
Terka is offline   Reply With Quote
Old 29th June 2010, 14:53   #477  |  Link
TheSkiller
Registered User
 
Join Date: Dec 2007
Location: Germany
Posts: 632
Hello guys,

recently I filmed with my MiniDV Camcorder and now, rather accidentally, I noticed some strange artefacts that TempGauss produces. It is a shot of a house, me standing on the other side of the road filming, when a person on a bike rides by. The rim of the bike causes some sort of "temporal smearing" or ghosting.

The footage was filmed with a Sony DCR-TRV 33E at a very high shutter speed (probably above 1/2000), so the motion is without any motion blur and super sharp.

Here is a screen shot of the problem:

Code:
Avisource("Bike.avi")
assumeBFF() #just to make sure
TempGaussMC_beta2(2,2,0, 4,0,4, lossless=-1, edimode="nnedi2", SVthin=0)
And here is the clip (DV AVI, unprocessed):
http://www.mediafire.com/?2hxylynmumz

I already tried different TGMC settings, but nothing really helped too much.

I don't really need to have this deinterlaced because I'm storing it on DVD, but for scientific purposes - and because I'm curious - I'd like to know if there are any solutions
for this issue.

Last edited by TheSkiller; 29th June 2010 at 16:16.
TheSkiller is offline   Reply With Quote
Old 29th June 2010, 15:56   #478  |  Link
2Bdecided
Registered User
 
Join Date: Dec 2002
Location: UK
Posts: 1,673
Absolutely zero blending on your clip using tempgaussmc_alpha3().

On TempGaussMC_beta2, I see blending just like you.

Cheers,
David.
2Bdecided is offline   Reply With Quote
Old 30th June 2010, 10:10   #479  |  Link
Didée
Registered User
 
Join Date: Apr 2002
Location: Germany
Posts: 5,389
No time for deeper elaboration.

Basically, MVTools is missing the correct motion on the bike's rims.


@2Bdecided

With "absolutely zero blending", you're leaning a little far out of the window. alpha3 is not 100% free of blending. It's more like 90% only. (But I don't like such percentage numbers.)

And of course, beta2 can do the same. I told that in the past, and the fact hasn't changed since.

-----------------
tempgaussmc_alpha3(2,2,0,edimode="eedi2")
==
tempgaussmc_beta2(2,2,0,12,0,1,"eedi2",SLmode=1)
-----------------

The repair triple "12,0,1" is the exact equivalent of rep0/rep1 hardcoded in alpha3.
SLmode=1 is the limiting mode hardcoded in alpha 3.


OTOH, alpha3 has a lot more bob flicker. (Due to spatial limiting, which is a lame method generally.)


Suggestion: (not much tested, just a quick try)

-----------------
tempgaussmc_beta2(2,2,0,12,12,0,"eedi2",SLmode=2,search=5,searchparam=8,dct=5)
-----------------

This avoids blending as alpha3 does, but has less bob shimmer than alpha3, and (slightly) more/sharper/morestable detail.
__________________
- We´re at the beginning of the end of mankind´s childhood -

My little flickr gallery. (Yes indeed, I do have hobbies other than digital video!)

Last edited by Didée; 30th June 2010 at 10:13.
Didée is offline   Reply With Quote
Old 30th June 2010, 10:37   #480  |  Link
2Bdecided
Registered User
 
Join Date: Dec 2002
Location: UK
Posts: 1,673
Didée, I know you told me before - I haven't forgotten - but I'd already tried two approaches to find one that worked - further experimentation was left as an exercise for the reader! I knew you'd be along soon enough to give good advice.

Cheers,
David.
2Bdecided is offline   Reply With Quote
Reply

Tags
deinterlace, flickering

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 23:48.


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