View Full Version : QTGMC Deinterlacing Script (v3.32)


Pages : 1 [2] 3

ihhm
5th December 2011, 02:26
Can anyone please help me find a way to eliminate the vertical shimmers in this clip?

Sample clip:
http://www.mediafire.com/?zc2egghbal2vb11

The shimmers are most visible on the vertical lines of the window blind and cabinets. I even tried the preset "Placebo", but the shimmers are still there. Please pardon my ignorance if these are not called shimmers as I just started learning about encoding. I am still finding my way around MeGUI, QTGMC and Srestore.

Mr Alpha
5th December 2011, 10:11
I get these weird vertical lines (clearly visible in the clouds). Anybody have any recommendations for getting rid of 'em?
http://mralpha.s3.amazonaws.com/qtgmc-artifacts.png

bluered1
5th December 2011, 23:43
thanks for your great work on this awesome script.:) (http://www.egitimduragi.com/)

-Vit-
6th December 2011, 00:21
ihhm: QTGMC can deal with horizontal shimmering effects, but not really the vertical problems that clip is showing. It's not even a shimmer really, being rather occasional...?
Mr Alpha: Similarly, that doesn't initially look like anything to do with QTGMC, but I can't tell without seeing a short clip of the affected source.
bluered1: You're welcome.

ihhm
6th December 2011, 03:04
Vit, thank you for your reply. I will start a new thread outside of QTGMC to see if other filters can help.

Mr Alpha
6th December 2011, 10:43
Mr Alpha: Similarly, that doesn't initially look like anything to do with QTGMC, but I can't tell without seeing a short clip of the affected source.There is definatly a hint of the same pattern in the noise in the source, but it looks to me like rather than removing the noise QTGMC stabilizes it. Here (http://mralpha.s3.amazonaws.com/VTS_01_2-split.VOB) is a 10sec piece of the source.

-Vit-
6th December 2011, 21:46
That's a messed up source. The last shot is progressive and needs no deinterlacing. The first shot looks interlaced, and the top fields are fine, but the bottom fields are just a blend of the current and next frames (i.e. they do not contain a new temporal frame). I think the middle shot (from which your screen cap is taken) is the same. Then there's that fairly strong noise, over a detailed image.

You're not going to get double rate out of this, so QTGMC may not be the correct approach, although it does even out the differences in the fields - you'll want a SelectEven afterwards.

The frame blending means the noise has a temporal echo, which may fool any temporal denoising into thinking it's not noise, meaning you need a stronger denoise that you would expect. A spatial denoise of sufficient strength will destroy the detail. Also the temporal processing of QTGMC is reinforcing the issue, leaving you with that fairly stable grain. Really this needs a more customized repair job, beyond the scope of QTGMC. Within the QTGMC settings you might want to set TR1=1 and TR2=0 (or 1), to reduce the temporal processing of QTGMC and stop the grain from being stabilized. That will leave you with more noise to get rid of though...

Mr Alpha
7th December 2011, 12:40
That's a messed up source. The last shot is progressive and needs no deinterlacing. The first shot looks interlaced, and the top fields are fine, but the bottom fields are just a blend of the current and next frames (i.e. they do not contain a new temporal frame). I think the middle shot (from which your screen cap is taken) is the same. Then there's that fairly strong noise, over a detailed image.

You're not going to get double rate out of this, so QTGMC may not be the correct approach, although it does even out the differences in the fields - you'll want a SelectEven afterwards.

The frame blending means the noise has a temporal echo, which may fool any temporal denoising into thinking it's not noise, meaning you need a stronger denoise that you would expect. A spatial denoise of sufficient strength will destroy the detail. Also the temporal processing of QTGMC is reinforcing the issue, leaving you with that fairly stable grain. Really this needs a more customized repair job, beyond the scope of QTGMC. Within the QTGMC settings you might want to set TR1=1 and TR2=0 (or 1), to reduce the temporal processing of QTGMC and stop the grain from being stabilized. That will leave you with more noise to get rid of though...
If the frame blending is what is causing the issue, would it make sense to do it like this:

First run QTGMC with TR1=1 and TR2=0, but without any denoising at all,
then run SelectEven to get rid of the blended frames,
And lastly run a separate denoiser on the remaining even fields, thus hopefully avoiding the temporal echo?


A side question: What about crop? Would it make more sense to move crop to before QTGMC and thus save me some pixels to process, or would that interfere with QTGMC?

-Vit-
7th December 2011, 14:02
If the frame blending is what is causing the issue, would it make sense to do it like this:

First run QTGMC with TR1=1 and TR2=0, but without any denoising at all,
then run SelectEven to get rid of the blended frames,
And lastly run a separate denoiser on the remaining even fields, thus hopefully avoiding the temporal echo?

Yes that seems reasonable. There will still be a little blending in the result since QTGMC fundamentally relies on some temporal processing. Still it's better than completely discarding the blended frames, since they contain genuinely new spatial data, even if it is blended.

A side question: What about crop? Would it make more sense to move crop to before QTGMC and thus save me some pixels to process, or would that interfere with QTGMC?
Yes, that's fine.

nhope
10th December 2011, 05:30
Adding resizing at all is rather pushing the feature envelope of QTGMC and gamma-aware resizing has never really caught my interest, but I'll make a note to have a look...
I'm starting to look into upscaling with NNEDI3, as highlighted in this thread (http://forum.doom9.org/showthread.php?t=163345).

e.g.

#720x576 interlaced source
QTGMC()
NNEDI3_rpow2(rfactor=2, cshift="spline36resize", fwidth=1280, fheight=720)

Is this sensible, or is there a smarter way to integrate this type of resizing with the deinterlacing, since QTGMC uses NNEDI3 anyway?

-Vit-, if you are considering including resizing in a future version of QTGMC, is this something you could look at instead of, or in addition to the more basic resizers?

-Vit-
10th December 2011, 14:56
#720x576 interlaced source
QTGMC()
NNEDI3_rpow2(rfactor=2, cshift="spline36resize", fwidth=1280, fheight=720)
Is this sensible, or is there a smarter way to integrate this type of resizing with the deinterlacing, since QTGMC uses NNEDI3 anyway? ... if you are considering including resizing in a future version of QTGMC, is this something you could look at instead of, or in addition to the more basic resizers?
That is my preferred method of upscaling by far. If upscaling makes it into QTGMC it will be via some NNEDI3-related method.

tormento
13th December 2011, 09:51
Is it possible to use it to convert from 50i to 25p interpolating adiacent frames?

kypec
13th December 2011, 11:39
Is it possible to use it to convert from 50i to 25p interpolating adiacent frames?
Yes of course, it's the main purpose of this awesome script! :p
Please read the first post and included documentation for details.

TheSkiller
13th December 2011, 14:04
Yes of course, it's the main purpose of this awesome script! :pI have to disagree, the main purpose is to bob-deinterlace interlaced content which means the result has double the frame rate of the source. :p

There are no "adjacent frames" that need to be interpolated. It's actually the other way around, if you want to stay with the source frame rate, then you are throwing away 50% of the available temporal information (every other bob-deinterlaced frame is discarded). As a consequence, with most videos, especially ones with fast and/or shaky motion, this will lead to a stroby looking video. QTGMC offers the option to add motion blur to aid this but still it's naturally very recommendable to go with the double rate output if there's no particular reason not to (like YouTube).

tormento
14th December 2011, 19:17
I have to disagree, the main purpose is to bob-deinterlace interlaced content which means the result has double the frame rate of the source. :p
No, I want to go from 50i to 25p (with same speed, obviously). I did hope in something to use both fields, not only one.

smok3
14th December 2011, 20:54
tormetno, 1st example in 1st post of this thread:

YourSource("yourfile")
QTGMC( Preset="Slow" )
SelectEven()

tormento
14th December 2011, 23:52
tormetno, 1st example in 1st post of this thread[/CODE]
Does it take two fields in consideration or only one?

Didée
15th December 2011, 00:03
At max settings, up to fourteen fields for each output frame.

Don't compare QTGMC (its workflow) with that of other deinterlacers. it works different, it IS different.

Usual deinterlacers go "to weave, or not to weave, that's the question".

QTGMC basically is a motioncompensated temporal superresolution filter.

TheSkiller
15th December 2011, 00:17
tormento sorry you don't seem to understand how this whole deinterlace thingy of interlaced video works.
If you deinterlace an interlaced video using QTGMC("slower") naturally both fields will be taken into account for deinterlacing and that is why the output has double the frame rate of the input.
It converts 50 fields per second (wrapped in 25 interlaced frames per second) to 50 frames per second. If you then try to end up with 25 progressive frames per second you are throwing away what originally was in every other field. So to take "both fields into account" you have to stick with double rate output, as simple as that. You cannot keep the motion of 50p or 25i (50i) with just 25p. The speed of the video stays the same of course, speed is not even involved at all.

Asmodian
15th December 2011, 01:32
QTGMC basically is a motioncompensated temporal superresolution filter.

:D

I love how you get to the heart of the issue without dumbing it down much. Thanks Didée.

I have noticed that QTGMC does take both fields into account even if you output 25p, by this I mean there are more details on the output frame than exist on one field. I will have to leave how this is accomplished to others. ;)

-Vit-
15th December 2011, 01:55
Yes, QTGMC does "take both fields into account" (and more) even if you keep single rate. Every output frame is constructed from a range of neighbor fields as Didée has noted. By default the current field is interpolated into a full frame, then the two fields before and after (interpolated + motion compensated) are combined into the frame in such a way as to remove bob-shimmer. This temporal processing also enhances detail to some degree and has some noise reducing effect.
So all source data will have been used in your output even after a SelectEven(). The result will be primarily based on the even fields of course, but the neighboring ("thrown away") fields will have had an influence too.

Gavino
15th December 2011, 10:27
I have noticed that QTGMC does take both fields into account even if you output 25p, by this I mean there are more details on the output frame than exist on one field. I will have to leave how this is accomplished to others. ;)
Most deinterlacers will take neighbouring fields into account in some way, rather than simply interpolating a single field. Exceptions to this are Bob (at one end of the sophistication spectrum) and the nnedi family (at the other).

ajp_anton
21st December 2011, 01:29
When EdiMode doesn't match anything (so it uses Bob) (of course together with SourceMatch), the result looks horrible.
Adding a ComplementParity to bobbed fixes this.
Line 353-355: bobbed = (InputType == 0) ? planarClip.Bob( 0,0.5 ).ComplementParity() : \
(InputType == 1) ? planarClip : \
planarClip.Blur( 0,1 )

Gavino
21st December 2011, 10:52
When EdiMode doesn't match anything (so it uses Bob) (of course together with SourceMatch), the result looks horrible.
Adding a ComplementParity to bobbed fixes this.
I haven't looked into the details of how the bobbed clip is used inside QTGMC, and hence why your fix is necessary, but I suspect it is connected with the fact that Bob always resets its output clip to the default BFF.

Therefore, the parity should probably only be reversed if the input clip is TFF.

ajp_anton
21st December 2011, 22:07
I haven't looked into the details of how the bobbed clip is used inside QTGMC, and hence why your fix is necessary, but I suspect it is connected with the fact that Bob always resets its output clip to the default BFF.

Therefore, the parity should probably only be reversed if the input clip is TFF.
It's captured from an analog source, and in all the years I've captured these videos, I've never bothered to check which one it actually is, or which one is default. But I always had to use ComplementParity() before deinterlacing. So yeah, it's probably because of the non-default order.

Gavino
21st December 2011, 23:38
That suggests your captured clips are TFF.

If my assumptions about the problem are correct, your suggested fix to QTGMC will work for your source, but will make BFF sources go wrong instead. It needs to check the parity of the original input and reset the Bob() output to match it, rather than calling ComplementParity() unconditionally.

-Vit-
22nd December 2011, 06:18
Thanks ajp_anton/Gavino, noted. I finally have the time for occasional QTGMC work again. I may put out a service release with a few minor bug-fixes/improvements in the next week or so, as the next major release will still take some time.

shagratt71
24th December 2011, 01:55
Im sorry if this a stupid question but I'm really trying my best to get to grips with all this. Is it possible to use QTGMC within Ripbot?, if so, is there anyone who would be willing to lend me a hand in setting it up?

zerowalker
28th December 2011, 16:50
Does anyone have like, a package for all the 64 bit plugins that exist and that is needed for QTGMC?
As i heard it´s should be pretty much faster, would like to try it:)

-Vit- // Good Work;U!!

dbart
28th December 2011, 17:24
Hi everyone :)

is there a filter/solution for this record ?

http://www.mediafire.com/?rwugl4d4269x5v6

thanks

smok3
28th December 2011, 20:59
dbart: looks like a dirty (composite connection?) analog path was there to make this happen, possibly with some less than perfect digital compressor (might be also something to do with the way some of the digital tapes work, when their head is getting aged...), deinterlacing works thought (i just tryed quick yadif=0).

ajp_anton
29th December 2011, 02:04
I'm starting to look through / rewrite the code for this to better understand how it works.
I noticed that instead ofts = bobbed.temporalsoften(1,255,255,28,2)
binomial = ts.merge(bobbed, .25)it's faster to dobef = bobbed.trim(0,-1)+bobbed
aft = bobbed.trim(1,0)
binomial = merge(bef,aft).merge(bobbed)
There are some slight differences of max 1, probably due to rounding.
Comparing them to a mt_lutxyz, which I guess is the most accurate (in 8-bit), on my test clips it seems temporalsoften has on average ~22% errors and "my" trick has ~25.0% (how many pixels are off by 1).
Not that it makes much speed difference either, but it's something...
edit: mt_lutxyz actually runs between these two in terms of speed (but obviously needs much more RAM and has slower startup time).

-Vit-
29th December 2011, 03:53
I doubt your few extra out-by-1 pixels will cause much problem since the result is only used for motion analysis where the pixels are aggregated into blocks. The lack of motion compensation at that point is likely a much more significant source of motion analysis error.
However, TemporalSoften has (simplistic) scene change detection, whereas your script will blend across scene change boundaries, which may cause analysis errors or conceivably make scene change boundaries be missed when motion analyzed...

ajp_anton
29th December 2011, 04:44
Ah, didn't think about that. That could be why it's slower =). The content I'm fine-tuning this for doesn't have any scene changes so I'm fine without it.

rep0 seems to take care of most of the scene change artifacts though. Especially rep0=0, which leads me to:
Is there any downside to using QTGMC_KeepOnlyBobShimmerFixes with rep0=0? It's "blocked" in your script (and the original TGMC), but I think it does a pretty good job. (And rep1/rep2? Haven't gotten that far yet =).)

edit: Another thing I've been thinking about... that epsilon in GaussResize.
I realize how meaningless this is, as it's probably well within the precision of 8 bits, but it disturbs me a little that the epsilon "downsizes" the clip. Using it to "shift" instead helps me sleep a little better at night =). (GaussResize(w,h,ep,ep,w,h,p=2))

-Vit-
29th December 2011, 15:26
Temporal smoothing is used to remove bob-shimmer, but we don't want large areas of motion blur so the Rep0/1/2 settings limit the amount of change that the temporal smoothing is allowed to make. Higher values for Rep0/1/2 allow larger areas of change from the smoothing, but (counter intuitively) 0 switches of the limiting completely and so allows all changes through. You're right that there is a code path for Rep0/1/2 = 0 that is not used. However, that code path would only allow 2-pixel high areas of change, much bob-shimmer covers a larger area than that. It would be getting close to doing no temporal smoothing at all, similar to TR0/1/2=0 and would be especially bad on stationary detail. Having said that, it does seem to be a little odd not to allow that code path even if it is not the most useful.

Why is 2 pixels not enough? Consider a stationary single pixel high horizontal line, positioned such that it appears only in the even fields. The bob will expand that to a 3 pixel high line, and clearly it will be a cause of major bob-shimmer, flickering on and off. When temporally smoothed, the now 3 pixel high line is softened in the even frames and appears in the odd frames. Bob shimmer removed - by a 3-pixel high area of change, which would be removed if you followed the Rep0=0 code path... I could make that more clear with a diagram, but I hope you get the idea...

[I note that my comments on that function need an update for precision: the two vertical in/expands allow through areas of change up to 4 pixels high, the in/deflate and RemoveGrain are not limited vertically so they also perform some measure of mask clean up]

As I'm sure you're aware, the epsilon is only there to trigger the GaussResize to do its blur even though we're not actually resizing, I'm sure it doesn't matter much where it is placed given the tiny value and the fact it is being used on a huge blur anyway. I do wonder if there's a more efficient way to do a Gaussian nowadays, or something similar.

ajp_anton
29th December 2011, 17:44
Yes it seems that higher reps are needed for really worst case scenarios (made some in mspaint =)).

rep=0 flickers slightly on most 1-pixel lines but works on everything (?) else, rep=3 captures 1-pixel lines, but rep=5 is needed for when two lines are spaced 2 pixels from each other. Here rep=0 fails hard.
What I don't like about rep>0 is that they allow too much blur in motion, and my videos are slightly blurred before being interlaced, so rep=0 works well there.

(I know why the epsilon is used, I just don't like where it's used, even though it makes exactly zero difference =).)

-Vit-
29th December 2011, 18:47
Those "worst case" examples occur in reality - almost any static text/captions/graphics, and also detailed stationary shots. I can easily find examples where the rep=0 code path looks very bad. However, as I have a small update to make shortly I will probably enable that code path with Rep=1 and shift the other Rep values up by 1. I'm sure the 2 people who actually use those settings manually can cope with the change :p

Stereodude
2nd January 2012, 05:50
Does anyone have like, a package for all the 64 bit plugins that exist and that is needed for QTGMC?
As i heard it´s should be pretty much faster, would like to try it:)I tried to get QTGMC to work on a Windows 7 x64 system and was basically unsuccessful. I could use QTGMC in 64-bit mode (no script errors or complaints). In VirtualDub x64 after 42 frames it would basically go unusable. Advancing to the 43rd frame would cause it to hang for several minutes before finally returning the image. Same for the 44th frame, etc... This was with full 1920x1080i60 content. I gave up and used a 32-bit flow with piping to x264 x64.

Here is my post on it (http://forum.doom9.org/showthread.php?p=1538185#post1538185).

wOxxOm
3rd January 2012, 08:39
if you have a 64-bit Windows and a lot of RAM (4+ GB) then patching 32bit host exe (avs2yuv etc) with 4GB limit patch (http://www.ntcore.com/4gb_patch.php) helps qtgmc a lot - then you can set SetMemoryMax(3072) or probably even more and enjoy your qtgmc.

zerowalker
3rd January 2012, 22:03
Okay will try it:)

SamKook
6th January 2012, 20:42
if you have a 64-bit Windows and a lot of RAM (4+ GB) then patching 32bit host exe (avs2yuv etc) with 4GB limit patch (http://www.ntcore.com/4gb_patch.php) helps qtgmc a lot - then you can set SetMemoryMax(3072) or probably even more and enjoy your qtgmc.

If you encode to x264 directly, it already has 4GB support.

But what I wanted to say is that using SetMemoryMax sometime helped prevent crashes, but it doesn't seem to limit the RAM usage of the encoder, or it doesn't do it to that exact number. I used to set it to 1024 and x264 and virtualdub were using between 1.6 and 2.2GB of RAM depending on the source.

Piping it to 64bit x264(32bit also works but is a little slower) using avs2pipe(avs2yuv had problems with v2.6 of avisynth I think) without having distributor() in the avs(seemed a little faster with it, but it kept crashing with my settings) is the only way I found to prevent crashes using extreme setting with QTGMC

redfordxx
17th January 2012, 18:11
You might wanna consider trying RAverageW and RMerge in your script:
RMerge - if you are bothered with the issue, that max weight can be 255 not 256
RAverageW - for speedup

Pros and cons:
RMerge (mode=256)
+ correctly calculates merging with mask values reaching 255
- not sse optimized yet
RAverageW
+ faster
+ multiple input clips
- y,u,v=3 works but any other numbers disable the processing, like y,u,v=1

Basically, every lut which involves linear combination of clips is possible to write with RAverageW and is faster.

Examples:



lossed1.mt_lutxy( vresharp, "x x y - "+ string(sharpAdj) + " * +", U=3,V=3 )
RAverageW(lossed1,1+sharpAdj,vresharp,-sharpAdj)

mt_lutxy( lossed1, lossed1.VerticalCleaner( mode=1, modeU=-1, modeV=-1, planar=true ), "y x - " + string(SVThinSc) + " * 128 +", U=1,V=1 )
RAverageW(lossed1,SVThinSc,lossed1.VerticalCleaner( mode=1, modeU=-1, modeV=-1, planar=true ),-SVThinSc,bias=128, U=1,V=1)


backBlend2.mt_adddiff( finalNoise.mt_lut( "x " + noiseCentre + " - " + string(GrainRestore) + " * 128 +", U=CNmt1,V=CNmt1 ), U=CNmt2,V=CNmt2 )
RAverageW(backBlend2,1,finalNoise,GrainRestore,bias=-noiseCentre, U=CNmt1,V=CNmt1)
#however here we have problem with chroma processing option (only 1 or 3 possible)

degrain1.Merge( degrain2, 0.2 ).Merge( edi, 0.0625 )
RAverageW( degrain1, 12/16.0, degrain2, 3/16.0, edi, 1/16.0 ) # if I am not mistaken

RockTheBass
17th January 2012, 18:38
Hi everybody!

I need some help to encoding an NTSC video with 29.970 fps.
This is an IVTC video. It has 2 double frame after every 5th frame.

The video's Parity: Assumed Bottom Field First.

I want to deinterlace the video. Please help me how I do this properly using QTGMC. I think this is the best deinterlace filter, its works like a charm ;)

If I want to deinterlace a 25FPS PAL movie I using this script: AssumeBFF().QTGMC(Preset="Very Slow", FPSDivisor=2, EdiThreads=4)

But in this case I has to remove the duplicated frames, so I need to use something like this, right?

TFM(slow=2,clip2=QTGMC(preset="very slow", EdiThreads=4).SelectEven()).Tdecimate()

Unfortunatelly this script isnt looks great...

Can somebody help me and post me a proper script?

Thank you!

Boulder
17th January 2012, 19:03
TFM().TDecimate() for IVTC, no QTGMC at all there.

RockTheBass
17th January 2012, 19:41
TFM().TDecimate() for IVTC, no QTGMC at all there.

Ok, but I thought i hould combine them together, because the QTGMC is a well good deinterlace filter.

Boulder
17th January 2012, 20:04
There is nothing to deinterlace. After you IVTC, you have a progressive clip running at 23.976fps.

RockTheBass
17th January 2012, 21:28
There is nothing to deinterlace. After you IVTC, you have a progressive clip running at 23.976fps.

I understand. Then can you give it some good IVTC script, please? :)

-Vit-
17th January 2012, 21:45
You might wanna consider trying RAverageW and RMerge in your script
I'll have a look. I did promise a minor update and I haven't delivered on that yet. It'll be an incentive...

I particularly like the last of the three suggestions because it makes the temporal weightings of the neighbor frames a little bit clearer. Those weightings are the key feature in (Q)TGMC to remove bob-shimmer.

Not sure how much of a speed impact it will have though, most of the time is spent in NNEDI3 and MVTools...

Didée
17th January 2012, 22:03
Back when I wrote the old TGMC, I simply used Merge to reduce the number of required plugins. If it would've been for reasons like speed or clarity, I could've used mg262's Average() plugin just as well.

Speed should hardly be concerned with all three operations mentioned. Perhaps some 1080i-deinterlacing will jump from 2.345 fps to 2.346 fps? ^^

Boulder
17th January 2012, 22:48
I understand. Then can you give it some good IVTC script, please? :)Like I already wrote: TFM().TDecimate() is probably all you need. They are in the TIVTC plugin if I'm not mistaken.

redfordxx
18th January 2012, 02:03
Not sure how much of a speed impact it will have though, most of the time is spent in NNEDI3 and MVTools...

Back when I wrote the old TGMC, I simply used Merge to reduce the number of required plugins.

Both of these thing also came to my mind also... It was just a suggestion.

RockTheBass
25th January 2012, 22:34
Like I already wrote: TFM().TDecimate() is probably all you need. They are in the TIVTC plugin if I'm not mistaken.

Yes, these are in TIVTC plugins. I have already tried these plugins, but the video result not good enough as I expected. If I use this code, I get more beautiful picture:
AssumeBFF().QTGMC(Preset="Very Slow", FPSDivisor=2, EdiThreads=4)


So, I need plugins/code different from this:
TFM().TDecimate()
which can do enough nice picture quality for me :) :rolleyes:

ajk
26th January 2012, 09:24
Well can you post a sample? Deinterlacing is simply wrong for a telecined source so there must be something else going on.

RockTheBass
26th January 2012, 23:02
Well can you post a sample? Deinterlacing is simply wrong for a telecined source so there must be something else going on.

Unfortunatelly I dont know a sotware that can cut .mov file without reencoding a video. If somebody knows that program I can put a sample file here.

ajk
27th January 2012, 07:35
I don't really work much with .mov files so unfortunately I don't know. It would probably be fine to re-encode a small section as HuffYUV, Lagarith or something, just take care not to do any de-interlacing or such in the process.

Also it would probably be best to start a new thread rather than clutter this already massive QTGMC one :)

Zep
30th January 2012, 16:24
what settings are good to turn QTGMC into a simple smart (semi-fast) deinterlacer? Basically i have a source that keeps changing field order randomly.
Could go 10 minutes or 10 seconds before a field order changes.

fleon
2nd February 2012, 16:20
Hi, I have a sample of my first birthday recorded in Video8, then it was transferred into a VHS (I don't know how), and just recently extracted from that VHS and then converted with some weird connections and a Pinacle software into a MJPG stream (I can fix this last step if you recommend me a better software that extracts it and converts it with a better codec), Anyway I have the AVI file in my Pc, this is the mediainfo analysis : http://paste2.org/p/1891960 , I just know that it is interlaced, but I also know that the video needs more preprocessing like deinterlacing before getting encoded into x264, so can you guys help me out? how can I make the video look better?, this is the sample : http://www.mediafire.com/?hnl4b2snhb9h9bl

Thanks

CruNcher
3rd February 2012, 00:11
Hi what is currently a very hard interlace sample that brings yadif to its knees (shimmer and other leftovers) where QTGMC shines in a direct compare very clearly ;) ?

fleon
3rd February 2012, 04:08
@CruNcher
So what you are saying is that QTGMC is more than enough for my sample right? that it can be fixed with QTGMC, if that is what you are saying please guide me with the settings that I should use.

Thanks

CruNcher
3rd February 2012, 04:52
I was... ahh what ok first there doesn't seem to be any interlacing left though a lot of aliasing and yes you should rather redo the transfer step into some lossless format instead of mjpeg , and before you begin remastering it you should really cut it first how you want it to be.
There also seem to be a lot of ghost frames in that transfer and 1 or 2 cut that brake the flow cutting only 1 frame forth and back is just distracting (though if you want to keep them for historical reasons you could also let them in, thats up to you), so if the next transfer should also have them try to remove those (ghost frames) first, though first of all save this transfer you don't know what might happen the next time :)
After that open a new thread, though better is search first for some VHS recover specific one and revive it :)

fleon
3rd February 2012, 12:59
@CruNcher
Ok then I will transfer the video again, but I have to do it myself, because the guy that did it only knows that way to do it (with Mjpeg), so could you please recommend me a software and a lossless format to do it? (As I said he used a Pinacle software, but I'm now sure if that software will be compatible with a lossless format), and also please guide me with some settings?, I know I ask for a lot but it's the video of my brother and I first year( I am the first one that appears on the video and my brother is the second one), so It will mean a lot if you help me out.

Thanks

Didée
3rd February 2012, 17:09
Hi what is currently a very hard interlace sample that brings yadif to its knees (shimmer and other leftovers) where QTGMC shines in a direct compare very clearly ;) ?
This, maybe?

http://www.mediafire.com/?ixrqo8osqk6i8w7

Sorry the small sample is so big - the 24MB filesize split (roughly) into 8MB for TGMC :) , but 16MB for Yadif. :scared:

DVB source file: http://www.mediafire.com/?lerqqj990atqf5l

CruNcher
4th February 2012, 05:02
Wow intel does not that bad on the first sight less artifacts (especially shimmering,aliasing), thx Didee 1000 thx also for the direct comparison gonna post results shortly, yup definitely in realtime less shimmering also aliasing looks almost comparable to TGMC on the Edges from the table but im comparing Realtime currently, and the motion failure it showed in the previous test sequence i would say doesn't weight as heavy as compensating this very visible issue more efficiently https://forum.doom9.org/showpost.php?p=1555516&postcount=675 .

@ fleon for transfering you could use virtualdub www.virtualdub.org as lossless codec lagarith http://lags.leetcode.net/codec.html


PS: Sorry took a little longer https://forum.doom9.org/showpost.php?p=1555989&postcount=689

zerowalker
22nd February 2012, 02:48
Is there any advantage in using QTGMC on YUY2 instead of YV12?

-Vit-
22nd February 2012, 04:08
YUY2 has twice the chroma vertical resolution of YV12. Only useful if your source is YUY2. Read the small note in the first post regarding the setup of QTGMC for YUY2.

zerowalker
22nd February 2012, 04:12
Yeah but i mean, in the end it becomed YV12, so does it matter if i do QTGMC before or after the convertion?
As in YUY2 i think that QTGMC is extremely slow.

-Vit-
22nd February 2012, 15:38
Ah well if, you're encoding to YV12 not YUY2 then there will be much less difference. I guess using QTGMC before the conversion to YV12 might retain fine vertical chroma detail a little better by the end. I doubt it would be very noticeable in most cases.

zerowalker
22nd February 2012, 21:13
Okay thanks;D

Weirdo
23rd February 2012, 14:03
I'm getting the "there is no function named yadif" error with the "faster" preset. Is this to be expected? Should I manually add yadif to script?

update: Ok, I manually added Load_Stdcall_Plugin("F:\...MeGUI\tools\yadif\yadif.dll" and it worked.

horrormaster34
25th February 2012, 06:22
Does QTGMC just deinterlace with the presets or does it also do sharpening, denoising, noise stabilizing, etc.? I basically just want to use QTGMC to deinterlace and nothing else.

Boulder
25th February 2012, 09:47
I'm still using this as the basic setup as suggested by -Vit-:

QTGMC(matchpreset="very slow",SourceMatch=2,Lossless=2,EZKeepGrain=0.4,Sharpness=0.1)

Usually I also set the defaults preset to "very slow" and use tr2=0 to avoid any extra smoothing.

Taurus
25th February 2012, 12:52
Does QTGMC just deinterlace with the presets or does it also do sharpening, denoising, noise stabilizing, etc.? I basically just want to use QTGMC to deinterlace and nothing else.
It's all very well explained in the readme/html which comes along with the download/english instructions on the first page of this thread :p
(Q)TGMC is doing more magic as simple bob().:D

Weirdo
25th February 2012, 14:59
I'm getting update warnings from MeGUI on eedi2 and tdeint. Has this something to do with the "Vit-mod" plug-ins I'm using?

-Vit-
25th February 2012, 15:57
sharpening, denoising, noise stabilizing
You will get a little of all three if you provide only a preset and no other settings. QTGMC is not really trying to be a sharpener or denoiser, this happens mainly a byproduct of the processing used to avoid shimmer. The light temporal smoothing / denoising improves compressibility, and the sharpening provides some detail enhancement. Despite the fact that this moves the result away from the source, most people like those effects.

The impact on noise is often very minor, and you may not care to do anything about it, especially since it will involve more processing. However, some people do take the sharpness down, and that's a free operation, e.g. Sharpness=0.4 or 0.7

However, if you really want something that's *very* close to the source, then Boulder's suggestion above is the right way to go about it. Although his MatchPreset choice is very high and will slow it down - I would usually leave that out and set an explicit Preset for clarity:
QTGMC(Preset="Slower",SourceMatch=2,Lossless=2,EZKeepGrain=0.5,Sharpness=0.1)
SourceMatch specifically tries to make the deinterlace as "lossless" as possible without introducing shimmer. EZKeepGrain helps preserve the noise from the original. These are not default settings because I think most people want the slight denoise/enhance. Also these settings are slower - you can speed up the Preset a little without any major loss. I would strongly suggest an MT setup (see the first post).

__

On a related note, there was a flurry of activity a couple of days ago when the MSU Deinterlacer v2.0 was released (http://forum.doom9.org/showthread.php?t=164220). They released it with a "paper" that "showed" their deinterlacer beat all the competition (including QTGMC) on PSNR and SSIM tests (I use the word "paper" loosely - results without critical points of methodology such as settings). Those metrics alone are a very poor measure of deinterlacing quality as Didée demonstrated (http://forum.doom9.org/showpost.php?p=1560767&postcount=12) - their deinterlacer fails terribly on real world samples.

However, I mention this here because the SourceMatch/EZKeepGrain settings above greatly increase the performance of QTGMC on such metrics, without any significant ill-effects except performance. Some quick testing with the line above puts QTGMC in line with MSU v2.0 on SSIM, but without all the nasty visual problems of MSU.

zerowalker
27th February 2012, 20:05
Anyone here know how to Blur every Two chroma line.
Like This: MergeChroma(last, SeparateFields(last).BilinearResize(width,height/4).BilinearResize(width,height/2).Weave())

But by using Kernel, not some resizing.

Why i asked here is that it´s well known Deinterlacing thread and i thought, maybe someone knew something about this.

Sorry for wasting your time for this, it´s about Solving the PAL Hanover Bars.

Gavino
27th February 2012, 20:44
Anyone here know how to Blur every Two chroma line.
Like This: MergeChroma(last, SeparateFields(last).BilinearResize(width,height/4).BilinearResize(width,height/2).Weave())
But by using Kernel, not some resizing.
Nothing to do with QTGMC, but the answer to your question is:
MergeChroma(SeparateFields().Blur(0,1).Weave())

kolak
27th February 2012, 21:45
Some quick testing with the line above puts QTGMC in line with MSU v2.0 on SSIM, but without all the nasty visual problems of MSU.

MSU is not that good at all on real content- no near QTGMC- don't care about their PSNR graphs, looks like they are meaningless.

zerowalker
27th February 2012, 22:47
Thanks:)!
Sorry to bother you about it;O!

But, know for a question about up to date 64 bit, is it still the NEDDI or what it´s called that is the only problem on 64 bit front?
If so why can´t it be compiled to 64 bit, isn´t it pretty easy to just make an easy convertion?

(not a programmer so just stating what i think)

EDIT: The thing you showed Gavino isn´t using Kernel as i wanted, thanks anyway;D

canuckerfan
4th March 2012, 19:44
I'm messing around with some IVTC technique and when I try this:
deint=QTGMC(Preset="Slow",EdiMode="nnedi3(field=1,qual=2)").selecteven()
tfm(mode=3,order=1,clip2=deint,slow=2)
tdecimate()
It seems to playback almost in realtime. But I know QTGMC is a slow filter, so it I think it's not being used. Can QTGMC even be used like this?

-Vit-
4th March 2012, 21:06
From the docs:
EdiMode (string) : Interpolation method, from "NNEDI3", "NNEDI2", "NNEDI", "EEDI3+NNEDI3", "EEDI3", "EEDI2", "Yadif", "TDeint" or "RepYadif", anything else uses "Bob"
Your EdiMode setting is not recognized so it uses "Bob", which will be fast.

However, what you're trying to do wouldn't make sense for QTGMC anyway. EdiMode is used to create a first attempt at a bob, which is then deshimmered (and slightly super-resolutioned) by the remainder of the algorithm. All the EdiModes output double rate. A single rate EdiMode like NNEDI3(field=1) wouldn't have shimmer because all the frames would are derived from the same fields (top or bottom). That would make the remainder of QTGMC rather redundant - you'd get some temporal processing, but of what use I dunno. I.e. Even if QTGMC supported this it may be little different than NNEDI3(field=1) on its own.

canuckerfan
4th March 2012, 21:23
From the docs:

Your EdiMode setting is not recognized so it uses "Bob", which will be fast.

However, what you're trying to do wouldn't make sense for QTGMC anyway. EdiMode is used to create a first attempt at a bob, which is then deshimmered (and slightly super-resolutioned) by the remainder of the algorithm. All the EdiModes output double rate. A single rate EdiMode like NNEDI3(field=1) wouldn't have shimmer because all the frames would are derived from the same fields (top or bottom). That would make the remainder of QTGMC rather redundant - you'd get some temporal processing, but of what use I dunno. I.e. Even if QTGMC supported this it may be little different than NNEDI3(field=1) on its own.

So it's safe to say QTGMC won't provide any additional benefits when used in conjunction with an IVTC?

Thranduilion
7th March 2012, 11:03
So it's safe to say QTGMC won't provide any additional benefits when used in conjunction with an IVTC?

Hi! I really like the results when I use QTGMC as my "replacement bobber" when using SmartDecimate (note: Be sure to read the accompanying help file for SmartDecimate since it functions differently from most other IVTCs). Using QTGMC as the bobber should improve your results.

My script:

LoadCPlugin("SmartDecimate.dll")
SourceFile("SourceFile")
b = QTGMC()
SmartDecimate(Bob=b)

I'm not sophisticated enough of a user to explain the technical aspects of why this script stands up to challenging telecined video, but it seems to. Plus, it holds up nicely under the scrutiny of a 52 inch plasma television (which usually highlights conversion flaws regarding deinterlacing and IVTC).

Hope that helps!
Alwyn

Didée
7th March 2012, 12:25
Due to the way of temporal preprocessing, the motion search engine of Q/TGMC is not valid for inherently progressive content.

eddmy1
16th March 2012, 10:15
Hi all,
i'm very new to this and would really appreciate some help with deinterlacing this video shot in 1080/60i using a shutter speed of 1/500s (or was it 1/250s).

The following script was used,
FFmpegSource2("DSC_0515.MOV",colorspace = "yv12", atrack=-1,threads=1)
AssumeTFF
QTGMC(Preset="Slow", FPSDivisor=2)

Here is the picture of the problem (somehow i can't seem to attach it as a file here), http://www.flickr.com/photos/eddielow/6986791299/

There are leftover lines especially at the wing, tail fin and nose. The video can be seen here, http://vimeo.com/38622320

i have tried a variety of settings but none worked

Thanks for any help or advise on this

Taurus
16th March 2012, 12:41
Without a short sample of the original clip there is not much hope
anybody can help you.
I'm using (Q)TGMC quite often, mainly TGMC because it has less knobs to fiddle ;):D
So post a link to a few seconds of the flyby and I will surely take a look.

TheSkiller
17th March 2012, 13:45
@eddmy1 This problem might be the same as this (http://forum.doom9.org/showthread.php?p=1412990#post1412990) one.

Maybe try if rep0=12 helps and see the suggestions by Didée.

Didée
17th March 2012, 19:07
Maybe that. And/or: lower "tr0" to "1" (default is 2 which is not necessarily a good thing), and set search=5,searchparam=6,DCT=5.

If that doesn't suffice, activate SourceMatch.

As mighty as QTGMC is, it has too much parameters, which is why everyone is merely relying on the presets ...

eddmy1
19th March 2012, 13:45
Many thanks for all the advise, i will check and try out some of those settings.

Have also uploaded the original video here which can be downloaded, http://vimeo.com/38761487

Taurus
19th March 2012, 20:48
Hmmh, I have to join Vimeo to download your 1080/60i mov sample.
But Vimeo seems to be down at login/signup..:mad::D
Will try again later.

eddmy1
23rd March 2012, 10:09
Hi All,
I have tried some of the settings suggested and there is some improvement. However those motion lines still appear in between frames 630 - 700


I am now using the following settings,
QTGMC(Preset="Slow", FPSDivisor=2, rep0=12, TR0=1, search=5,searchparam=6,DCT=5, SourceMatch=2, MatchPreset="Slow")

Maybe this is the best result possible.

TheSkiller
23rd March 2012, 14:14
Maybe you can still improve it somewhat by using one of the "Lossless" modes.

Try Lossless=2 (Lossless=1 might help more, but is more likely to leave some minor combing).

Taurus
23rd March 2012, 21:52
Hi All,
I have tried some of the settings suggested and there is some improvement. However those motion lines still appear in between frames 630 - 700


I am now using the following settings,
QTGMC(Preset="Slow", FPSDivisor=2, rep0=12, TR0=1, search=5,searchparam=6,DCT=5, SourceMatch=2, MatchPreset="Slow")

Maybe this is the best result possible.
I just found the time to fiddle around with your sample.
Using your script there are still some leftovers/artifacts at the wings of the aeroplane.
My simple approach is a little more blurry and jittery, but the artifacts are barely visible.
And it's whole lot faster :D
Here is the whole script I've used:
SetMemoryMax(800)
SetMTMode(3,4)
FFmpegSource2("Nikon V1 Mig-29 aerial display 1080 60i ori.mov",colorspace = "yv12", atrack=-1,threads=1)
AssumeTFF
Trim(600,760)
# QTGMC(Preset="Slow", FPSDivisor=2, rep0=12, TR0=1, search=5,searchparam=6,DCT=5, SourceMatch=2, MatchPreset="Slow")
# QTGMC(Preset="Slow", FPSDivisor=2)
SetMTMode(2)
TempGaussMC_beta2u(0,2,3,0,0,0,Edimode="NNEDI3",truemotion=true)
selecteven()
# Distributor()
Return(last)



Sure, there is much room for improvement, but my time is limited.
Maybe some more suggestions from the "in the know".
As you can see, I'm using TGMC not QTGMC.
But the settings should be transferable.
Hope this helps...
P.,S.: I could upload a small sample if needed.
But my internet connection is so da... slow.
Mostly I avoid this.

eddmy1
26th March 2012, 03:33
Hi All,
Thank you so much! for all the help and advise, i think i'm quite happy with the last conversion as the motion artifacts are only noticeable (barely) at certain frames.

I'm going to try convert the other videos from the event, will post updates if any further feedback.

D-Dave
27th March 2012, 04:58
After failing for countless hours in my attempts to get QTGMC and Avisynth to deinterlace my HD videos, I am in need of some help. QTGMC works marvelous with my DV tapes, however, when I try to deinterlace HDV material everything hits the fan. An overview of my setup: an i7 920 processor clocked at 4.2 GHz, 6 GB of DDR3 Cosair RAM (clocked at 1203 MHz with 7-7-7-24 1N timings), P6T Deluxe V2 motherboard, and two GTX 275 for my GPUs. I’m running Windows 7 Home Premium 64-bit edition and currently have Avisynth 2.6 MT (32-bit) by SET and Avisynth 2.5.8 MT (64-bit) by SET [compiled by JoshyD]. The program I have been working in has been VirtualDub (both 32-bit and 64-bit editions of versions 1.9.11 and 1.10.1).

I have typically used the 64-bit version of Avisynth for my HD footage since the 32-bit version either crashes on me (due to mostly memory violations or “KernalBase”) or is horribly slow (1-2 frames a second on Slow preset). It seems as though the 32-bit version is memory deprived, however, everytime I set a SetMaxMemory that allows me to render at decent speeds, I receive crashes. The current problem I am having with the 64-bit version is that the output file runs at roughly ¼ of the video’s real time speed. The output file is encoded in Lagarith, with a bitrate of about 300 Mbps (or 38 MB/s), and saved on a RAID 0 composed of three hard drives that total over 300 MB/s in sequential speed. Taking a look at my CPU and hard drive usage while playing the video shows no signs of either component having difficulty running the file in real time yet it is having this speed issue.

The current script that I have been using is below (the file is in the NVIDIA folder since I have a boot drive that is separate from my RAID array):

SetMemoryMax(1800)
SetMTMode(3,8)
DirectShowSource("C:\NVIDIA\Deinterlace Test.m2t")
ConverttoYV12()
SetMTMode(2)
AssumeTFF()
Lanczos4Resize(1920,1080)
QTGMC("Slower", EdiThreads=1)
Distributor()

I’m aware that there are other alternatives to VirtualDub,however, in the past I have had problems getting a few of those programs to actually render my video with my scripts (for example, MeGUI). I am not against using these other programs, in fact I would gladly migrate away from VirtualDub if it might help with my stability, I just need a bit of guidance in finding and operating the program. Another thing, even though the first post mentions the ability to operate with YUY2 color space, however, everytime I attempt to remove the “ConverttoYV12()” line I get this message:

Avisynth open failure:
Script error: there is no function named “Interleaved2Planar”
(QTGMC-3.32.avsi, line 350)
(B:\Users\Dave\Documents\Deinterlace Test (x64).avs, line 7)

I have followed the directions in the first post which was to replace the mt_masktools26.dll with the mt_masktools25.dll, both version led to the same results.

If there is anything I didn’t mention that could help solve my problem(s), feel free to ask. I hope that someone out there can help me tackle this beast. I hope that someone out there can help me tackle this beast so that my HD footage can embrace the “miracles” bestowed by this wonderful deinterlacer.

Didée
27th March 2012, 09:10
Regarding 64bit Avisynth ... without debating the whole shebang over again, the bottom line is this: it is not stable. Period. Especially with complex scripts like Q/TGMC (including *MVTools*), *plus* multi-threading, you most definetly *will* get crashes.


For the workflow you're doing there, do it in 32bit.

An when your host application is VirtualDub, then do

N O T

include "distributor()" at the end of the script.
(For VfW-applications it gets automatically inserted anyway. If you then specify it manually, the distributor is getting distributor'ed, the number of spawned threads thereby gets manifolded, the ressources accordingly, and that's why+where it goes BOOM! for you.)

Oh, and your colorspace conversion must be ConvertToYV12( interlaced=true) .
Better, use " pixel_type="YV12" " in the DSS call.
Even better, don't use DirectShowSource.

Weirdo
27th March 2012, 10:27
@D-Dave: To avoid crashes I'd suggest 32-bit only of course, and to not use MT plugin versions and AviSynth 2.6. Stick to 2.5 standard and just run multiple (4-5?) jobs at the same time. If it's a single file, split it. It's not the fastest method, but probably the safest. I've recently experienced crashes with QTGMC and switching to 2.5 / non-MT solved the problem.
For even better results (and slower speed) you can use the 10-bit version of x264, never had problems with it.

-Vit-
27th March 2012, 14:56
Yes, run in 32-bit. Not only is 64-bit very unstable, but there is a lack of plugin support - maybe why you can't get YUY2 to work.
Make sure you're following all these MT pre-requisites:

- Use SET's MT 2.6 (http://forum.doom9.org/showthread.php?t=148782) only
- Use the modded plugins from the pack in the first post. Although you can safely use cretindesalpe's more recent MVTools in dither tools (http://forum.doom9.org/showthread.php?p=1386559#post1386559) as well (good idea in fact)
- Use this tool (http://www.techpowerup.com/forums/showthread.php?t=112556) (or similar) to make your encoding application is "Large Address Aware" if it isn't already. Doing this will allow you to use a larger SetMemoryMax values safely
- Don't run too many threads or you'll run out of memory. Try a lower value if you hit problems.
- SetMemoryMax should increase by threads, although good values depend on your settings and source resolution
- Don't run excessive settings. IMO "Slower" is too much for HD. A good HQ preset for 1080i is ("Medium", SourceMatch=1), which is a lot faster than "Slower".
- Watch your OC. MT QTGMC is in many ways more demanding than Prime95. I have had multiple reports that lowering a seemingly stable, but actually over-ambitious OC has resolved issues.

Splitting into multiple single threaded processes as suggested by Weirdo works well if you are having problems, but won't be as fast and can be rather more manual. I usually do both, typically for 1080i I use 2-4 processes of 3-5 threads each.

~~~

Edit: On a different point, does anyone have an opinion on QTGMC using GScript throughout? Obviously that's one extra plugin required - but it will help me add more flexible functionality, break it down into modules, simplify settings, more robust validation/error messages etc.. I've started to make the changes and all is well, but interested in opinions / issues (Gavino?)

D-Dave
27th March 2012, 16:55
Alright, so I decided to uninstall and remove everything I had of Avisynth up to this point. From there I installed Avisynth 2.5.8 ST and added the pack of plugins included in the first post. I received an error with the RemoveGrain so I proceeded with the instructions in the fist post and replaced my RemoveGrainSSE2.dll with the one provided. I ran a script for the HD video through VirtualDub 1.9.11 32-bit without the Large Address Aware as I didn’t have any instability during my rendering. The results: video is still running at only ¼ of the original speed with no audio playback.

I made a few changes to my script such as using MPEG2Source instead of DirectShowSource, however, all my scripts resulted in a video that ran at ¼ the original speed.
I ran a script using DV material and the results were fine: video ran smoothly at full speed with audio syncing up nicely. Here are my two latest scripts that I have ran (first is HD, second is SD):
MPEG2Source("C:\NVIDIA\Deinterlace Test.d2v")
AssumeTFF()
Spline16Resize(1920,1080)
QTGMC (Preset="Slow", EdiThreads=1)

DirectShowSource("C:\NVIDIA\Standard Definition.avi")
ConvertToYV12(Interlaced=True)
AssumeTFF()
Spline16Resize(856,480)
QTGMC (Preset="Placebo", EdiThreads=1)

I am still using the lagarith codec for my output file for both videos, could that be the problem for the HD footage?
For even better results (and slower speed) you can use the 10-bit version of x264, never had problems with it.
I found this section on avisynth.org when looking for a 10-bit x264 encoder. I wasn’t sure what to use so I was hoping that someone could recommend me what I should use to encode in h.264. My primary goal is to keep the loss of quality from rerendering at a minimum so a lossless h.264 or another lossless codec would be preferred.

About running multiple jobs at the same time, I’ve tried to figure out how to do that (I remember that option most visible in MeGUI), but I haven’t been successful in setting that up. On topic of GUIs for Avisynth: would any of you suggest using something besides VirtualDub? I’ve been using VirtualDub because I haven’t had much luck with other alternatives. However, I’m up for trying anything so long as I can fix these issues of mine.

In concerns to instability from my overclock, I have just completed a stress test using LinX (10 runs using about 5 GB of RAM) and didn’t see temperatures any higher than 45C above ambient. I have ran the DIMMs a few days ago through multiple passes in Memtest86+ without any errors. I haven’t ran Prime95 recently but I will rerun that test. I will also test a lower overclock today to see if that fixes any problems.
Oh, and your colorspace conversion must be ConvertToYV12(interlaced=true) .
Yeah, somehow I forgot to reinsert that portion of the line when I typed that line back into the script (thanks for pointing that out).
Better, use " pixel_type="YV12" " in the DSS call.
Apologies for my ignorance, but I’m not sure how to implement that line into the script. I’ve attempted to place that line after “ConvertToYV12(interlaced=true)” as well as just by itself (removed the Convert line), but so far I haven’t figured out how to insert that line.
Even better, don't use DirectShowSource.
I’ve read that a lot from other forums. Do you have any suggestions for using a .m2t file with avisynth? I decided to try out DGDecode but I haven’t gotten any different results from using MPEG2Source over DirectShowSource.

TheSkiller
27th March 2012, 17:52
You don't need to worry about that anymore since you are now using MPEG2Source for your HDV source which is the way to go because it delivers the raw YV12 color space of your source without touching it. DirectShowSource is codec dependent and it seems you were getting YUY2 from it, so your HDV video's color space was upsampled to YUY2 and then you downsampled it back to YV12 in AviSynth.
pixel_type is a parameter of DirectShowSource.

Edit: Another possibility is FFVideoSource which doesn't require manual indexing.

Weirdo
27th March 2012, 18:05
About running multiple jobs at the same time, I’ve tried to figure out how to do that (I remember that option most visible in MeGUI), but I haven’t been successful in setting that up
Right-click on one or more queued jobs and send them to new Workers, or run instantly in temporary Workers. More here (http://mewiki.project357.com/wiki/MeGUI/Parallel_job_execution).

DiKey
28th March 2012, 11:15
Please, help.
I downloaded and copied to their places:
1.QTGMC v3.32 + English Instructions
2. Modded Plugins Package

And it says something about missing msvcr71.dll. I found it at "Intel drivers" and copied to plugins directory.
Then error disappeared, but now I have:
===================================================================
avs [error]: LoadPlugin: unable to load "C:\Program Files (x86)\AviSynth 2.5\plu
gins\SSE2Tools.dll"
(QTGMC-3.32.avsi, line 350)
(01bob.avs, line 2)
=========================================================
Then I downloaded and replaced with:
"Plugins Package" (non modded), but it did not help.


What am I do wrong?
Thank you.
P.S. My input is YUY2. But I do not know, how to use mt_masktools-25.dll... (For YUY2 input you must use mt_masktools-25.dll)
P.P.S. I decided to download - (SSE2Tools for YUY2 support (take only SSE2Tools.dll from this zip - do not take the SSE3 version nor the RemoveGrain or Repair dlls)) - but the link is broken.

kolak
28th March 2012, 12:49
- Use SET's MT 2.6 (http://forum.doom9.org/showthread.php?t=148782) only
- Use the modded plugins from the pack in the first post. Although you can safely use cretindesalpe's more recent MVTools in dither tools (http://forum.doom9.org/showthread.php?p=1386559#post1386559) as well (good idea in fact)
- Use this tool (http://www.techpowerup.com/forums/showthread.php?t=112556) (or similar) to make your encoding application is "Large Address Aware" if it isn't already. Doing this will allow you to use a larger SetMemoryMax values safely




Large Address Aware trick improves QTGMC usability a lot- at least for me.

Taurus
28th March 2012, 14:23
Please, help.
I downloaded and copied to their places:
1.QTGMC v3.32 + English Instructions
2. Modded Plugins Package

And it says something about missing msvcr71.dll. I found it at "Intel drivers" and copied to plugins directory.
Then error disappeared, but now I have:
===================================================================
avs [error]: LoadPlugin: unable to load "C:\Program Files (x86)\AviSynth 2.5\plu
gins\SSE2Tools.dll"
(QTGMC-3.32.avsi, line 350)
(01bob.avs, line 2)
=========================================================
Then I downloaded and replaced with:
"Plugins Package" (non modded), but it did not help.


What am I do wrong?
Thank you.
P.S. My input is YUY2. But I do not know, how to use mt_masktools-25.dll... (For YUY2 input you must use mt_masktools-25.dll)
P.P.S. I decided to download - (SSE2Tools for YUY2 support (take only SSE2Tools.dll from this zip - do not take the SSE3 version nor the RemoveGrain or Repair dlls)) - but the link is broken.
msvcr71.dll and MSVCP71.dll are part of the Microsoft Visual C++ Redistributable 2005 SP1 (or was it 2008:confused:)
I guess your on Win7. Copy the dll's to Windows/SysWOW64 folder if on Win7/64bit. Expecting you use 32bit applications.
Or to Windows/System32 if your on Win7/32bit.
For 64bit access you need different versions.

The link to removegrain is not broken. Just tried it.
And please read the instructions carefully on first page of this thread.
-Vit- explained everything very well.
Even your YUY2 problem.
And make sure there are no other plugins with same or similar names in your plugin dir or hell will come over you :devil: :p

DiKey
28th March 2012, 14:27
Now it works. But very slowly. One hour ago it did not.

DiKey
28th March 2012, 14:36
A add "ConverttoYV12(interlaced=true)" string, and now it works perfectly.

But I made a lot of tests and see, that 2 runs with equal parameters can give me 2 different coding times. From 4 to 7 fps. Why?

Cire i7-920, 24Gb RAM, Win7-x64

nhope
29th March 2012, 07:11
- Use this tool (http://www.techpowerup.com/forums/showthread.php?t=112556) (or similar) to make your encoding application is "Large Address Aware" if it isn't already. Doing this will allow you to use a larger SetMemoryMax values safely

Does anyone know if the latest MeGUI and Virtualdub are already "large address aware"?

Taurus
29th March 2012, 11:06
But I made a lot of tests and see, that 2 runs with equal parameters can give me 2 different coding times. From 4 to 7 fps. Why?

Cire i7-920, 24Gb RAM, Win7-x64
From the specs of your machine I assume you should get much higher fps.
If you get different fps values for the same script setup,
there is something slowing it down in the background..
Antivirus, updaters, power management, cpu throttle, disk access, etc...
Assuming you encode directly to x264.
And try Avisynth MT.
It's a whole lot faster.
See -Vit-'s suggestions on page one.
Simple sample script should look like this:

SetMemoryMax(800) # depends on how much memory and OS...
SetMTMode(3,*) * depends on available processors and stability
ffvideosource("your file here.mkv") # or mpeg2source, avisource, directshowsource, etc.
SetMTMode(2)
QTGMC() # your settings here
# Distributor() # only for some encoders needed, try it.
# return(last) # might help at some stability problems.



For SD script can be tweaked up.:p
For HD content down :(

DiKey
29th March 2012, 18:06
Thank you for your post. I have so low speed because of my 1440x1080@25i video is frameserving from Premiere CS5.5 to Avisynthm where it converting to YV12, then QTGMC to 1440x1080@50p, then bilinear downsampling to 1280x720@50p, then go to x264 and compressing to AVC.
Of course i useing MT Avisynth, else ot was TOOOO slow. :-) (about 3.8fps from 50fps of realtime = more then 13realtimes).
Now I have only 5 realtimes. It is very bad, but I cannot have more.
I tried to use Premier`s Mercury Cuda Accelerated 1440x1080@25i=>1280х720@50p converting with frameserving to x264. It was faster, then realtime, but it was ugly (blured)!

-Vit-
29th March 2012, 20:33
Does anyone know if the latest MeGUI and Virtualdub are already "large address aware"?
VirtualDub is not.
MeGUI does not do the encoding itself, so its status is unimportant, instead you need to consider which encoder is used. x264 is large address aware so if you encode direct to x264 you're OK. However, if you use a "pre-render job" I believe it uses FFMpeg, which is not large address aware. All the encoder executables are in the MeGUI\tools subfolder.

henryho_hk
30th March 2012, 00:20
then QTGMC to 1440x1080@50p, then bilinear downsampling to 1280x720@50p

If you are worrying about blurriness, why are you using bilinear resize?

I use:
degrainmedian(mode=2, interlaced=true)
qtgmc(preset="Fast", tr2=3, BlockSize=16, Overlap=4) # add edithreads=1, DftThreads=1 if doing multi-process encode
spline36resize(1280,720)

And 1440x1080 looks like a DV camera. Are you sure that it is 50p? It may be 50i or even 25p. We do not need QTGMC() for 50p or 25p. You should use eac3to to remux a motion clip as MKV and verify the video frames.

DiKey
30th March 2012, 07:07
because bilinear interpolation must be using for downsampling. Others for upsampling.
Bilinear for downsampling is better (i think so), and it is much faster.

Of course it is 50i (or 25i ?) and I am converting this video using QTGMC to 50p.

kolak
30th March 2012, 21:18
Does anyone know if the latest MeGUI and Virtualdub are already "large address aware"?

This tool made a big difference on my machine- now I can use most of the 6 cores i7 power in Vdub. Still quite slow for HD even with very fast presets :(

DiKey
30th March 2012, 22:01
I edited my previous post.

henryho_hk
31st March 2012, 04:14
Bilinear for downsampling is better (i think so), and it is much faster.

Yup, when the bitrate is tight.

Of course it is 50i (or 25i ?) and I am converting this video using QTGMC to 50p.

Great that your camera captures true 50i footage. My GX1 (digital camera) captures 1080 at 25p but flag it at a weird way to pretend as 50i, and the QTGMC() didn't work well.

TheSkiller
31st March 2012, 10:14
@henryho_hk If your camera captures 25p (no matter the flags) it is not interlaced and therefore there is no point in having it deinterlaced. That means QTGMC deinterlacing will do damage, as any kind of deinterlacing does on non-interlaced footage.

henryho_hk
31st March 2012, 13:01
@henryho_hk If your camera captures 25p (no matter the flags) it is not interlaced

If I load those m2ts files into ffvideosource, it will look something like interlaced or hybrid. I must demux it into .264 using tsMuxeR to get the progressive footage back.

hydra3333
1st April 2012, 02:37
Seeking suggestions. I have avisynth 2.5.7 (tsp's MT, want to keep its rock solid stability), a new i7-3820 4-core, 16Gb mem ... and this code.

SetMemoryMax(1024)
# ipp=true interlaced post-processing
# cpu=4 DEBLOCK_Y_H, DEBLOCK_Y_V, DEBLOCK_C_H, DEBLOCK_C_V
# cpu=6 DEBLOCK_Y_H, DEBLOCK_Y_V, DEBLOCK_C_H, DEBLOCK_C_V, DERING_Y, DERING_C
MPEG2Source("d2v-file-from-dgindex.d2v",info=0,ipp=true,cpu=6) # DEBLOCK and DERING
echo AssumeFPS(25)
echo AssumeTFF()
QTGMC(Preset="Slower",EdiThreads=2,Sharpness=1.2,SLMode=1) # result is double framerate progressive, so re-interlate it later
AssumeTFF()
Blur(0,0.5).SeparateFields().SelectEvery(4,0,3).Weave() #reinterlace - ASSUMED TFF HERE # BLUR(0,1) per http://forum.doom9.org/showthread.php?p=1488308#post1488308
X264.EXE --thread-input --profile high --level 4.1 --preset slow --interlaced --tff --no-cabac --bitrate 7000 --sar 16:11 --colormatrix bt470bg -o temp.mp4 avsinp.avs
Runs at circa 4fps. The main function is deblocking PAL 576i fast sports action on a very large grassed outdoor arena, blocking caused by poor 4Mbps broadcast mpeg2 bitrate when the broadcaster should be using up around 9Mb bitrate or more. A slight variation of the script is also used on PAL 1440x1080i, where the broadcaster also uses pitiful bitrates to make it almost unwatchable except for the ads :) QTGMC does a fantastic job ironing out the deblocked source and sharpening it a bit.

Is there any way to speed this up, eg changes to permit multithreading, more threads in QTGMC, etc without reducing any quality handling by QTGMC ?

nhope
1st April 2012, 05:36
I am using QTGMC and then MFlowFps to get 480-59.94p from PAL DV, for later reinterlacing for an NTSC DVD:

SetMemoryMax(1024)
SetMTMode(3, 6)
AviSource("d:\fs.avi") # Frameserved uncompressed RGB24 from PAL DV
AssumeBFF()
SetMTMode(2)
ConvertToYUY2(interlaced=true)
QTGMC( Preset="Slower", SubPel=2, EdiThreads=2, Sourcematch=3, Lossless=2 )
super = MSuper(levels=1, pel=2)
MFlowFps(super, QTGMC_bVec1, QTGMC_fVec1, num=60000, den=1001, blend=false)
Spline36Resize(720,480)
AssumeFPS(59.94)

It's working great most of the time but very occasionally the scene detection threshold is a little low and I get a couple of motion interpolated frames instead of a cut:

First clip
http://dl.dropbox.com/u/21489814/clip1.jpg
Second clip
http://dl.dropbox.com/u/21489814/clip2.jpg
Interpolated frame
http://dl.dropbox.com/u/21489814/transition.jpg

If I was just generating vectors with MAnalyze then it seems that I would be able to resolve this by tweaking thSCD1 and/or thSCD2. However since I'm re-using the vectors from QTGMC, it's not that simple.

Should I edit those threshold values within the QTGMC.avsi itself (lines 291 & 292)? If so, what values might be recommended wihout messing up the functionality?
Or should I create new vectors with MAnalyse?
Or should I just manually split the original footage at these occasional problem scene-changes?

-Vit-
1st April 2012, 11:21
nhope: Recent versions of QTGMC support the settings thSCD1 and thSCD2 directly

hydra3333: The first post explains about multi-threading, but you won't get stability with 2.57MT as it has many known bugs in the multi-threading. If you follow the instructions carefully it's very easy to get SEt's 2.6MT stable on SD and get a huge speed-up on that encoding speed. It's a bit trickier to MT HD because of the massive memory use of MT avisynth. If you don't want to change avisynth version then run several encoding processes simultaneously each processing a different chunk (how you do that is up to you). Another idea to try, especially for HD, is to encode to lossless in pass 1 (I like huffyuv for speed) then to x264 in pass 2. It uses huge amounts of disk space (100s GB per hour for HD).

Boulder
1st April 2012, 18:52
-Vit-,

are you planning to recompile "your" plugins with the changes regarding the new Avisynth 2.6 CVS commit?

-Vit-
1st April 2012, 21:33
-Vit-,

are you planning to recompile "your" plugins with the changes regarding the new Avisynth 2.6 CVS commit?
If the original plugin authors recompile then my modded versions will be unnecessary, since the changes make my fix redundant (I believe). However, as several of the plugin authors are no longer around, I will do something about it....

jfcarbel
2nd April 2012, 08:11
Looking to take some footage from Panasonic HD Camera that is 1080 60i and deinterlace it to 1080 30p. I would preferably like to edit in Vegas and then render to x264 if possible.

Anyone have done with same type video with this deinterlacer and can suggest a process?

noee
2nd April 2012, 12:35
Anyone have done with same type video with this deinterlacer and can suggest a process?

I can't get into the "editing" process I use, but, fwiw, I have a very simple setup for final encode with x264 that is quite reliable and delivers very consistent results. Here is an example I use for archiving for video that I don't need full 1080p or are of lower importance (source is from Canon 1080i60):

AVS script
SetMemoryMax(900)
SetMTMode(5,6)
AVCSource("C:\Temp\movie.dga")
ChangeFPS(last,last,true)
SetMTMode(2)
AssumeTFF()
spline64resize(1280,1080)
QTGMC(Preset="Super Fast", EdiThreads=6)
SelectEven()
spline64resize(1280,720)
Return last

You can guess how the source indexing is done...Of course, you can play with the options depending on your desired results.

x264 commandline (CRF example):
...\applications\x264\x264_32_10.exe --colormatrix bt709 --preset SuperFast --tune Film --crf 22 --aq-mode 3 --output "E:\Temp\output.h264" "E:\Temp\encode.avs"

I have an audio conversion step (FFMpeg), an indexing step and at the end, MKVMerge.

HTH.

henryho_hk
2nd April 2012, 15:08
Looking to take some footage from Panasonic HD Camera that is 1080 60i and deinterlace it to 1080 30p.

What is the model number of the camera?

jfcarbel
2nd April 2012, 16:59
What is the model number of the camera?

Panasonic HDC-SD800

-Vit-
2nd April 2012, 18:47
Here is a package of plugins for QTGMC using the latest Avisynth 2.6 interface (http://forum.doom9.org/showthread.php?p=1567792#post1567792). They may provide better multi-threading stability:
QTGMC 32-bit Plugins [Vit-2.6] (http://hotfile.com/dl/152000197/7dcecb4/QTGMC_32-bit_Plugins_Vit-2.6.zip.html) (mirror1 (https://rapidshare.com/files/3313295235/QTGMC_32-bit_Plugins_Vit-2.6.zip) | mirror2 (http://www.spirton.com/uploads/QTGMC/QTGMC%2032-bit%20Plugins%20%5BVit-2.6%5D.zip))
Thanks to SubJunk for the filehost-free mirror!

These plugins have been updated to the latest 2.6 interface:
- MVTools, MaskTools, NNEDI3, EEDI3, RemoveGrainSSE2, RepairSSE2, dfttest, FFT3DFilter, AddGrainC, VerticalCleanerSSE2, TDeint
The dlls are named as normal (for now).

These plugins are provided in their original form (not updated because they have no source code; or are legacy; or use the C interface).:
- Yadif, SSE2Tools, NNEDI2, EEDI2, NNEDI

The updated plugins will only work with versions of Avisynth 2.6 that support the new interface. Currently I believe that's only SEt's latest Avisynth 2.6MT build (http://forum.doom9.org/showthread.php?t=148782).
The new interface removes some code that was embedded in every plugin that could cause multi-threading problems. So these plugins may be more stable, although many multi-threading issues are memory-related these days. It's fine to use some updated plugins and some older ones. But the more new versions you get, the better for MT stability.

This package is provided for test purposes only, it's not "official" yet. Partly because these plugins are no longer "modded", they're just up to date, and I hope that some of the original authors will provide "official" builds eventually. Also there's a dll versioning problem now - we have 2.5 plugins, 2.6-old-interface plugins, modded versions of those, and 2.6-new-interface plugins. Added to that there are cretindesalpes' more recent versions of MVTools and dfttest...

In the longer term we need two just versions of each, a 2.5 compatible and a 2.6 new interface. I'm hoping cretindesalpes will provide 2.6 new interface versions resolving that issue. Then I'll provide just two packs, 2.5 & 2.6, and expect all MT users to switch to 2.6 and SEt's latest. I'm open to opinion about whether the different versions of the plugins should be renamed or not (as masktools does it). Seems to me there are potential problems either way. In any case I'm gonna wait a little before "officially" releasing these things...

Boulder
2nd April 2012, 18:51
Thanks, I'll update at least NNEDI3 and MaskTools to your versions as soon as my current encode is done. I'm quite sure cretindesalpes will update MVTools soon as he's been quite active.

markanini
3rd April 2012, 03:11
The updated 2.6 build and plugin pack seems to be a substantial improvement for me. I'm running lsfmod after smdegrain realtime in ffdshow on a i5-2500k at 3.2GHz on sub-SD material, before I couldn't do this smoothly.

nhope
3rd April 2012, 06:28
Here is a package of plugins for QTGMC using the latest Avisynth 2.6 interface...
Thanks very much for the updated plugins -Vit-! I see that you haven't included mt_masktools-25.dll in this package. With scripts such as this (http://forum.doom9.org/showthread.php?p=1567933#post1567933) that use YUY2, I have been using mt_masktools-25.dll from your previous modded plugins package. If I use mt_masktools-26.dll the script runs really slowly and then Virtualdub crashes after a while.

(I do realise I could be using YV12 in that particular script, but that's not the point)

Also, thanks for pointing out previously that thSCD1 and thSCD2 are supported directly in QTGMC. Actually I found that it is in the MFlowFps line that I need them. I got success by dropping thSCD1 to 352 and thSCD2 to 110 from their defaults of 400 and 130.

nhope
3rd April 2012, 06:29
Looking to take some footage from Panasonic HD Camera that is 1080 60i and deinterlace it to 1080 30p. I would preferably like to edit in Vegas and then render to x264 if possible.

Anyone have done with same type video with this deinterlacer and can suggest a process?

You could follow the workflow in my signature, which takes interlaced footage from the Vegas timeline right through to x264.

kolak
3rd April 2012, 09:53
Also, thanks for pointing out previously that thSCD1 and thSCD2 are supported directly in QTGMC. Actually I found that it is in the MFlowFps line that I need them. I got success by dropping thSCD1 to 352 and thSCD2 to 110 from their defaults of 400 and 130.

Yes- I have similar experience from interframe- I think default values are to high.

SubJunk
3rd April 2012, 10:06
Yes- I have similar experience from interframe- I think default values are to high.The problem is that scene-change detection isn't something that any AviSynth tool (that I'm aware of) can do with good accuracy across many videos, including MVTools2. You can either have it so sensitive that it catches each scene-change but also detects action scenes as scene-changes, or you can make it insensitive so it doesn't detect many changes so it leaves high-action scenes alone.
The only way to get it perfect is to adjust the values per video or per set of scenes.
In InterFrame 1 it is less sensitive and in InterFrame 2 it is more sensitive. But of course, InterFrame 2 is just a beta and is not recommended for use yet. By the time it is ready for release it will have scene-change detection similar to version 1.

kolak
3rd April 2012, 11:46
The problem is that scene-change detection isn't something that any AviSynth tool (that I'm aware of) can do with good accuracy across many videos, including MVTools2. You can either have it so sensitive that it catches each scene-change but also detects action scenes as scene-changes, or you can make it insensitive so it doesn't detect many changes so it leaves high-action scenes alone.
The only way to get it perfect is to adjust the values per video or per set of scenes.
In InterFrame 1 it is less sensitive and in InterFrame 2 it is more sensitive. But of course, InterFrame 2 is just a beta and is not recommended for use yet. By the time it is ready for release it will have scene-change detection similar to version 1.

Hmm- funny enough- I have no problems with scene change detection in inteframe 2 :) Haven't used it that much, but up to now no problems.

-Vit-
3rd April 2012, 11:47
I see that you haven't included mt_masktools-25.dll in this package.
I did consider it, but it felt perverse to include a 2.5 plugin in a 2.6 pack (obviously it can't use the new interface). However, I expect you can still switch to the earlier modded masktools-2.5 for YUY2. The YUY2 pathway does present more plugin problems. It doesn't help that it relies on SSETools2 for which there isn't any source, which means it is probably not thread-safe (no mod, no 2.6 new interface version)

mp3dom
4th April 2012, 13:29
Uhmm, with latest AVS 2.6 MT version, and the above plugins, I'm getting a strange error.
"Access violation at 0x00003FA0 in fftw3.dll, attempting to write to 0x00000000".
QTGMC at line 467 (it's a FFT3DFilter call).
The fftw3 DLL is correctly placed in \System32.
The source is a 1080i60, YUY2 colorspace, Edimode as EEDI3+NNEDI3. Using YV12 doesn't change anything anyway (still the same error).
Any idea?
Thanks.

-Vit-
4th April 2012, 15:21
I regressed to an older version of fftw3.dll, the one that was originally expected to be used with fft3dfilter. Previously I just renamed the more recent libfftw3f-3.dll, but that really isn't appropriate.... But then again, maybe it is...

Try removing the fftw3.dll I just provided and copy/rename the libfftw3f-3.dll in its place. If that doesn't work, try the fftw3.dll from the modded plugins package in the first post. And please report back your results.

Anyone know the "correct" fftw3.dll to use with fft3dfilter?

Terka
4th April 2012, 15:58
Vit, do you plan update QTGMC with SVPflow?

mp3dom
4th April 2012, 16:16
Tried both ways, same error with little difference on the address:
"Access violation at 0x000C78B6, attempting to write to 0x00000078"

HolyWu
4th April 2012, 16:37
ftp://ftp.fftw.org/pub/fftw/fftw3win32mingw.zip works fine on my system.

Nevilne
4th April 2012, 16:37
I've always just kept both latest libfftw3f-3.dll and latest libfftw3f-3.dll renamed as fftw3.dll, seems to work with all my plugins.

mp3dom
4th April 2012, 16:54
I got it to work with SetMTMode(3) before QTGMC call. With SetMTMode(2) it throw that error.

-Vit-
4th April 2012, 20:00
mp3dom: Using SetMTMode(3) removes most of the benefit of multithreading. Can you call FFT3DFilter on its own successfully?

Terka: I am testing SVP+TGMC right now.

SubJunk
4th April 2012, 21:53
I am testing SVP+TGMC right now.For now I recommend using the SVP 3.0 libraries since the 3.1 libs seem to have a bug that affects output, or at least wait for a fix

-Vit-
4th April 2012, 22:24
For now I recommend using the SVP 3.0 libraries since the 3.1 libs seem to have a bug that affects output, or at least wait for a fix
I'm not using the entire SVP 3.x package, only the svpflow library. Only the latest version 1.0.2 contains SVConvert the function that allows use of SVP vectors for purposes other than frame interpolation (InterFrame/FlowFPS).

Also I should say, for those who are not so familiar with the SVP libraries, that there's no GPU reason to use SVP for (Q)TGMC or similar. The only GPU code in SVP is for rendering the final frames when doing frame interpolation. It's the updates to the motion analysis that interest me, the reworked version of MVTools, and whether it improves quality or speed. However, that part is all CPU code.

D-Dave
5th April 2012, 02:22
After reinstalling Windows 7, putting avisynth and its other components back together, as well as messing around with a dozen or so scripts, I successfully deinterlaced HD video (with both single-threading and multi-threading) and saved the results in a lossless format. With some additional work I managed to get my lossless file (using the lagarith codec) to be read by my other video editors as well as have the audio embedded AND in sync with the footage. My HD footage is also rid of that strange slowed playback.

Though I may have solved a big portion of my original problems, I am now faced with the dilemma of how I should go about setting up QTGMC. QTGMC has so many options that I can set and change, I tend to go overkill with my settings. For example, I tend to set my SD footage on “Placebo” or “Very Slow” to insure that I am not cutting corners with making the video look as good as it can (without attempting to go overboard with the settings, ironically). Like many others, I strive to get the best quality, but as others have responded, overkill or complicated setups add a large amount of extra time for little if any noteworthy improvements. So my question is: what are good scripts I could use that would yield the most noticeable and beneficial results but wouldn’t go overboard in encoding time for trivial quality improvements?

Could someone provide me with a foundation for my presets for a general type of situation? For example, how should I go about deinterlacing HD video captured in a low light situation and has a good amount of noise (as well as SD footage with the same situation)? What about situations where there is little noise because it was recorded outside with plenty of light? I’m not sure how deeply probed my question will be, but I’m hoping to find scripts that will generally provide great quality outputs for general situations (low noise vs. high noise footage, high motion [sports] vs. typical motion footage [but not static]).

jfcarbel
5th April 2012, 03:53
You could follow the workflow in my signature, which takes interlaced footage from the Vegas timeline right through to x264.

Thanks, I did actually run across you guide yesterday when googling and coming across it in a creativecow sony vegas users forum.

Your guide is the most detailed I have found - Thanks!.

After further looking into AVCHD spec, I realize I need to go to 720 60p as my target for Bluray acceptance.

I assume since my target is Bluray for my material and not the web, that a few things from the guide would be modified.

For example:
ColorYUV(levels="PC->TV")
- I assume this would be commented out since my target space is bluray to be rendered on an LCD.

Then there is the resolution. Since Bluray official spec does not support AVCHD in 1080 60p (AVCHD 1.0 spec), then I would resize to 720p and use (matrix="PC.709")

I assume your guide as is produces 30p and AVCHD spec calls for 59.94 progressive. So if I wanted 60p, then I would leave out FPSDivisor=2 in the deinterlace. Is that correct? Also the AVCHD spec shows progressive supported rate as 59.94, I assume when we see 60p that is just a misnomer from rounding up?

One thing from your guide that was confusing was this part:
"I am working with HDV 1080-60i, so I started with the HDV 1080-60i (1440x1080, 29.970 fps) template"

I not sure I understand, if source is 1080-60i, then wouldn't fps be 59.94 not 29.970? And in screen shot the deinterlace method is set, shouldn't this be disabled since AVISynth script is doing the deinterlace?

Then again my m2ts file from my Panny that was recorded in 1920x1080 60i shows fps as 29.970 in mediainfo, so I am confused as it is 60i not 30i

MediaInfo from HD Camcorder file for 60i:

Width : 1920 pixels
Height : 1080 pixels
Display aspect ratio : 16:9
Frame rate : 29.970 fps
Color space : YUV
Chroma subsampling : 4:2:0
Bit depth : 8 bits
Scan type : Interlaced
Scan order : Top Field First

Also I sometimes do 1080p, for that I would just remove all deinterlacing stuff and just resize to 720p:
remove QTGMC and remove AssumeTFF/BFF
then do:
ConvertToYV12(interlaced=false, matrix="PC.709")

Since target is Bluray then I would think a better CRF value for x264 should be used. I would think 16 would be a good choice. Do you have experience in CRF values for Bluray output?

nhope
5th April 2012, 09:18
After further looking into AVCHD spec, I realize I need to go to 720 60p as my target for Bluray acceptance.

Supported Blu-ray resolutions are shown here (http://en.wikipedia.org/wiki/Blu-ray_Disc#Video).


ColorYUV(levels="PC->TV")
- I assume this would be commented out since my target space is bluray to be rendered on an LCD.

You want to end up with studio levels (= "video" or "tv" levels, i.e. blacks at 16, whites at 235) for Blu-ray, exactly the same as you want to end up with studio levels for an H.264 file uploaded to the web. There are many variables at play here, and they include the camera's behaviour, your camera settings, your NLE's behaviour, the codecs used, whether you adjust luminance in your NLE, what you set as a value for "matrix" in your ConvertToYV12 line, whether you frameserve in RGB or YUY2, whether you set that ColorYUV line etc.. The best way to be sure you've ended up with the right levels is to put the rendered file back in you NLE and check levels on the video scopes.

I assume your guide as is produces 30p and AVCHD spec calls for 59.94 progressive. So if I wanted 60p, then I would leave out FPSDivisor=2 in the deinterlace. Is that correct?

Yes.

Also the AVCHD spec shows progressive supported rate as 59.94, I assume when we see 60p that is just a misnomer from rounding up?

"60p" is an abbreviation for 59.94p. Yes, this rounding thing is confusing since "30p" is also an abbreviation for 29.97p, but some cameras actually shoot true 30 fps, and some software gets it wrong too.

One thing from your guide that was confusing was this part:
"I am working with HDV 1080-60i, so I started with the HDV 1080-60i (1440x1080, 29.970 fps) template"

I not sure I understand, if source is 1080-60i, then wouldn't fps be 59.94 not 29.970?

I was quoting the exact name of the template in Vegas Pro. 29.97 is the FRAME rate. 59.94 is the number of FIELDS per second. In interlaced footage a frame is made up of 2 fields. Confusion is understandable, since some people like to quote frame rates and some like to quote field rates. In other words 30i and 60i can refer to the same thing.

And in screen shot the deinterlace method is set, shouldn't this be disabled since AVISynth script is doing the deinterlace?

No, that setting is ignored in this case. It's the "Field Order" field that is important. I recommend setting the deinterlace method to "interpolate fields" and leave it there forever (it's vitally important to have a deinterlace method set if you ever resize interlaced footage within Vegas).

Also I sometimes do 1080p, for that I would just remove all deinterlacing stuff and just resize to 720p:
remove QTGMC and remove AssumeTFF/BFF
then do:
ConvertToYV12(interlaced=false, matrix="PC.709")

You don't need to convert to anything if you're just resizing. Just a script like this should be all you need (I'm tending to use Spline36Resize rather than LanczosResize these days):

AviSource("d:\fs.avi")
Spline36Resize(1280,720)

Since target is Bluray then I would think a better CRF value for x264 should be used. I would think 16 would be a good choice. Do you have experience in CRF values for Bluray output?

Sorry, no. All I have ever done is put (re-wrapped) 1440x1080-60i HDV on Blu-ray with no recompression. You'll have to do some research into the max support bitrate and then test the crf value, or even specify a bitrate directly in the x264 settings. I think there are MeGUI presets for Blu-ray. This latter discussion should really be taken to the MeGUI support thread if you need more help as it's not QTGMC-related.

Having said all of that, it looks like your camera is actually shooting 1920x1080-29.97i (29.97 frames per second, 59.94 fields per second). That spec is supported by Blu-ray, so that's what you should put on Blu-ray without deinterlacing or resizing. If you're not color correcting or adding FX you may be able to put it directly on Blu-ray without any recompression if your authoring software is clever enough.

jfcarbel
5th April 2012, 09:54
Having said all of that, it looks like your camera is actually shooting 1920x1080-29.97i (29.97 frames per second, 59.94 fields per second). That spec is supported by Blu-ray, so that's what you should put on Blu-ray without deinterlacing or resizing. If you're not color correcting or adding FX you may be able to put it directly on Blu-ray without any recompression if your authoring software is clever enough.

Hmm, ok a bit confused here. As I understand it AVCHD (http://en.wikipedia.org/wiki/AVCHD) has its own specifications

From the AVCHD page it mentions - "Although AVCHD shares many format similarities with Blu-ray Disc, it is not part of the Blu-ray Disc specification."

But I think where AVCHD aligns with BD spec, as you say it should be compatible without any conversion. I'll just have to give it a try. For interlaced it should work, but for 60p that will have to be scaled down to 720 60p for Bluray disc support.

I will be using Vegas program to author the BD disc.

In some cases I will want to edit the video and cut out unwanted sections, thus in this case I would need to render and rencode with x264 and its probably best then that I deinterlace before reencode. Is that a correct assesment?

You don't need to convert to anything if you're just resizing.

I will also be editing, cutting out unwanted material and probably adding some minor transitions so I assume I will need to reencode as well as resize. Correct?

You want to end up with studio levels (= "video" or "tv" levels, i.e. blacks at 16, whites at 235) for Blu-ray, exactly the same as you want to end up with studio levels for an H.264 file uploaded to the web. There are many variables at play here, and they include the camera's behaviour, your camera settings, your NLE's behaviour, the codecs used, whether you adjust luminance in your NLE, what you set as a value for "matrix" in your ConvertToYV12 line, whether you frameserve in RGB or YUY2, whether you set that ColorYUV line etc..

I would mostly be following you guide and using Vegas, so I assume much of what you indicated in that guide would be correct process. I would not be touching luminance in NLE, based on HD video I would set the ConvertToYV12 to what you recommened in guide, I would be rendering from Vegas as RGB since this is what your guide suggests. I think that addresses most of the variables.

hydra3333
5th April 2012, 10:00
An when your host application is VirtualDub, then do
N O T
include "distributor()" at the end of the script.
(For VfW-applications it gets automatically inserted anyway. If you then specify it manually, the distributor is getting distributor'ed, the number of spawned threads thereby gets manifolded, the resources accordingly, and that's why+where it goes BOOM! for you.)Is inserting Distributor() safe when the program is avs2yuv or x264 32bit or x264 64bit ?

nhope
5th April 2012, 14:10
In some cases I will want to edit the video and cut out unwanted sections, thus in this case I would need to render and rencode with x264 and its probably best then that I deinterlace before reencode. Is that a correct assesment?...
...I will also be editing, cutting out unwanted material and probably adding some minor transitions so I assume I will need to reencode as well as resize. Correct?

To keep best quality I would try not to deinterlace or resize throughout the whole process, but you will need to re-encode.

I assume much of what you indicated in that guide would be correct process.

I hope so, but it's worth knowing what levels your camera shoots (http://www.sonycreativesoftware.com/forums/ShowMessage.asp?ForumID=4&MessageID=767830) so you can compensate for that if necessary.

jfcarbel
5th April 2012, 20:15
In regards to nhope guide:
I was quoting the exact name of the template in Vegas Pro. 29.97 is the FRAME rate. 59.94 is the number of FIELDS per second. In interlaced footage a frame is made up of 2 fields. Confusion is understandable, since some people like to quote frame rates and some like to quote field rates. In other words 30i and 60i can refer to the same thing.


Ok, found this great article/guide (http://www.moviola.com/book/export/html/39).

With your explanation and this guide, it clears things up for me.

To simplify, when the video is expressed as progressive then the number is Frame Rate.

If its interlaced video then its up in the air as to which one is being used (frame vs field). It seems as you said in the case of camcorder manufacturer. they generally refer to it as field rate (example 60i), but the frame rate of that 60i is 29.97 and thusly represented as such when looking at mediainfo for the interlaced clip.

The Bluray spec supports 1920x1080 60i (29.97 fps) while AVCHD spec does not. But this is easily solved by mastering the content to Bluray rather than an AVCHD BD disc.

However, 1080 60p is not supported by either Bluray spec or the AVCHD 1.0 spec. Bluray supports only 24p in 1080 and supports 60p in 720. So resizing is neccessary for Bluray compliance.

What is confusing to me is why HD Camcorder manufacturers would even bother offering interlaced recording modes when all modern digital displays are natively progressive and can not display interlaced. What is the reasoning behind offering interlaced recording on HD Camcorders?

jfcarbel
5th April 2012, 20:38
To keep best quality I would try not to deinterlace or resize throughout the whole process, but you will need to re-encode.

I am surprised you state this, I thought the whole point of deinterlacing was to provide a better quality smoother picture on a modern progressive display.

Or is the only reason to deinterlace is because of the neccessity to resize? That is, if resizing interlaced material then must deinterlace first.

So if keeping the original resolution then do not de-interlace. Correct?

To deinterlace or not?

Of course I have heard the argument from both sides. In one case someone states that the software deinterlacer of QTGMC will do much better then a TV deinterlacer. But then there is the camp that states that once you deinterlace you are altering the content and can never get it back and that TV deinterlace alogorithms will most likely improve as technology progresses so archive it the same as the source if possible.

I also have some projects in which I will be encoding DV video (YV12 from my codec) into H.264 and it was also suggested that in addition to deinterlace improving SD video quality before encode that QTGMC would also clean up some of the SD noise before the encoding and provide better PQ. So maybe for HD Camcorder video I only deinterlace when neccessary but deinterlace for SD video coming from older (8-9 yrs old) MiniDV 8mm tapes.

Anyone else have comments or thoughts on this?

Guest
5th April 2012, 21:46
Anybody have an alternate download link for the Plugins Package in the first post? Mediafire keeps failing the download for me. Thank you.

Groucho2004
5th April 2012, 22:37
Is inserting Distributor() safe when the program is avs2yuv or x264 32bit or x264 64bit ?
x264 inserts Distributor() automatically.

-Vit-
6th April 2012, 01:43
Anybody have an alternate download link for the Plugins Package in the first post? Mediafire keeps failing the download for me. Thank you.
I've added hotfile mirrors to all the main downloads on the first post. Mediafire has also been giving me trouble recently.

Guest
6th April 2012, 03:35
Thanks -Vit-! I've been meaning for some time to test drive your tool. I've heard a lot of great things about it and if it lives up to its billing I'm hoping it will improve some of my slo-mo swimming vids via high-quality bobbing.

nhope
6th April 2012, 13:15
I am surprised you state this, I thought the whole point of deinterlacing was to provide a better quality smoother picture on a modern progressive display.

I was going by a "less is more" approach, and based on my experience of how smooth and clear my 1080i HDV looks when played back when viewed via Blu-ray/Playstation on a big Sony LCD display, and direct from camera to a projector.

It certainly seems to me that downsizing to 720 just so you can get a Blu-ray-compatible progressive stream is an inferior approach to letting the playback hardware do its thing with a 1080i stream.

I will be encoding DV video (YV12 from my codec) into H.264 and it was also suggested that in addition to deinterlace improving SD video quality before encode that QTGMC would also clean up some of the SD noise before the encoding

I have recently been transcoding a lot of PAL DV to NTSC via QTGMC and I have found that it does significantly decrease noise, even without specifying denoising in the QTGMC options.

jfcarbel
6th April 2012, 17:23
It certainly seems to me that downsizing to 720 just so you can get a Blu-ray-compatible progressive stream is an inferior approach to letting the playback hardware do its thing with a 1080i stream.


Yopur right, and I was originally looking at AVCHD spec, but that spec was only really created so that consumers would have a lower bitrate HD stream that could be writted to a DVD using Bluray structure (BD-5/9)

But I changed course after you made a light bulb go off in my head and that is there is no reason I can't just author a standard Bluray and avoid AVCHD format on Bluray.

So I will not be resizing the interlaced 1080 60i and leave as 1080. But I will need to resize the 1080 60p since that is not on Bluray spec, but then there is no deinterlace involved for that.

-Vit-
6th April 2012, 17:43
Thanks -Vit-! I've been meaning for some time to test drive your tool. I've heard a lot of great things about it and if it lives up to its billing I'm hoping it will improve some of my slo-mo swimming vids via high-quality bobbing.
Really you should thank Didée, it's his work originally.
____

SubJunk has now kindly hosted all the main QTGMC files, so there are now more mirrors on the first post.
It's particularly useful at the moment given the ongoing filehosting problems.

Johnnyas
6th April 2012, 18:26
Hi, long time lurker here - first time poster. I'm having problems getting some home video smoothly rendered with QTGMC. It looks very good until I do any sideways panning, which ends up being a bit .. uh, not really sure how do describe it. It isn't really stuttering, but it isn't a very smooth pan either (it scrolls, then pauses a tiny bit). I've spent countless hours rendering after minor changes, but whatever I do - I end up getting either the same result, or a worse one. Hoping somebody more wizened than me could be bothered to lend a hand!

The camera I've shot the footage with, is a Sony HDR-SR12, file properties of the MTS source files in Sony Vegas shows:
Type: MPEG-2 Transport Stream
Streams
Video: 00:01:07,600, 25,000 fps interlaced, 1920x1080x12, AVC

I render these out from Sony Vegas with Lagarith, 25fps, upper field first,
from a project set to 25 fps, UFF, 32 bit floating point (full range) pixel format, best rendering quality and deinterlace method set to none

I use this AVS script:
AVISource("F:\DigiVidCam\20101205-20101212-Tenerife\render\ForDoom9\test.avi", audio=false).AssumeFPS(25,1)
AssumeTFF()
QTGMC( Preset="Very Slow" )

with this x264 configuration:
Const. quality 20, default tuning, high AVC profile, unrestricted/autogess AVC level, default target playback device, with the Very Slow preset

I rendered a short clip from this, which can be downloaded from here (4,3 MB):
magnet:?xt=urn:btih:5B7EC313B1C27B04A5E9B14EDC9E693BBDD4FB92&dn=test.mkv&tr=udp%3a//tracker.openbittorrent.com%3a80/announce
It's not too bad, but not really smooth either.

The Lagarith source is here (121 MB):
magnet:?xt=urn:btih:9BA4627588689B3CDE0CD7677711C963EC0F6F41&dn=test.avi&tr=udp%3a//tracker.openbittorrent.com%3a80/announce


I've tried to render it to different formats, but I'm stuck with the same motion. At this point, I'm not really sure if it's the equipment,
if it's shaky cam or if it's really just deinterlacing problems. Hope somebody can hint me in the right direction if it's the latter! I'm sooo tired dealing with deinterlacing, that I'm gonna get a new cam (perhaps Sony HDR-CX260V), but I've got a load of footage that I haven't rendered out yet - and some footage I have rendered but I'm not completely satisfied with it.

Didée
6th April 2012, 19:06
The Lagarith AVI has damaged chroma channels. Chroma is blended between the interlaced fields.

Completely without QTGMC, try a simple

avisource("test.avi")
assumetff()
bob()

and see that it's broken to start with.

I have no idea how to set it up in Vegas, but in any case, THIS way was wrong.

Johnnyas
7th April 2012, 00:04
Ugh, I've tried rendering as huffyuv too. Not sure if it helps on the damaged chroma channels, but either way - the end result seems to be the same. In Vegas, I set up the project as I read somewhere it was supposed to be set up with this cam. If I try to set up the project by reading a video file when I start a new project (match media settings) - the settings chosen by Vegas are the same, so I guess those are correct(ish..).

Don't really know what to try next, though I'm guessing I'll be doing a moderate amount of swearing whilst doing it.

edit:
Do you mind checking out one of the source files? It hasn't been through Vegas, just copied to my pc. It's 23MB large, would be nice to know if the file was damaged from the start or not.
magnet:?xt=urn:btih:C30FC920391CC8101554A2E6A8C2931BF23106CD&dn=Test2-source.MTS&tr=udp%3a//tracker.openbittorrent.com%3a80/announce

Didée
7th April 2012, 01:21
Regarding the 1st sample: putting the croma issue aside, the result video *is* smooth in motion. Well, basically. Two contra points:

a) It's a 50fps video. When you watch it on a standard PC display set @60Hz, then every 5th frame gets doubled during playback (to fit 50 pictures/second into 60 pictures/second), hence there is a 60/10 = "6 Hz judder" in the playback. Set the display to 50Hz refresh rate to avoid this.

b) the camera pan is not perfectly smooth to start with ... handheld camera, varying muscle tonus, motion-boundaries in the hinges ... you're human, not a machine.


(Edit)
In any case, there is no particular problem regarding QTGMC. It would be good practice to sort this out in a new thread, since it's off-topic for this one. ;)

Johnnyas
7th April 2012, 10:56
I'm flabbergasted! Tried adjusting my display to 50 hz, and it IS smooth! Well, apart from the shakycam. Glad I took the time to set up QTGMC to fix what I thought was a problem with the deinterlacing though, because the result was definately better than what I had before.

Thanks for the help, and to everybody who's been working on QTGMC, really nice work.

(.. and sorry for posting what turned out to be a non-QTGMC issue in this thread)

hydra3333
8th April 2012, 12:01
Is inserting Distributor() safe when the program is avs2yuv or x264 32bit or x264 64bit ?
x264 inserts Distributor() automatically.

So does avs2yuv by the looks. Can someone confirm ?

Lenchik
8th April 2012, 13:03
avs2yuv inserts Distributor() automatically.
avs2pipemod doesn't insert Distributor() automatically.

Groucho2004
8th April 2012, 18:13
avs2yuv inserts Distributor() automatically.
No it doesn't. At least not a binary build with the unaltered source code from Loren Merrit.

avs2pipemod doesn't insert Distributor() automatically.
Yes it does, if compiled with "MT support".

Lenchik
9th April 2012, 04:26
:) So, right answer was "depends on compile" i suppose.

As to avs2pipemod, build from http://forum.doom9.org/showthread.php?p=1565165#post1565165 (i don't know if it is compiled with MT support) increases speed greatly after inserting Distributor().

hydra3333
9th April 2012, 08:48
No it doesn't. At least not a binary build with the unaltered source code from Loren Merrit.Oh Dear, must check where I got the avs2yuv binary from. It appears to generate "lots" of threads on a 4-core+4hyperthreading PC. Must try it with and without Distributor().

Groucho2004
9th April 2012, 10:03
To avoid confusion regarding the "Distributor()" call inserted anywhere in the encoding chain but the script:

I only looked at the source of the mentioned pipe programs to determine whether they insert the call or not.

avs2yuv does not contain the code to do this.

avs2pipemod does contain the code but it is conditional. If it is compiled with the "BLAME_THE_FLUFF" flag, the call will be inserted.

Usually, the encoder inserts the call (x264 and VirtualDub do) and it should not be necessary to do this anywhere else in the chain.

Gavino
9th April 2012, 10:09
Usually, the encoder inserts the call (x264 and VirtualDub do) and it should not be necessary to do this anywhere else in the chain.
To be accurate, it's not the encoder - it's Avisynth itself when invoked (by the encoder) via the VfW interface.

Groucho2004
9th April 2012, 10:14
To be accurate, it's not the encoder - it's Avisynth itself when invoked (by the encoder) via the VfW interface.

Correct. However, the code in x264 is using the native Avisynth API unless I'm missing something important.

Gavino
9th April 2012, 10:22
I believe you're right.
I should have said it's not necessarily the encoder - for example, I think VirtualDub uses the VfW interface, so doesn't call Distributor itself.

To summarise, the user needs to put Distributor() in the script if (and only if) using an Avisynth client that uses the API directly and is not MT-aware.

hydra3333
12th April 2012, 13:32
Hmm, does avs2yuv use the vfw interface or the api ?

Groucho2004
12th April 2012, 13:43
Hmm, does avs2yuv use the vfw interface or the api ?
It uses Avisynth through its native interface.

Weirdo
12th April 2012, 14:37
Quick question: to avoid the ultra-smooth doubled-rate motion, what's best to use, FPSDivisor=2 or SelectEven() ?

-Vit-
12th April 2012, 17:19
The only time you need FPSDivisor is when using the motion blur features so it can calculate the correct amount of blur to apply to the output. Otherwise it's exactly the same as SelectEven().

Johnnyas
13th April 2012, 18:15
Doing some dvd -> mkv/x264 conversions of some old family movies here, and I initially had problems with the end result being smooth, but every few seconds the picture jumped or froze.

The script I used was:
DirectShowSource("sourcefile.VOB", fps=25.000, audio=false, convertfps=true).AssumeFPS(25,1)
QTGMC( Preset="Very slow" )
ConvertToYV12()

After some testing, I found that changing the QTGMC preset to Fast, Medium or Slow removed the jumpy/frozen frames. I'm pretty sure I'll be happy with the Slow preset, though I'm interested in knowing what very slow does different than the other presets - that can lead to this result?

-Vit-
13th April 2012, 19:41
DirectShowSource causes these problems. Only use DirectShowSource as a last resort if nothing else will read your file. For a DVD VOB I would use DGMPGDecode (http://avisynth.org/mediawiki/DGMPGDec). Perhaps FFVideoSource will work too.

Johnnyas
14th April 2012, 13:22
Tried DGMPGDecode, and yeah - very slow turns out just fine. Thanks.

There's soo much I don't know about this stuff yet, it's kinda depressing!

cybersharky
18th April 2012, 15:41
I'm trying QTGMC for the first time, normally I'd use: tfm(order=0).tdecimate() on a ntsc dvd, how do I do that in QTGMC?

Boulder
18th April 2012, 15:46
You don't use QTGMC if your source only needs an IVTC.

mastrboy
18th April 2012, 16:00
you could use it for the combed frames with the following: tfm(order=0,slow=2,clip2=QTGMC()), unsure about the results though, i usually just use tfm(order=0,slow=2,clip2=nnedi3()) myself.

Chyrka
19th April 2012, 08:13
tfm(order=0,slow=2,clip2=QTGMC())
It's a bit incorrect.
The correct syntax is:
tfm(order=0,slow=2,clip2=QTGMC(FPSDivisor=2))

Amdh
19th April 2012, 12:08
Hi there,
Excuse me if my question seems stupid, but I'm wondering : Which sharpening filter is used by QTGMC to post-process the deinterlaced video ? And by the way, is it possible to use that sharpner without the deinterlacer ?

NB. I'm asking this because I'm actually trying the PureVideo built-in deinterlacer and it seems good for the speed it gives, but the only problem is that the video it generates is not as sharp as that generated by QTGMC.

Didée
19th April 2012, 13:36
The sharpening method is "temporal limited contra-sharpening". (Well, usually. You can opt to use a purely spatial variant, but that one is substantially "less good" in the given context.)

The method could be extracted into a stand-alone, that's perfectly possible. But it wouldn't make too much sense to use it in conjunction with another (fast) deinterlacer. For the given sharpening method, one full circle of motion-search and motion-compensation must be done via MVTools, plus the temporal limiting in itself.

Read: if you would have it as a stand-alone, then it would be rather slow. You would lose most of the "speed benefit" of PureVideo, the result would be similarly-slow as QTGMC is anyway.

On top of that, if you sharpen the PureVideo Deinterlacer in the same way as QTGMC does, then the ("per-pixel") deficits of PureVideo would become more pronounced.

Amdh
19th April 2012, 14:13
The sharpening method is "temporal limited contra-sharpening". (Well, usually. You can opt to use a purely spatial variant, but that one is substantially "less good" in the given context.)

The method could be extracted into a stand-alone, that's perfectly possible. But it wouldn't make too much sense to use it in conjunction with another (fast) deinterlacer. For the given sharpening method, one full circle of motion-search and motion-compensation must be done via MVTools, plus the temporal limiting in itself.

Read: if you would have it as a stand-alone, then it would be rather slow. You would loose most of the "speed benefit" of PureVideo, the result would be similarly-slow as QTGMC is anyway.

On top of that, if you sharpen the PureVideo Deinterlacer in the same way as QTGMC does, then the ("per-pixel") deficits of PureVideo would become more pronounced.

Thanks for the answer friend.

Skizzato
24th April 2012, 13:56
Please post a link for download x64 package for QTGMC.
Thanks!

-Vit-
24th April 2012, 15:03
Please post a link for download x64 package for QTGMC.
There isn't one. 64-bit avisynth is no longer active and has been left in an unstable state. If you can get it to work that's great, but you must find the plugins yourself.

nhope
25th April 2012, 04:57
There are links to some of 64-bit versions of the plugins here (http://www.bubblevision.com/underwater-video/Vegas-YouTube-Vimeo.htm#64bit). I haven't tried AviSynth in 64-bit myself though.

Skizzato
25th April 2012, 10:05
Thanks for the kind responses from -Vit- and nhope.
I have already installed Avisynth and MeGUI x64 with great difficulty.

yup
26th April 2012, 07:18
Hi All!
-Vit- I hope You help me.
How organize denoising clip using QTGMC?
sigma for fft3d and dfttest have different scale, especially for last version dfttest.
When I am using dfttest in my script i use value near 100 for my source (VHS Rip).
When I use inside QTGMC I see less removing noise.
My script for denoising
SetmtMode(3,4)
AVISource("tape1.avi").Trim(0,129057)
AssumeTFF()
GetChannel(1)
SetmtMode(2,4)
source=ConvertToYV12(interlaced=true).Crop(16,12,-16,-12)
bob=source.nnedi3(field=-2,threads=1).nnedi3_rpow2(2,nsize=4,cshift="Spline36Resize",fwidth=720,fheight=576,threads=1)
super = bob.MSuper(pel=2, sharp=1)
backward_vec2 = MAnalyse(super, isb = true, delta = 4, blksize=16, overlap=8, chroma=false)
backward_vec1 = MAnalyse(super, isb = true, delta = 2, blksize=16, overlap=8, chroma=false)
forward_vec1 = MAnalyse(super, isb = false, delta = 2, blksize=16, overlap=8, chroma=false)
forward_vec2 = MAnalyse(super, isb = false, delta = 4, blksize=16, overlap=8, chroma=false)
bc2 = bob.MCompensate(super, backward_vec2)
bc1 = bob.MCompensate(super, backward_vec1)
fc1 = bob.MCompensate(super, forward_vec1)
fc2 = bob.MCompensate(super, forward_vec2)
Interleave(bc2,bc1,bob,fc1,fc2)
dfttest(sigma=100.0,tbsize=5,sbsize=16,sosize=12,threads=1)
Edibob=SelectEvery(5,2)
Edibob.SeparateFields().SelectEvery(4,0,3).Weave().AssumeTFF()
DelayAudio(-0.04)
Can I get the same result for QTGMC output?
I am try by self but inside a lot of parameters.
yup.

-Vit-
26th April 2012, 13:42
QTGMC isn't supposed to be a replacement for custom denoising. I only added the feature because it was easy after adding noise bypass.
In any case it can't do such a large temporal radius. This is possibly the closest:

# EZDenoise = dfttest sigma / 4, or ffttest sigma unchanged
QTGMC(Preset="Whatever", EZDenoise=25.0, Denoiser="dfttest", ChromaNoise=true, DenoiseMC=true, NoiseTR=2)

yup
27th April 2012, 10:17
-Vit- :thanks:
Your suggestion work better than default setting.
Before I use only Slower setting and all will be O'k but this case indoor shooting with not enough lighting.
One more :thanks:
yup.

3rt4n
3rd May 2012, 22:44
-Vit- and Didée, can i ask you something?

I'm using qtmc, create the script but i getting this error;

SeparateFields: YV12 height must be multiple of 4
(QTMC-3.32.avsi,line 355)
(video.avs, line 27)

How can i fix this? Sorry my bad English. Thank you for any help.

Groucho2004
3rd May 2012, 23:16
How can i fix this?
Crop or resize your source so its height is divisible by 4.

Didée
4th May 2012, 00:55
or resize your source so its height is divisible by 4.
You advise to resize an interlaced source! :devil:

No problem, but to prevent hell breaking loose, let's also state how to resize properly in this case:

ww=width() hh=height()
pointresize(ww,hh+hh%8, 0,0,ww,hh+hh%8)

QTGMC(...)

crop(0,0,ww,hh)


(aka "padding")

3rt4n
4th May 2012, 07:13
ww=width() hh=height()
pointresize(ww,hh+hh%8, 0,0,ww,hh+hh%8)

QTGMC(...)

crop(0,0,ww,hh)


Didée, i tried this code:

.....
ww=1280 hh=694
pointresize(ww,hh+hh%8, 0,0,ww,hh+hh%8)
a= last
b=a.QTGMC("Slower", SourceMatch=2, Lossless=2, EZKeepGrain=1, Sharpness=1)
crop(0,0,1280,694)
.....

and it's work!!!

Thank you for support.

@Groucho2004 thank you for helpful answer.

Didée
4th May 2012, 07:48
That's not correct. Your video can't be 1280*720 (can it?), because that video size never should be interlaced. For other sizes, you don't get the right framing.

Use it like was posted.

XXXsource("...")

ww=width() hh=height()
pointresize(ww,hh+hh%8, 0,0,ww,hh+hh%8)
QTGMC("Slower", SourceMatch=2, Lossless=2, EZKeepGrain=1, Sharpness=1)
crop(0,0,ww,hh)

# If you need additional cropping a/o resizing, do it _below_this_line_

3rt4n
4th May 2012, 08:15
That's not correct. Your video can't be 1280*720 (can it?), because that video size never should be interlaced. For other sizes, you don't get the right framing.

Use it like was posted.

XXXsource("...")

ww=width() hh=height()
pointresize(ww,hh+hh%8, 0,0,ww,hh+hh%8)
QTGMC("Slower", SourceMatch=2, Lossless=2, EZKeepGrain=1, Sharpness=1)
crop(0,0,ww,hh)

# If you need additional cropping a/o resizing, do it _below_this_line_

Done. Thanks again.:thanks:

kolak
4th May 2012, 11:27
Why static titles flicker after QTGMC? This is white text on solid black background, not even text over video.
There is no motion- they should stay exactly as they are, but this is not the case- they "jump" between fields a bit.

-Vit-
6th May 2012, 13:18
That's quite hard to explain.

Short answer:
Try adding Rep1=4, Rep2=0 to your settings. This might fix your problem - it might rarely add a tiny bit of motion blur (hard to notice)

Long answer:
The core operation of TGMC is to blend 50% of the current frame with 25% each of the previous & next frames (motion-compensated). That removes all bob-shimmer and helps define the missing field lines. However, it also introduces motion-blur where the motion analysis is incorrect. So there is a repair step that only allows changes that affect thin horizontal areas - because bob-shimmer normally only affects thin horizontal areas. Occasionally there is shimmer that covers a wider area, especially on static detailed things such as text. That shimmer gets through because fixing shimmer in larger areas would potentially create motion blur elsewhere.

There are settings controlling the shimmer repair step: Rep0, Rep1 and Rep2. Rep0 improves the motion search clip only so that isn't so relevant here. Rep1 and Rep2 are alternative ways to repair the output, you set them to a value from 1 to 5 to control the repair strength (it's a bit more complicated but that's the basic idea). The higher you set the value the more shimmer is removed but with the possibility that some motion blur might creep through. Rep1 has a stronger effect than Rep2, but again might let more motion blur through. The defaults are Rep1=0, Rep2=4. I suggest you switch the 4 to the stronger Rep1 and see if that works.

You might wonder why TGMC doesn't just mask static areas and leave them untouched to avoid all this complexity. You can try it yourself:

qtgmc = QTGMC()
dw = DoubleWeave()
mask = mt_lutxy( dw, dw.SelectEvery(1,1), "x y - abs", U=1,V=1 ).mt_expand(U=1,V=1).mt_binarize(0, U=1,V=1)
mt_merge( dw, qtgmc, mask, luma=true )

That simple script leaves any pixel untouched if it and its 8 neighbors don't change over the nearby fields (could be made more robust by including chroma or more complex masking). It might fix your problem. However, any tiny change within your "static" text pixels, even a change by 1 luma then you'd need to add a threshold. You can change the 0 in the mt_binarize to 1 or 2 to allow slight dissimilarities. But that will start to cause problems in normal footage: occasional pixels will be identified as "static" and will be processed differently to their neighbors - artefacts would show up (in fact rare cases artefacts can show up even with the script as I've written it).

It's very easy to create discontinuities by naive masking during deinterlacing, different algorithms often don't match up perfectly. You see this in other deinterlacers: "this part is combed so do A, this part is not combed so do B". We see the discontinuity between A and B. Softened masks help but blur detail.

On a side note, the other problem with static detail in (Q)TGMC is that is loses too much vertical detail compared to other deinterlacers. Source match was specifically designed to greatly improve static detail. Sadly though it doesn't affect these minor shimmer issues.

Didée
6th May 2012, 13:47
Good explanation, Vit. ;)

The following idea is years-old, it took only someone to actually ask about shimmer ....

While QTGMC might not be perfectly stable on static features, it is at least fairly stable. With this background, shouldn't the TMM principle be applicable? Take result of QTGMC. Compare temporal variance to local vertical min/max. If temporal variance is smaller than, say, 10%~20% of local min/max, use weave.

kolak
7th May 2012, 22:00
Thanks Vit- I think I understand it at least in some sense :) I'm absolutely fine with "other scenes", so I can affect them if needed for a trade of not having this text issue.
I think it appears more on thin, sharp text- once font is bigger/bolder/blurred it's less likely to happen. I also use fast or very fast preset (HD source)- does this have effect on Rep settings?

I will try and report :)

kolak
8th May 2012, 11:10
Rep settings did not help.
Your script does help, but of course during fade to credits problem is still present :)
There is still small flickering happening in some cases (due this luma=0 probably), so I think best way is to process problematic frames separately.

-Vit-
8th May 2012, 15:45
On my test material, slightly higher Rep settings worked. Below is a minor tweak to QTGMC that allows Rep0, Rep1 and Rep2 to go up to 7. Try Rep2 or Rep1 = 6 or 7. Risk of blur elsewhere as described above. However, I found those effects inoffensive in my sample.

QTGMC-3.33 (http://hotfile.com/dl/155345913/58f6448/QTGMC-3.33.avsi.html")

There's a couple of other very minor tweaks in there that I never posted, including a fix for a Bob / TFF / BFF problem noted by ajp_anton some time back.

kolak
8th May 2012, 16:53
Rep6 seams to fix it, but not on fades.

-Vit-
8th May 2012, 17:14
It's possible that your fade is failing because the motion analysis is failing, in which case you would effectively get a NNEDI3 deinterlace, which will certainly shimmer. It's a long shot given that you just have static text over no background, but just in case you could try setting DCT=5, which is more robust to fades.

More likely it's just that larger areas are being affected by the TGMC algorithm due to the fade, so they're not getting through the repair step even at that higher setting.

kolak
8th May 2012, 17:19
It's white text on black background fade and I'm using fast preset.

-Vit-
8th May 2012, 17:27
I'm not sure why you're telling me that. Just try adding DCT=5 to the QTGMC settings. It will be slower, and I doubt it will work anyway, but might as well try it...

kolak
8th May 2012, 17:32
Just to be clear, so you don't miss something and waste your time :)
Will try DCT=5.

Taurus
8th May 2012, 17:35
@-Vit-
Please upload QTGMC-3.33 to another filehoster.
hotfile.com is giving me some strange messages:
Copyright infringement, blah, deleted by uploader, blah, already downloading, blah blah....
Thanks
Edit: changed the IP on my router and now it works...
Sorry for the hazzle.

SubJunk
10th May 2012, 00:42
QTGMC 3.33 direct link (http://www.spirton.com/uploads/QTGMC/QTGMC-3.33.avsi)

kolak
10th May 2012, 10:01
DCT=5 improved things quite a lot- there is only maybe 5% of the previous problems visible.

SubJunk
10th May 2012, 11:18
DCT=5 improved things quite a lot- there is only maybe 5% of the previous problems visible.Yep DCT=5 is essential for MVTools2, it stops the vectors from spazzing out at certain things, especially luma changes like flashlights, headlights, etc.

tormento
10th May 2012, 11:54
-Vit-, I have some confusion about "Modded Plugins Package" and "new plugin pack using the updated Avisynth 2.6 interface".

I have seen that some file dates are newer in the first, even if the 2.6 should be the latest pack you released.

If I use AviSynth 2.6 *AND* I do MT, which one should I use?

2nd question: is there any reason why some modded plugin versions are older than the newer "official" release? I.e. the AddGrainC you provide is 1.5.1 while the one I found somewhere is 1.6.1.

P.S: As I suggested in the "color banding" thread, LVVM has added CUDA support. Could be nice to see it implemented. ;)

Yanak
10th May 2012, 22:44
Hello to all,

I come on this forum often and read a lot of very good stuff that helped me a lot, but i'm a noobie when it comes to more complex things and this is my first post here asking for a little specialists help.

I have many footage that i record using Fraps in resolution 960x540 @ 60 FPS in normal mode, not the forced RGB one ( half size on a 1080p screen )

I'm trying to get a very good result while upscaling the videos to 720p but i would need some help especially for the noise and sharpen reduction while using QTGMC if possible, if any of you have suggestions for the best way to upscale from 960x540 to 720p please.

Actually the part of the script regarding the upscale looked like this :
spline64resize(1280,1080)
LoadPlugin("C:\Program Files (x86)\MeGUII\tools\avisynth_plugin\FFT3dGPU.dll")
LoadPlugin("C:\Program Files (x86)\MeGUII\tools\avisynth_plugin\gradfun2db.dll")
FFT3DGPU(sigma=1.25).gradfun2db
Import("C:\Program Files (x86)\AviSynth 2.5\plugins\QTGMC-3.32.avsi")
QTGMC( Preset="fast", FPSDivisor=2, EdiThreads=4 )
spline64resize(1280,720)
Recently i started to use the MT version of Avisynth, so FFT3DGPU is over, doesn't work with MT, i spent hours reading various things and trying but to be honest the more i read the more I'm lost :(

My script was probably wrong used like this but i found this way months ago after testing various things and for now that's was the best results i could get, some things are not very good so I'd like to use more options from QTGMC to get the best possible result using only QTGMC for the upscale and keep the maximum details in the videos.

I use Megui once my script is done to encode the video in x264 ( same here, still trying to find the best optimized settings/ profile for fraps videos, i search and read the more i can but i don't understand everything sadly )

I hope someone can help a little a noobie like me, like i said I read a lot of things here but i'm totally lost with all this now.

Thx guys.

-Vit-
10th May 2012, 23:45
kolak: Glad DCT=5 worked. Did you still need the higher Rep value or that extra script I posted to stabilize the sections outside the fade?
___

SubJunk: Thanks for the link. I agree DCT=5 can be useful when there are luma change problems, but I am less convinced in general - it can make some strange choices. I certainly wouldn't say it was essential for QTGMC.
___

cybersharky: I can't tell what your problem is without part of your source video.

___

Tormento: I reverted to an older (original) fftw3.dll because I had previously been using a renamed version the newer libfftw3f-3.dll instead, which is not appropriate given the interface/functionality may not be the same. The old version is used by fft3dfilter, the new one by dfttest. If you don't like using a file from 2004, then your can rename the newer one to copy over the older one - it seems safe enough, but if it makes your cat explode then it's not my problem.
I have been trying to use the latest "official" version of all the plugins. However, you're correct - someone did some new development on AddGrain and I forgot, I'll have a look. MVTools2 and dfttest are a small problem because they are now effectively maintained by cretindesalpes - and I'm not up to date with them. That's because I hope that cretindesalpes will create new-interface-2.6 versions - then I wouldn't have to compile my own versions at all. In any case, you can use either set of plugins, it's up to you. You can even mix them up safely on 2.6MT, for example to use cretindesalpes versions. I hope that we will be able to reduce this dll bloat soon. An official 2.6 beta with the new interface would help.

A new CUDA compiler will not help QTGMC because none of the plugins use CUDA.

___

Yanak: you question is quite general - in fact I'm not exactly sure what the focus of your question is. QTGMC is not a script for upscaling. There are better denoisers than QTGMC, and I don't know what you mean by "sharpen reduction". QTGMC is mainly for deinterlacing (is your footage even interlaced?).
I think you would be better to post a new thread, maybe even in the Newbies forum, because I don't think your answer is specifically to do with QTGMC.

Yanak
11th May 2012, 00:09
Thx for answering -Vit-

In fact i thought that using QTGMC could help having better results when we upscale with noise reduction, sharpen etc, but i guess i'm too noob to have understood correctly.

I will do like you suggested and try to find the newbies section of the forum and see if i can find something that suits my needs there.

Sorry for th dumb question and thanks for your quick answer.

yup
11th May 2012, 05:51
Yanak!
Try
SetmtMode(3,4)
AVISource("yoursorce.avi")
AssumeTFF()
SetmtMode(2,4)
Edibob=source.nnedi3(field=-2,threads=1).nnedi3_rpow2(2,nsize=4,cshift="Spline36Resize",fwidth=1280,fheight=720,threads=1)
Edibob.SeparateFields().SelectEvery(4,0,3).Weave().AssumeTFF()
QTGMC( Preset="fast", FPSDivisor=2, Ediext=Edibob,EdiThreads=1 )
Resizing before QTGMC give better result, but slower. If You use upsizing after QTGMC you can get shimmer. Nnedi3 also better for upsizing than spline.
Script work with Set 2.6 last build.
yup.

tormento
11th May 2012, 07:23
I hope that cretindesalpes will create new-interface-2.6 versions
I simply can't find out what the "new interface" is. I have googled a bit and find nowhere.
You can even mix them up safely on 2.6MT, for example to use cretindesalpes versions.
Are the optimizations included in the 2.6 plugin pack too?
A new CUDA compiler will not help QTGMC because none of the plugins use CUDA.
CUDA should be used even for egg cooking. JK. I thought there should be some speed improvements using it.

-Vit-
11th May 2012, 11:12
Here's the relevant post about the latest Avisynth 2.6 interface (http://forum.doom9.org/showthread.php?p=1567792#post1567792). The different versions of the plugins use the same optimizations.

Yanak
11th May 2012, 12:23
Yanak!
Try
...
Resizing before QTGMC give better result, but slower. If You use upsizing after QTGMC you can get shimmer. Nnedi3 also better for upsizing than spline.
Script work with Set 2.6 last build.
yup.

Thx Yup, i gave it a quick try but the result was not really good.
I will look more into the Nnedi3 and make more tests when i'll have some free time.

Thx a lot for the help guys, i will post in the appropriate threads if needed and not pollute more this one with my upscaling problems.

kolak
11th May 2012, 13:22
kolak: Glad DCT=5 worked. Did you still need the higher Rep value or that extra script I posted to stabilize the sections outside the fade?


Yes- rep=6 without extra script fixed issue outside fades (rep=5 still had it). This text is sharp, not very well rendered- it comes from FCP7, which is not that great.

Bloax
12th May 2012, 09:12
Talking about NNEDI3 upscaling, applying >nnedi3< (not nnedi3_rpow2) with (dh=true) once, TurnLeft(), and once again - while only working on luma. (u=false,v=false)

Then turning the video back (obviously), make a BilinearResize of the original video, then MergeChroma() using the color information from that new bilinearly resized video.

Goes faster than just making it upscale all three planes, without too much bad stuff happening AFAIR.

Boulder
15th May 2012, 16:18
Would the precleaning part of QTGMC possibly be usable in other applications than deinterlacing as well? I mean, is it generally good for cleaning the clip for motion analysis? It seems to make the edges to have a lot lower SAD at least when comparing its effect in MDegrain.

kolak
31st May 2012, 23:34
VIT- is there any development going on?
QTGMC runs more stable with 2.6MT (and 4GB Vdub patch), but still quite slow for HD source :(

-Vit-
1st June 2012, 13:07
Yes I have been working a few new features, but the only speed-up is the addition of the SVP motion analysis. The speed of QTGMC is directly connected to the speed of NNEDI3 and MVTools2. So speed comes from improvements in those filters, or using them less often/more simply. Presets are there for that second point. SVP hits the first point. I added SVP to TGMC here (http://forum.doom9.org/showthread.php?p=1568520#post1568520), that script is almost the same as QTGMC("Slower").

Of course the other way to speed up QTGMC is threading, and a major problem with HD is that we cannot run enough threads to use up the CPU before running out of memory. So HD is slow because your CPU is not working at capacity, not particularly because QTGMC is extra-slow at those resolutions. I have been using a multi-process + multi-threaded approach for a long time now and that is a good way to improve extreme HD processing speeds. However, the method to do that depends on your encoding process, e.g. batch files for command-line x264, or workers in MeGUI.

[Edit] Boulder: Only the first part of the QTGMC prefilter makes sense in the general case (the second part recovers some detail lost in the TGMC deshimmering step). But yes, it is a fairly useful general prefilter, a Gaussian blur with a little back-blend:

w = clip.Width()
h = clip.Height()
srchClip = clip.RemoveGrain(12,12).GaussResize(w,h, 0,0, w+0.0001,h+0.0001, p=2).MergeLuma(clip, 0.1)

kolak
1st June 2012, 14:11
Of course the other way to speed up QTGMC is threading, and a major problem with HD is that we cannot run enough threads to use up the CPU before running out of memory. So HD is slow because your CPU is not working at capacity, not particularly because QTGMC is extra-slow at those resolutions. I have been using a multi-process + multi-threaded approach for a long time now and that is a good way to improve extreme HD processing speeds. However, the method to do that depends on your encoding process, e.g. batch files for command-line x264, or workers in MeGUI.



I'm using 4 cores (more cores cause instability) of my i7 990X overclocked to 4Ghz and this gives 50-60% CPU usage, but even so I have 10fps on 50i HD source with very fast preset.
I don't do any encodes- it's coming from intermediate file and going to lossless file for further processing. QTGMC is the only process going on.

-Vit-
1st June 2012, 15:30
I'm using 4 cores (more cores cause instability) of my i7 990X overclocked to 4Ghz and this gives 50-60% CPU usage, but even so I have 10fps on 50i HD source with very fast preset.
Doesn't sound very good. A quick test here on an i7 930 OC@3.8Ghz : QTGMC("Very Fast", EdiThreads=1) =>1080p. I get 27fps with 11 threads, or 30fps with 3 processes x 4 threads (don't much need multi-process for these simple settings). 100% CPU. MemoryMax at 1500 or so. Encoding from dga to huffyuv (different target drive). Edit: Even if I run just 4 threads I get 20fps, single-threaded 7.75fps...

I came late to the deinterlacing party; I started out with TGMC, never used Yadif or TDeint for a real encode. So I'm tolerant to "slow" encoding. I think 30fps is a good speed for high quality HD deinterlacing.

kolak
1st June 2012, 19:07
Hmmm- if I could get 30fps for HD I would be happy :)

Don't see much difference, except number of cores and EdiThreads=1, which I don't have in my script. Will try to use it and increase number of cores.

Just to prove that HDDs are not bottleneck ( I have 8x HDDs in RAID 5 over Areca controller) I can downscale same file to SD at 200fps using MT.

Can it be due to not using tweaked plugins for avisynth 2.6MT?

Boulder
1st June 2012, 19:23
You could also try cretindesalpes's version of MVTools2 which is included in the Dither package. He has implemented internal multithreading in the functions, which could prove to be useful. It seems that now with avstp v1.01, there are no more lockups so be sure to download and install that one as well.

kolak
1st June 2012, 21:39
Thanks- will try.

zerowalker
3rd June 2012, 21:17
What are the best settings for QTGMC?
I don´t care if it goes like 5 fps, i just want to know the Highets Qualitys Settings overall.

It´s for VHS Tapes, PAL and quite noisy, but don´t want some super smooth settings, just want the best settings the QTGMC can offer, and then if i want to sharpen or smooth i can change those settings.

thanks:)

-Vit-
3rd June 2012, 21:50
Everyone's opinion about "best" is different. Every source has different "best" settings. Don't ask for "best", find out what's best for yourself.

This is one place to start if you don't care about speed:
QTGMC(Preset="Very Slow", SourceMatch=2, Lossless=2, EZKeepGrain=0.5, Sharpness=0.1, Sbb=0)

But that's for good quality footage that has fine detail, noisy VHS tapes probably aren't worth that kind of processing - but you asked...
You will likely want to change that EZKeepGrain value (increase it to keep more noise, decrease if you don't care about preserving noise. Change it to EZDenoise and increase the value if you want QTGMC to denoise for you.)

You'll need to run that multi-threaded or it could be very slow, depends on your machine. See the first post.

chainik_svp
3rd June 2012, 22:08
-Vit-
a major problem with HD is that we cannot run enough threads to use up the CPU before running out of memory

It was the first real problem we faced with SVP :) The current solution (modified Avisynth version) is good for SVP, may be it can be good for you too.
There're two mods in it:
1. distributor code is sometimes more effective (= needs less threads for the same processing speed for FRC)
2. sizes of internal caches between filters are limited by exact number of frames, not by global SetMemoryMax value and it's working great with linear video processing. For example one can use pel=4 with 1080p clip in MVTools with this mod.
So the total memory consumed depends on <number of filters>*<size of each cache>.

In case you're interested:
- global script value "svp_scheduler=true" turns on both mods, cache size is something like <num of threads>*2
- "svp_cache_fwd=<num_of_frames>" - set the exact cache size

And don't forget about "4gb patch" :)

zerowalker
3rd June 2012, 22:33
Everyone's opinion about "best" is different. Every source has different "best" settings. Don't ask for "best", find out what's best for yourself.

This is one place to start if you don't care about speed:
QTGMC(Preset="Very Slow", SourceMatch=2, Lossless=2, EZKeepGrain=0.5, Sharpness=0.1, Sbb=0)

But that's for good quality footage that has fine detail, noisy VHS tapes probably aren't worth that kind of processing - but you asked...
You will likely want to change that EZKeepGrain value (increase it to keep more noise, decrease if you don't care about preserving noise. Change it to EZDenoise and increase the value if you want QTGMC to denoise for you.)

You'll need to run that multi-threaded or it could be very slow, depends on your machine. See the first post.

Well i guessed so much, but you never know;)

Well i am currently trying

QTGMC(preset="placebo",SourceMatch=3, Lossless=2)

Not really sure about the sourcematch and lossless, but it seems to be placebo things, that is good, but maybe isn´t necessary, but better safe than sorry right?

But i think i need to learn about the Sharpness and keepgrain, as i pretty much go by the default there, as i don´t know if it´s over sharpening or denoising to much. It´s pretty delicate on noisy source as you may know.

yup
4th June 2012, 09:04
zerowalker!
try
SetmtMode(3,4)
AVISource("tape1.avi").Trim(0,129057)
AssumeTFF()
SetmtMode(2,4)
source=ConvertToYV12(interlaced=true).Crop(16,12,-16,-12)
bob=source.nnedi3(field=-2,threads=1)
super = bob.MSuper(pel=2, sharp=1)
backward_vec2 = MAnalyse(super, isb = true, delta = 4, blksize=16, overlap=8, chroma=false)
backward_vec1 = MAnalyse(super, isb = true, delta = 2, blksize=16, overlap=8, chroma=false)
forward_vec1 = MAnalyse(super, isb = false, delta = 2, blksize=16, overlap=8, chroma=false)
forward_vec2 = MAnalyse(super, isb = false, delta = 4, blksize=16, overlap=8, chroma=false)
bc2 = bob.MCompensate(super, backward_vec2)
bc1 = bob.MCompensate(super, backward_vec1)
fc1 = bob.MCompensate(super, forward_vec1)
fc2 = bob.MCompensate(super, forward_vec2)
Interleave(bc2,bc1,bob,fc1,fc2)
dfttest(sigma=100.0,tbsize=5,sbsize=16,sosize=12,threads=1)
Edibob=SelectEvery(5,2).nnedi3_rpow2(2,nsize=4,cshift="Spline36Resize",fwidth=720,fheight=576,threads=1)
Edibob.SeparateFields().SelectEvery(4,0,3).Weave().AssumeTFF()
QTGMC( Preset="fast", FPSDivisor=2, Ediext=Edibob,EdiThreads=1 )
Tune sigma, 100 good starting point. Script include work with borders.
-Vit-
This script better denoise than QTGMC. I remember Your suggestion, but for analog capture need external prefilter.
Also filtering on bobbed give better result than on fields.
Work slow 1.5-2 fps on Quad Core.
yup.

-Vit-
4th June 2012, 13:43
Also filtering on bobbed give better result than on fields.
Yes, I noticed that too - the QTGMC 3.33 (http://forum.doom9.org/showpost.php?p=1573657&postcount=1206) I posted earlier switched to denoising the bob.

But I don't work with analogue or noisy sources, so I'm not surprised that custom denoising works better than QTGMC denoising there.

___

chainik_svp: Thanks for that, I'll try it. I can work out the caching needs of QTGMC precisely, but people might use other filters as well as QTGMC. So it would be the user's responsibility to set the correct cache size, which is potentially a (support) problem.

ajp_anton
4th June 2012, 15:37
Is it possible to run this on YV16 and YV24?

I fixed nnedi3 by processing luma only, then upscale luma so that the YV16/24 looks like YV12 and process chroma only, and then join these. Is this OK?
But there's still something that breaks it. Or maybe I should just nnedi3 the chroma before QTGMC and merge it back after it...

-Vit-
4th June 2012, 17:32
Is it possible to run this on YV16 and YV24?
Convert YV16 to/from YUY2 (lossless) and QTGMC will process it natively. You need SSE2Tools and (from the first post): "For YUY2 input you must use mt_masktools-25.dll. Although not strictly 'correct' mt_masktools-25.dll can be used with SEt's Avisynth 2.6MT for multi-threaded usage."

I would guess you could force YV24 through there with various splitting and merging, but I've never tried it.

Boulder
4th June 2012, 17:37
-Vit-
a major problem with HD is that we cannot run enough threads to use up the CPU before running out of memory

It was the first real problem we faced with SVP :) The current solution (modified Avisynth version) is good for SVP, may be it can be good for you too.Can SetMTMode be used with your Avisynth build or is it natively multithreaded?

chainik_svp
4th June 2012, 18:56
It's the "official" 2.5.8 MT except rewritten distributor and modified CacheMT code.

Boulder
4th June 2012, 18:58
Ok, thanks :) I think I'll try it since I use the various MVTools2 stuff a lot (mostly QTGMC and a custom denoiser).

zerowalker
4th June 2012, 19:50
zerowalker!
try
SetmtMode(3,4)
AVISource("tape1.avi").Trim(0,129057)
AssumeTFF()
SetmtMode(2,4)
source=ConvertToYV12(interlaced=true).Crop(16,12,-16,-12)
bob=source.nnedi3(field=-2,threads=1)
super = bob.MSuper(pel=2, sharp=1)
backward_vec2 = MAnalyse(super, isb = true, delta = 4, blksize=16, overlap=8, chroma=false)
backward_vec1 = MAnalyse(super, isb = true, delta = 2, blksize=16, overlap=8, chroma=false)
forward_vec1 = MAnalyse(super, isb = false, delta = 2, blksize=16, overlap=8, chroma=false)
forward_vec2 = MAnalyse(super, isb = false, delta = 4, blksize=16, overlap=8, chroma=false)
bc2 = bob.MCompensate(super, backward_vec2)
bc1 = bob.MCompensate(super, backward_vec1)
fc1 = bob.MCompensate(super, forward_vec1)
fc2 = bob.MCompensate(super, forward_vec2)
Interleave(bc2,bc1,bob,fc1,fc2)
dfttest(sigma=100.0,tbsize=5,sbsize=16,sosize=12,threads=1)
Edibob=SelectEvery(5,2).nnedi3_rpow2(2,nsize=4,cshift="Spline36Resize",fwidth=720,fheight=576,threads=1)
Edibob.SeparateFields().SelectEvery(4,0,3).Weave().AssumeTFF()
QTGMC( Preset="fast", FPSDivisor=2, Ediext=Edibob,EdiThreads=1 )
Tune sigma, 100 good starting point. Script include work with borders.
-Vit-
This script better denoise than QTGMC. I remember Your suggestion, but for analog capture need external prefilter.
Also filtering on bobbed give better result than on fields.
Work slow 1.5-2 fps on Quad Core.
yup.

Is this considered for PAL?
As there is quite some difference in denoising and restoring PAL compared to NTSC (PAL is much worse sadly).

As you will first have to blur every other Chroma line, as PAL is "YV12" but in disguise as YUY2 (or something like that).

Cause if that´s considered, i will gladly try it out and compare it against the one i tried before (the lossless sourcematch thing).

EDIT:

needed to add

Mergechroma(SeparateFields().Blur(0,1).Weave())
ChromaShift(-2)

to make it more PAL friendly (ChromaShift depends on source etc i guess).

And it seems pretty neat, though 100 sigma was way to smudge looking for me, around 25 seems nice, but i would like to try to keep a bit more sharp edges if possible, as this does very good on the noise,
but it blurs a bit much on some details.

Noticed that my source is 50 fps, as it was much smoother without selecteven().
If i want to burn it on a DVD, can i just skip the QTGMC in the end, and use 50i flag on the mpeg2 file?

nhope
5th June 2012, 11:35
-Vit-, I have tracked the cause of this error (http://forum.doom9.org/showthread.php?p=1576774#post1576774) to the modified eedi3.dll from your plugin pack using the updated Avisynth 2.6 interface, linked to in the first post. I replaced it with the eedi3.dll from your previous modded plugins package and all seems OK. Note I am on Windows XP x64 SP2.

What really threw me in tracking down the error was that even when I had renamed that file to eedi3.dll-VIT-NEW-INTERFACE it still threw the error. I often rename old or alternative dll files by appending the file extension like that, and I had no idea that AviSynth would still somehow read them. I have many other ones renamed in a similar way that appear not to be causing any problems. Perhaps I should keep those sort of files in a different folder.

-Vit-
5th June 2012, 14:08
Always read the fine print... From the first post:
If you use EEDI3 you may need the Visual C++ 2010 Redistributable (http://www.microsoft.com/download/en/details.aspx?id=5555)
tritical uses the OpenMP library in EEDI3 (only). It creates a dependency (VCOMP100.dll) cannot be safely removed with static linking. Edit: The previous EEDI3 was tritical's original (I did not add the mod to that one), so it used VCOMP.dll from Visual Studio 2005. You already had that dll. I used Visual Studio 2010 to compile the 2.6 version and that needs the newer VCOMP100.dll

Gavino
5th June 2012, 14:26
What really threw me in tracking down the error was that even when I had renamed that file to eedi3.dll-VIT-NEW-INTERFACE it still threw the error. I often rename old or alternative dll files by appending the file extension like that, and I had no idea that AviSynth would still somehow read them.
Rename to something like eedi3.dll.VIT-NEW-INTERFACE (ie replace first '-' by '.').
See this post (http://forum.doom9.org/showthread.php?p=1320314#post1320314).

nhope
5th June 2012, 16:07
Thank you -Vit- and Gavino. During my troubleshooting, because of what Google turned up, I did actually install the Visual C++ 2010 Redistibutable. But as I'm on XP x64 I installed the x64 version, and it didn't help. I guess I need to install the x86 version you link to?

By the way, is there any reason you're holding the thread title and links in the initial post at 3.32 and not 3.33? It's easy to miss your 3.33 post, as I did until yesterday.

-Vit-
5th June 2012, 22:47
I guess I need to install the x86 version you link to?
Yup. Avisynth is 32-bit. Redistributables should match the application not the OS.

By the way, is there any reason you're holding the thread title and links in the initial post at 3.32 and not 3.33? It's easy to miss your 3.33 post, as I did until yesterday.
Just keeping everyone on their toes... No, I didn't really want to release 3.33 because I haven't tested it enough (who likes support queries?) and it doesn't add much. But it suited an earlier problem, so I let it out gently.

zerowalker
6th June 2012, 14:54
How can i disable everything in QTGMC except the part that makes shimmering alot smoother?
I am doing a 25 fps (50i) video by filtering with dfttest, then going to qtgmc for the anti shimmering and then reinterlacing.

I think the way sound pretty bad, so if i am doing something stupid here please tell me.
I need to keep it interlaced as DVD only support 50i so can´t keep the 50p qtgmc gives.

AzraelNewtype
9th June 2012, 08:18
How can i disable everything in QTGMC except the part that makes shimmering alot smoother?
I am doing a 25 fps (50i) video by filtering with dfttest, then going to qtgmc for the anti shimmering and then reinterlacing.

I think the way sound pretty bad, so if i am doing something stupid here please tell me.
I need to keep it interlaced as DVD only support 50i so can´t keep the 50p qtgmc gives.

This is an ill-thought out idea and will accomplish nothing. Just separate fields, filter, and then weave.

Boulder
9th June 2012, 08:41
Not that simple if you use temporal filters ;)

kolak
14th June 2012, 12:40
Found some issue- DTC=5 causes problems on scene changes- creates frames with mixed fields.
In the same time it helps a lot with flickering on static text.

-Vit-
14th June 2012, 18:57
May need to tweak thSCD1 (scene change detection setting, same as MVTools setting of same name) for different DCT settings.

kolak
15th June 2012, 12:16
That's what I thought :)

Mole
18th June 2012, 02:22
When using QTGMC(InputType=1), I kinda like the way it smooths out noise such as CCD noise.

What kind of denoiser is it using, and would I be able to use only that particular denoiser in order to get the same effect?

The source is of course progressive.

Betsy25
18th June 2012, 18:10
Although having followed the instructions, simply indexing the .VOB files in MeGUI produces the following error screen.:confused:
Win7 32bit, Avisynth 2.5

http://i.imgur.com/nvkkg.png

-Vit-
18th June 2012, 20:48
Mole: QTGMC uses denoisers as an integral part of the algorithm, not specifically to denoise, but it does have some denoising effect. It uses MDegrain/TemporalSmooth in three stages:
0. A binomially-weighted combination of TemporalSmooths to remove shimmer from the source for motion analysis - this denoise doesn't directly appear in the output.
1. Do the same again, but this time with motion-compensated MDegrains, to produce initial deshimmered output (and to get some super-resolution-like detail-borrowing from neighbor frames)
2. A single MDegrain at the end for a final calming

So it's not just a simple call to a denoiser as you might have thought, it's the core algorithm you need. When you set InputType=1 you switch off all the deinterlacing and you are left with that algorithm alone essentially. I guess there are a few tweaks:

You can can skip stage 0 if your source (progressive, InputType=1) has no shimmer by setting TR0=0 (and some other related settings):
QTGMC(InputType=1,TR0=0,Rep0=0,SrchClipPP=2)

There is some extra processing between stage 1 and 2 - resharpening/repair steps to reduce blur from the MDegrain. If you *really* want the MDegrain only, then:
QTGMC(InputType=1,TR0=0,Rep0=0,SrchClipPP=2, Sharpness=0, Sbb=0,Rep2=0)

You may not want that, it will lose a little detail. Maybe best just to tweak sharpness:
QTGMC(InputType=1,TR0=0,Rep0=0,SrchClipPP=2, Sharpness=0.2)

Source match is a rather strange, overkill setting for progressive but it's possible - will retain the most detail but will only impact the noise very slightly too. I don't exactly recommend it, but you could try it:
QTGMC(InputType=1,TR0=0,Rep0=0,SrchClipPP=2, SourceMatch=2) # Maybe add very low Sharpness too

___

Betsy25: If it's the indexing stage, then maybe it's nothing to do with QTGMC. That missing dll is from Visual Studio 2003, so it's an older app or plugin causing the problem. Not sure where you can get the dll, I don't think it's in any Microsoft redistributable. Could just search for a version, but be careful...

Some of the original versions of the plugins for QTGMC do rely on that dll. The Modded plugin pack from the first post removed the need for that dll from everything except SSE2Tools (for YUY2 input). Maybe try getting that pack first and see if it helps.

Mole
19th June 2012, 01:22
Thanks a bunch for the tips. I've been using QTGMC(InputType=1) with progressive source that are very very grainy such as from many BDs. I of course resize them to whatever resolution I need first (ideally I'd rather like to use it at 1080p, but it'd just be way to slow if I run neat afterwards), I then use QTGMC on it to get rid of the most nasty grains, then when I use Neat Video after, it looks quite good. It's then sufficient to use Neat with minimum settings. Usually on very grainy sources, I had to crank up Neat, but the problem would be that on not so noisy scenes, it would smooth out way too much details.

When using QTGMC(InputType=1) is the preset="whatever" relevant? Would for example QTGMC(InputType=1, preset="fast") speed up some?

-Vit-
19th June 2012, 01:57
When using QTGMC(InputType=1) is the preset="whatever" relevant? Would for example QTGMC(InputType=1, preset="fast") speed up some?
Yes, even in progressive mode the preset affects the quality of the motion estimation (which improves the quality of the MDegrain) and it increases the radius of the MDegrains (for a bit more smoothing). So faster presets will give some speed up, but they were not balanced for progressive input though (i.e. there may be little difference between some adjacent presets in terms of quality or speed). Try it and see as always...

Mole
22nd June 2012, 14:49
Excellent, I tried QTGMC(InputType=1,TR0=0,Rep0=0,SrchClipPP=2) and it's much faster than QTGMC(InputType=1) and I'm getting the same result on progressive source with no shimmer but heavy on CCD noise.
It manage to get rid of most nasty grains, such as in night scenes, which Neat Video would not get, so using QTGMC, then Neat afterwards does the trick.

lblais34
26th June 2012, 14:42
Hi,
I made several test with the following two scripts TempGaussMC_Beta2u and QTGMC.

For my tests I used :

I used a TFF interlaced video with a duration of two minutes compressed to Huffyuv 2.1.1.

I used MeGUI to convert my video to x264 (2 pass - bitrate 5000 - Preset Placebo - Level 5.1 AVC Level - High Profile AVC Profile).

I used the following AviSynth script for my tests:
AVISource("video", audio=false)
assumetff()
ConvertToYV12 (interlaced=true)
TempGaussMC_beta2u (edimode="nnedi3")
SelectEven()

and

AVISource("video",audio=false)
assumetff()
ConvertToYV12(interlaced=true)
QTGMC (preset="Placebo")
SelectEven()

I checked the video quality between the two compressed video and I think that TempGaussMC_Beta2u gives a better quality video. The difference is not huge but there is a difference.

-Vit-
26th June 2012, 16:04
There's not much point comparing QTGMC with TGMC - it's the same algorithm, the same script at it's core.
I deliberately designed the defaults on QTGMC to be about the same as TGMC. So just use QTGMC()

There are QTGMC settings that will give you even more exactly the same result as TGMC, something like this (for NNEDI3):
QTGMC( preset="Slower", border=true, svthin=1.0, lsad=1600, precise=true )

But yes, Placebo smooths too much on clean video. There was some discussion of it many pages back. I won't keep that setting in that form. Try setting TR2=1.
Or use Slower or Very Slow. And use Source Match, that's genuinely new, genuinely accurate, and nicely slow for people who like placebo settings.

The most "accurate" reasonable settings I've measured (measured by best SSIM that doesn't introduce any noticeable artifacts) are:
QTGMC( Preset="Very Slow", EZKeepGrain=0.5, SourceMatch=2, Lossless=2, Sharpness=0.1, Sbb=0 )
Although the exact EZKeepGrain and Sharpness setting depend on noise and motion in the video respectively.
Can get a little more precise with multiple calls to QTGMC or specialized pre-filters, but really it's not worth it.

Weirdo
27th June 2012, 11:15
I'm having trouble deinterlacing 1080i clips from tv recordings, the result is jerky video, you can see it here (http://www.mediafire.com/?gd2c4c7ydk0kh6e). The included interlaced clip is from another video but the source tv channel is the same.

Script:

SetMemoryMax(512)
SetMTMode(3, 6)
LoadPlugin("F:\...DGAVCDecode.dll")
AVCSource("F:...test.dga")
SetMTMode(2)
QTGMC( Preset="Medium", SourceMatch=1, EdiThreads=1 )

Also tried with SelectEven(), thinking that 1080/50p is a bit much to handle, but result is the same. Also tried Fast and Slow presets. Maybe it's an issue related to the 10-bit x264 encoder?

Boulder
27th June 2012, 11:23
Try setting a different field order (AssumeTFF or AssumeBFF) after you load the source.

Didée
27th June 2012, 11:37
AVCSource is outdated, depreciated, and in particular, don't use it on interlaced sources.

Weirdo
27th June 2012, 14:46
Try setting a different field order (AssumeTFF or AssumeBFF) after you load the source.
Tried both but nothing changed.

AVCSource is outdated, depreciated, and in particular, don't use it on interlaced sources.

Tried FFVideoSource, same result.

update: DirectShowSource (ffdshow shows up) + AssumeTFF work perfectly. I thought DSS was the dodgiest one? :confused:

AzraelNewtype
27th June 2012, 20:37
Tried both but nothing changed.

Tried FFVideoSource, same result.

update: DirectShowSource (ffdshow shows up) + AssumeTFF work perfectly. I thought DSS was the dodgiest one? :confused:

FFVideoSource fails spectacularly on interlaced avc, so this is not surprising.

DSS is pretty dodgy, you're fairly lucky here, though you might want to at least switch to DSS2 (still dodgy, slightly less so for these situations).

kalehrl
28th June 2012, 09:06
I'm having trouble deinterlacing 1080i clips from tv recordings, the result is jerky video, you can see it here (http://www.mediafire.com/?gd2c4c7ydk0kh6e). The included interlaced clip is from another video but the source tv channel is the same.

Script:

SetMemoryMax(512)
SetMTMode(3, 6)
LoadPlugin("F:\...DGAVCDecode.dll")
AVCSource("F:...test.dga")
SetMTMode(2)
QTGMC( Preset="Medium", SourceMatch=1, EdiThreads=1 )

Also tried with SelectEven(), thinking that 1080/50p is a bit much to handle, but result is the same. Also tried Fast and Slow presets. Maybe it's an issue related to the 10-bit x264 encoder?

Are you dealing with HD satellite recordings?
I've had the same issue and I find it best to use HD Streams Extractor in MeGUI (which is basically eac3to GUI) to make a MKV file without reencoding. Just make sure you select raw h264 while extracting video stream. Then mux video and audio to make a proper MKV. Then you can use FFVideoSource but with this addition - fpsnum=25, fpsden=1. So the line will look something like this:
FFVideoSource("...\T1_Video1.mkv", threads=1, fpsnum=25, fpsden=1)
Sometimes it is even necessary to use FFIndex before FFVideoSource like this:
FFIndex("...\T1_Video1.mkv", demuxer="lavf")
FFVideoSource("...\T1_Video1.mkv", threads=1, fpsnum=25, fpsden=1)

Weirdo
29th June 2012, 11:40
Yes, they are Sat-HD recordings. Thanks for the info, kalehrl.

Weirdo
8th July 2012, 16:20
I've seen this mentioned before, but is the exact cause known? Using MT, encoding starts at good speed (~29fps),
but gradually slows down almost at non-MT mode levels (~12). Using MeGUI with 10-bit x264.exe on 720x576 video.

Here's a sample script:

SetMTMode(3,7) # Intel Q9650, also tried 3,(4,5,6)
LoadPlugin("F:\...ffms2.dll")
FFVideoSource("E:\video.mkv", threads=1)
SetMTMode(2)
QTGMC( Preset="Fast", EdiThreads=1 )

Encoder settings:

cabac=1 / ref=5 / deblock=1:0:0 / analyse=0x3:0x133 / me=umh / subme=8 / psy=1 / psy_rd=1.00:0.00 / mixed_ref=1 / me_range=24 / chroma_me=1 / trellis=2 / 8x8dct=1 / cqm=0 / deadzone=21,11 / fast_pskip=1 / chroma_qp_offset=-2 / threads=6 / lookahead_threads=1 / sliced_threads=0 / nr=0 / decimate=0 / interlaced=0 / bluray_compat=0
constrained_intra=0 / bframes=6 / b_pyramid=2 / b_adapt=2 / b_bias=0 / direct=2 / weightb=1 / open_gop=0 / weightp=2 / keyint=500 / keyint_min=50 / scenecut=40 / intra_refresh=0 / rc_lookahead=40 / rc=crf / mbtree=1 / crf=24.1 / qcomp=0.60 / qpmin=10 / qpmax=51 / qpstep=4 / ip_ratio=1.40 / aq=1:1.00

(Thanks, AzraelNewtype)

-Vit-
8th July 2012, 17:34
Possibly not enough cache memory.

[I mention all this in the first post - please read it in full]
Put this as your first line:
SetMemoryMax(M)

Set M to somewhere from 1000 to 1800 - perhaps start at 1400. Don't set M too high or you will run out of memory (application memory, not your RAM). These large values for M require a large address aware encoder, but x264 is that.

Weirdo
8th July 2012, 18:49
Thanks Vit, I've tried values between 512-2300 (system RAM=4GB) but the speed drop seems inevitable. Also flagged megui.exe as laa (it isn't) and tested the 10-bit x264 (it is). Using the "Modded Plugins Package" files inside "QTGMC 32-bit Plugins [Vit-2.6].zip" in the first page, mirror 2 link.

Boulder
8th July 2012, 19:22
Have you tried some other encoder? Like running VirtualDub's video analysis pass to see if it shows the same issue. x264's performance depends quite a lot on the bitrate.

-Vit-
8th July 2012, 22:25
You don't need to mark MeGUI as laa, only the encoder being used. However, as you're using MeGUI then check "Add pre-rendering job" so it runs in two passes, splitting the resource usage of x264 and QTGMC (both use a lot, and 4GB RAM could be limiting you). You'll need a lot of disk space for the temporary file of the first pass (10s of GB per hour of footage at SD).

Mole
14th July 2012, 04:51
Should we keep the vertical resolution and only crop after QTGMC? (like any other deinterlacers)

For example, QTGMC(Preset="Slow").Crop(0,74,720,428)

However, is it OK to crop horizontally before QTGMC? (again like any other deinterlacers)

Crop(12,0,696,576).QTGMC(Preset="Slow")

When I need to crop both, this is what I usually do to speed things a tiny bit:

Crop(12,0,696,576).QTGMC(Preset="Slow").Crop(0,74,696,428)

Does the same cropping rule apply for QTGMC(InputType=1)?

When cropping before QTGMC, are there any limitations to the horizontal resolution such as mod4 or mod16 etc? (Well, except of course YV12 requires mod4)

Because if it's OK to crop vertically, then there's potentially performance gain if I can crop out the letterbox, especially on 1080p source, leaving only 1920x8XX.

-Vit-
14th July 2012, 12:07
You can crop horizontally and vertically before QTGMC with these restrictions (same for interlaced or progressive)
YV12: horizontal & vertical mod4. YUY2: horizontal mod4, vertical mod2
Cropping will speed things up of course, but if you crop a significant amount of real image for some reason then you lose some motion analysis possibilities and reduce quality at edges.

Of course you should never vertically resize before QTGMC. You can horizontally downscale before QTGMC for a good speed up with only a little ill-effect.

sirt
14th July 2012, 23:18
I want QTGMC not to denoise, sharpen ect so I've been using that configuration lately :



QTGMC(Preset="very slow",TR0=2,TR1=2,TR2=0,SrchClipPP=0,SubPelInterp=1,SubPel=4,Search=5,ChromaMotion=true, \
EdiMode="NNEDI3" ,ChromaEdi="",NNSize=4,NNeurons=3,EdiQual=2,Sharpness=0,SMode=0,SLMode=0,SOvs=0,Sbb=0,\
SLRad=0,SourceMatch=3,MatchPreset="very slow",MatchPreset2="very slow",MatchEnhance=0.4,Lossless=0,EZDenoise=0,\
EZKeepGrain=1.4,NoisePreset="faster",NoiseProcess=0,NoiseTR=0,Sigma=0,GrainRestore=0,NoiseRestore=0)



What do you think of this regarding my needs ? Moreover, it doesn't work with preset="placebo" (wiht same configuration) and I don't really know why.

I'm fed up with constantly cropping a frame (or creating a mask) when only half of it or a small area looks interlaced and that in order to "save" the areas I don't want to be processed by QTGMC. So would you know some configuration or method to avoid me doing this and force this deinterlacer to process only what's needed ? I've repeatedly seen progressive parts of a frame being affected by some kind of flickering or being blurred if I haven't force QTGMC not to perform them

-Vit-
15th July 2012, 21:19
Far too excessive. Do you actually know what all of those settings do? If not then don't use them.
Also conflicting/bad settings. Sigma=0? That's either invalid or it cancels out noise processing (i.e. the EZKeepGrain). SrchClipPP=0 will reduce quality of motion analysis. NNeurons=3 & EdiQual=2 are overkill, but NNSize=4 is a high-speed setting... etc.

Stripping out most of the settings you get this pretty extreme, but usable setting:
QTGMC(Preset="very slow",TR0=2,TR1=2,TR2=0,Sharpness=0.1,SourceMatch=3,EZKeepGrain=1.4,NoisePreset="faster")
- I added a sharpness setting of 0.1, because without it your source will be very slightly softened.
- Tweak the EZKeepGrain up or down for the exact amount of noise in your source
- Try Lossless=2 because it can get closer the source and might cause no visual issues.
- Go "Placebo" if you like, but I don't recommend it. Set MatchPreset if you like, but effects are usually small.

Applying (Q)TGMC to parts of a frame but not others will cause noticeable problems at the boundaries

sirt
15th July 2012, 21:37
Okay, I will try your settings soon and report there the results if necessary. Thank you.

In fact I never managed to use "placebo". I always got tedious messages saying such and such parameter was incorrect. Could you give me a configuration that is likely to work regarding my needs namely ANY PROCESSION at all such as denoising, sharpening, antialiasing ect (I just want QTGMC to deinterlace without doing anything in extra) ?

Indeed, with regard to the boundaries problems - occasionally a form of blending compared to others parts unprocessed around - I've been resorting to some tricks such as applying a mask that maintains unspoiled the rest of the frame and skirt the mod 4 problem. Of course it creates the illusion there are no boundaries. Nonetheless, do you think something else can be done internally by setting QTGMC ?

-Vit-
16th July 2012, 01:14
The SourceMatch, Lossless and EZKeepGrain settings are there to reduce "side-effects". No perfect deinterlacer exists.

There was an idea some pages back from Didee to retain *perfectly* static areas, which has some value (albeit with some boundary issues of it's own) [Edit: here it is (http://forum.doom9.org/showthread.php?p=1573281#post1573281), read the post before too]. However, as soon as there any motion, the idea to not deinterlace areas because they are progressive enough always causes problems. Masking the problems blurs detail.

sirt
16th July 2012, 09:36
Well your command doesn't work for me for some annoying reason :

QTGMC(Preset="very slow",TR0=2,TR1=2,TR2=0,Sharpness=0.1,SourceMatch=3,EZKeepGrain=1.4,NoisePreset="faster")

gives me :

nnedi3: nsize must be in [0,4]!

Although I set NNsize=0 it won't work (but I don't want to set it !)

-Vit-
16th July 2012, 22:07
You are using an old version of NNEDI3 I think. Get the latest versions of the plugins. Use the packages or the links in the first post.

ZZZERO
20th July 2012, 18:08
I've had no problems with QTGMC in the past. I just upgraded my PC to ivybridge and the OS to Windows 7 Professional 64 bit and I can't get QTGMC to work anymore. I use MEGUI and when I load an avs file I now get this error:

Script error: there is no fucntion named "Interleaved2Planar" (QTGMC-3.32.avsi, line 350)

I've searched the forum and found a couple of other references to this problem but I can't get it fixed. I've tried all versions of removegrain I can find. It just keeps giving me that error. Have run out of ideas. Please help. Here's my script:

SetMemoryMax(800)
SetMTMode(3, 6) #
LoadPlugin("C:\Program Files (x86)\MeGUI\tools\ffms\ffms2.dll")
FFVideoSource("H:\Captured\MS2\MS2.avi", threads=1)
SetMTMode(2)
QTGMC( Preset="Slower", EdiThreads=1, NoiseProcess=1, NoiseRestore=0.0, ChromaNoise=true)
#deinterlace
crop(6, 0, -10, -8)
#resize
LanczosResize(576,432) # Lanczos (Sharp)
#denoise

To set up QTGMC I used all the plugins from QTGMC 32-bit Plugins [Vit-2.6] plus Avisynth 2.6 MT (Current version 2012.05.16) and mt_masktools-25.dll from the original QTGMC plugin package.

I will tweak the multi-threading settings after I can get a script loaded.

-Vit-
20th July 2012, 18:44
Interleaved2Planar comes from SSE2Tools. If it needs that then you have a YUY2 source.
Make sure you have deleted any duplicate plugin versions (SSE2, SSE3 etc.). Regress to the modded plugins pack, use the mt_masktools-25.dll against your 2.6MT. Make sure you use the SSE2Tools provided in the pack or in the standalone link from the first post.

Or convert to YV12 :P

ZZZERO
20th July 2012, 21:36
I tried reverting back to the original modded package. I get the same error. I made sure I'm using SSE2Tools from the modded plugins pack. I'm also using mt_masktooks-25.dll. I don't see any duplicate plugins from other sset versions.

This exact script worked fine 2 days ago when I was using Windows XP 32bit. Now even though I've set it up the same I get this error. If this helps, here is the full contents of my AviSynth plugins directory.


AddGrainC.dll 1.5.2.0
colors_rgb.avsi
dfttest.dll
DirectShowSource.dll
EEDI2.dll
eedi3.dll
FFT3DFilter.dll
mt_masktools-25.dll
mvtools2.dll
nnedi.dll
nnedi2.dll
nnedi3.dll
QTGMC-3.32.avsi
RemoveGrainSSE2.dll
RepairSSE2.dll
SSE2Tools.dll
TCPDeliver.dll
TDeint.dll
VerticalCleanerSSE2.dll
yadif.dll

All the plugins from QTGMC 32-bit Plugins [Vit-Mod] are there. I cannot for the life of me figure out what's wrong. It's very frustrating since I was using QTGMC multi-threaded without any problems before switching to 64 bit Windows 7 Professional. No matter what I try I cannot get rid of this error: there is no fucntion named "Interleaved2Planar"

ZZZERO
20th July 2012, 22:02
Or convert to YV12 :P

Well, that works. I add ConvertToYV12() right after SetMTMode (2) and just before the QTGMC line and then I have no error.

-Vit-
20th July 2012, 23:08
The YUY2 support in QTGMC is a little precarious, because the plugin support is only barely there. But I don't use YUY2 often. Maybe those who do have some advice?

kolak
21st July 2012, 00:52
I run QTGMC using YUY2 and have no special issues with it.

As VIT said- you need mt_masktools-25.dll for this, even when you use 2.6MT.

kolak
23rd July 2012, 10:29
Hmmm- if I could get 30fps for HD I would be happy :)

Don't see much difference, except number of cores and EdiThreads=1, which I don't have in my script. Will try to use it and increase number of cores.

Just to prove that HDDs are not bottleneck ( I have 8x HDDs in RAID 5 over Areca controller) I can downscale same file to SD at 200fps using MT.

Can it be due to not using tweaked plugins for avisynth 2.6MT?

Have no idea why, but now I do have 30fps with very fast presets- not sure what have changed- I don't remember changing any plugins, but maybe I did. Strange for me, but it works 3x faster than it use to!

nikosvault
24th July 2012, 21:00
I am struggling to get QTGMC to work, at least outside of the standard preset. When I just use QTGMC(), everything looks great, but when I add SourceMatch or Lossless or Placebo, the videos become absolute pants. :confused:

loadplugin("C:\AviSynth 2.5\plugins\DirectShowSource.dll")
loadplugin("C:\AviSynth 2.5\plugins\mvtools2.dll")
loadplugin("C:\AviSynth 2.5\plugins\mt_masktools-25.dll")
loadplugin("C:\AviSynth 2.5\plugins\nnedi3.dll")
loadplugin("C:\AviSynth 2.5\plugins\RemoveGrainSSE2.dll")
loadplugin("C:\AviSynth 2.5\plugins\RepairSSE2.dll")
loadplugin("C:\AviSynth 2.5\plugins\SSE2Tools.dll")
loadplugin("C:\AviSynth 2.5\plugins\nnedi2.dll")
loadplugin("C:\AviSynth 2.5\plugins\nnedi.dll")
loadplugin("C:\AviSynth 2.5\plugins\EEDI2.dll")
loadplugin("C:\AviSynth 2.5\plugins\TDeint.dll")
loadplugin("C:\AviSynth 2.5\plugins\ColorMatrix.dll")
loadplugin("C:\AviSynth 2.5\plugins\eedi3.dll")
loadplugin("C:\AviSynth 2.5\plugins\VerticalCleanerSSE2.dll")
loadplugin("C:\AviSynth 2.5\plugins\AddGrainC.dll")
loadplugin("C:\AviSynth 2.5\plugins\FFT3DFilter.dll")
loadplugin("C:\AviSynth 2.5\plugins\dfttest.dll")
LoadCPlugin("C:\AviSynth 2.5\plugins\yadif.dll")
import("C:\AviSynth 2.5\plugins\QTGMC.avsi")
DirectShowSource("C:\AviSynth 2.5\plugins\1.mpg")
converttoYv12(interlaced=true)
AssumeTFF()
QTGMC(Preset="Slower", SourceMatch=3, Lossless=2)
ColorMatrix(mode="Rec.601->Rec.709")


QTGMC()
https://rapidshare.com/files/3271469618/QTGMC().mp4

QTGMC(Preset="Slower", SourceMatch=3, Lossless=2)
https://rapidshare.com/files/2333402076/Preset slower_ SourceMatch 3 Lossless 2.mp4

-Vit-
25th July 2012, 11:39
Problem is source filter. Only use DirectShowSource as a last resort.

nikosvault
25th July 2012, 15:29
Problem is source filter. Only use DirectShowSource as a last resort.

Thanks. Work perfect with mpeg2source.

dee23
26th July 2012, 23:46
Script works great, though I'm not sure why I'm getting a slight audio delay (by a second or so).
Everything is left at default:

mpeg2source("video.d2v") # DGDecode_mpeg2source, FFVideoSource, AviSource, whatever your source requires
QTGMC( Preset="Slower" )
SelectEven() # Add this line to keep original frame rate, leave it out for smoother doubled frame rate

Edit: I want to upload my video(s) onto youtube, what do you suggest I use as far as settings go? Double my framerate? resolution, etc?

The media-info for the footage I want to deinterlace:
720x480, Top Field First, Interlaced, 29.97fps.

manono
27th July 2012, 08:36
Script works great, though I'm not sure why I'm getting a slight audio delay (by a second or so).
It's nothing to do with the script. Remove the audio delay using DelayCut.
I want to upload my video(s) onto youtube, what do you suggest I use as far as settings go? Double my framerate?
No, as YouTube will just halve the framerate because they don't support 59.94fps. It'll be better if you do it yourself using the SelectEven line shown above. And that's if it's really interlaced. If it's a movie, for example, it's not interlaced almost by definition. MediaInfo isn't reliable to tell you if the source is interlaced, only if it's been encoded as interlaced, a very different thing. Maybe it really needs to be IVTC'd. If you don't know how to tell the difference, maybe post a 10 second sample so we can have a look.
resolution, etc?
If you want a 480p video made available, then upload it as 480p. You could upload the source 720x480 but you'll then have to set an AR tag:

http://support.google.com/youtube/bin/answer.py?hl=en&answer=146402

Or resize it to some 1:1 resolution, one such as 640x480 or a 4:3 source.

dee23
27th July 2012, 11:31
It's nothing to do with the script. Remove the audio delay using DelayCut.

Thanks. Worked like a charm.

No, as YouTube will just halve the framerate because they don't support 59.94fps. It'll be better if you do it yourself using the SelectEven line shown above. And that's if it's really interlaced. If it's a movie, for example, it's not interlaced almost by definition. MediaInfo isn't reliable to tell you if the source is interlaced, only if it's been encoded as interlaced, a very different thing. Maybe it really needs to be IVTC'd. If you don't know how to tell the difference, maybe post a 10 second sample so we can have a look.

I don't know the difference, so here's a small clip of the footage I'm working with: http://www.sendspace.com/file/ihijs0

manono
27th July 2012, 18:32
Your video has already been deinterlaced (poorly) and then encoded as interlaced. It doesn't need QTGMC at all, unless you want to use its InputType mode (1,2, or 3) for progressive sources to try and control the aliasing/shimmering.

dee23
27th July 2012, 19:28
Your video has already been deinterlaced (poorly) and then encoded as interlaced. It doesn't need QTGMC at all, unless you want to use its InputType mode (1,2, or 3) for progressive sources to try and control the aliasing/shimmering.

Thanks for the info, but are you certain this was already deinterlaced? The original source (before encoding) is from a DVD, and the specs are: 720x480i @ 29fps

When I edit the VOB's in Sony Vegas or TMPGENC, I can clearly see interlace flickering/jagged lines - and when the video is finished re-encoding, I have these weird artifacts that appear. It looks pretty terrible on YouTube. So, to get rid of that stuff, I'm using OTGMC; the results look great. In fact, the script removes the jagged lines and extra noise in my video, and also look better on YouTube.

http://forum.videohelp.com/threads/313797-Best-deinterlace-method?p=1940003&viewfull=1#post1940003; scroll down to post #6: the first picture has similar artifacts to that in my video; the third looks much more clearer (which is what I'm looking for, and get when using QTGMC).

ZZZERO
27th July 2012, 21:04
Can someone tell why or why not one should use selecteven() in the script? I tried it both with and without that line and thought the quality was slightly better without selecteven() but it appears that some media players have a problem with 60fps playback. At least when I playback with vlc player it looks jerky and with poor audio synch. On zoom player and windows media player all is fine. Does that sound right?

Asmodian
27th July 2012, 21:44
Selecteven() is just to convert the 60 fps to 30 (it drops every other frame).

It is possible your computer isn't fast enough to decode the 60fps using VLC but is using Zoom Player as they use different code to do the decoding.

manono
27th July 2012, 21:50
...but are you certain this was already deinterlaced?
Yes.
The original source (before encoding) is from a DVD, and the specs are: 720x480i @ 29fps
As I mentioned in my original reply, there can be a big difference between the (progressive) source material and how it may have been encoded (as interlaced).
I can clearly see interlace flickering/jagged lines...
Flickering and jagged lines, yes. Interlacing, no. You do know what interlacing looks like, don't you? Not like that.
So, to get rid of that stuff, I'm using OTGMC; the results look great. In fact, the script removes the jagged lines and extra noise in my video, and also look better on YouTube.

Right, but its InputType=1 is specifically designed for that kind of thing, and might even do a better job with it. I'm not saying your video isn't helped by the use of QTGMC, but that QTGMC is usually used on interlaced material to bob it, and its InputType=1 might be even better suited to what you're doing.

http://forum.videohelp.com/threads/3...1#post1940003; scroll down to post #6: the first picture has similar artifacts to that in my video
You know it had been already deinterlaced, too, don't you? With Yadif. Yadif is a decent and very fast deinterlacer, but a basketball court shows up all of its (and most other deinterlacers') shortcomings.

ZZZERO
27th July 2012, 21:52
Selecteven() is just to convert the 60 fps to 30 (it drops every other frame).

It is possible your computer isn't fast enough to decode the 60fps using VLC but is using Zoom Player as they use different code to do the decoding.



I'd be surprised if it's my computer's lack of speed. It has an i7-3770k CPU. What is the point of converting 60fps to 30? There must be a reason people do it and that's what I'm trying to find out.

manono
27th July 2012, 22:29
What is the point of converting 60fps to 30? There must be a reason people do it and that's what I'm trying to find out.
I can think of two reasons right off the bat. NTSC DVD doesn't support 59.94fps. YouTube doesn't allow 59.94fps videos and will also cut the framerate in half.

dee23
27th July 2012, 22:51
Flickering and jagged lines, yes. Interlacing, no.

I would still have to render progressive for it to be removed though, correct?

You know it had been already deinterlaced, too, don't you?

Yes - but when I deinterlace with Vegas or TMPG, I get the same thing. Noise, artifacts, etc. I've also tried Yadif, Yadifmod with NNED12 (that thread I linked you is where I discovered OTGMC). Same thing.

What do you suggest, manono? Continue with OTGMC or another script? Thanks.

manono
27th July 2012, 23:31
I would still have to render progressive for it to be removed though, correct?
No, most progressive 29.97fps material on NTSC DVD is encoded as interlaced. Again, progressive source material can be, and often is, encoded as interlaced. Maybe 99% of PAL progressive movies for DVD are encoded as interlaced.

Continue with OTGMC or another script?
If you like the results you're getting, you can continue with it. However, I might suggest:

QTGMC( "Faster", TR0=1, TR1=1, TR2=1, InputType=1 )

Someone with more experience working with these kinds of defects might have a better idea.

dee23
28th July 2012, 00:00
No, most progressive 29.97fps material on NTSC DVD is encoded as interlaced. Again, progressive source material can be, and often is, encoded as interlaced. Maybe 99% of PAL progressive movies for DVD are encoded as interlaced.

Gotcha. So in a program like Sony Vegas, how would I go about removing the jagged lines without exporting a progressive file?

If you like the results you're getting, you can continue with it. However, I might suggest:

QTGMC( "Faster", TR0=1, TR1=1, TR2=1, InputType=1 )

Someone with more experience working with these kinds of defects might have a better idea.[/QUOTE]

I'm a novice, so I appreciate the input. Thanks again.

manono
28th July 2012, 01:33
So in a program like Sony Vegas, how would I go about removing the jagged lines without exporting a progressive file?

I have no idea as I use AviSynth and not Vegas. Maybe pdr or someone else can answer. I don't believe you've said what the intended output format is, other than making something to upload to YouTube (correct me if I'm wrong). If for YouTube, progressive is good. It's for DVD that you get progressive material encoded as interlaced.

crismin
30th July 2012, 10:30
zerowalker!
try
SetmtMode(3,4)
AVISource("tape1.avi").Trim(0,129057)
AssumeTFF()
SetmtMode(2,4)
source=ConvertToYV12(interlaced=true).Crop(16,12,-16,-12)
bob=source.nnedi3(field=-2,threads=1)
super = bob.MSuper(pel=2, sharp=1)
backward_vec2 = MAnalyse(super, isb = true, delta = 4, blksize=16, overlap=8, chroma=false)
backward_vec1 = MAnalyse(super, isb = true, delta = 2, blksize=16, overlap=8, chroma=false)
forward_vec1 = MAnalyse(super, isb = false, delta = 2, blksize=16, overlap=8, chroma=false)
forward_vec2 = MAnalyse(super, isb = false, delta = 4, blksize=16, overlap=8, chroma=false)
bc2 = bob.MCompensate(super, backward_vec2)
bc1 = bob.MCompensate(super, backward_vec1)
fc1 = bob.MCompensate(super, forward_vec1)
fc2 = bob.MCompensate(super, forward_vec2)
Interleave(bc2,bc1,bob,fc1,fc2)
dfttest(sigma=100.0,tbsize=5,sbsize=16,sosize=12,threads=1)
Edibob=SelectEvery(5,2).nnedi3_rpow2(2,nsize=4,cshift="Spline36Resize",fwidth=720,fheight=576,threads=1)
Edibob.SeparateFields().SelectEvery(4,0,3).Weave().AssumeTFF()
QTGMC( Preset="fast", FPSDivisor=2, Ediext=Edibob,EdiThreads=1 )
Tune sigma, 100 good starting point. Script include work with borders.
-Vit-
This script better denoise than QTGMC. I remember Your suggestion, but for analog capture need external prefilter.
Also filtering on bobbed give better result than on fields.
Work slow 1.5-2 fps on Quad Core.
yup.

Thank You very much Vit and Yup for Your script. These are the best settings for my vhs videos. Please help once more with shimmers. How remove or reduce it. What code I must insert in Your script. Thanks a lot. Shimers on the screen.
http://imageshack.us/photo/my-images/844/helpfu.png/

yup
31st July 2012, 06:35
Hi crismin!
From my side try decrease sigma to lower value until noise at reasonable level (for outdoor shooting may be sigma=10 and lower).
Try script changing sigma
SetmtMode(3,4)
AVISource("tape1.avi")
AssumeTFF()
SetmtMode(2,4)
source=ConvertToYV12(interlaced=true).Crop(16,12,-16,-12)
bob=source.nnedi3(field=-2,threads=1)
super = bob.MSuper(pel=2, sharp=1)
backward_vec2 = MAnalyse(super, isb = true, delta = 4, blksize=16, overlap=8, chroma=false)
backward_vec1 = MAnalyse(super, isb = true, delta = 2, blksize=16, overlap=8, chroma=false)
forward_vec1 = MAnalyse(super, isb = false, delta = 2, blksize=16, overlap=8, chroma=false)
forward_vec2 = MAnalyse(super, isb = false, delta = 4, blksize=16, overlap=8, chroma=false)
bc2 = bob.MCompensate(super, backward_vec2)
bc1 = bob.MCompensate(super, backward_vec1)
fc1 = bob.MCompensate(super, forward_vec1)
fc2 = bob.MCompensate(super, forward_vec2)
Interleave(bc2,bc1,bob,fc1,fc2)
dfttest(sigma=100.0,tbsize=5,sbsize=16,sosize=12,threads=1)
SelectEvery(5,2)
StackVertical(Separatefields(source),mt_makediff(last,Separatefields(source),u=3,v=3))
at bottom field You could see only noise without ghost.
About shimmer waiting -Vit- or try more power preset (Preset="Very Slow" and TR2=3).
yup.

-Vit-
31st July 2012, 19:11
I can't see shimmer from a single screenshot. We need to see some of your source video (before running the script).

crismin
1st August 2012, 07:33
Hi crismin!
From my side try decrease sigma to lower value until noise at reasonable level (for outdoor shooting may be sigma=10 and lower).
Try script changing sigma
SetmtMode(3,4)
AVISource("tape1.avi")
AssumeTFF()
SetmtMode(2,4)
source=ConvertToYV12(interlaced=true).Crop(16,12,-16,-12)
bob=source.nnedi3(field=-2,threads=1)
super = bob.MSuper(pel=2, sharp=1)
backward_vec2 = MAnalyse(super, isb = true, delta = 4, blksize=16, overlap=8, chroma=false)
backward_vec1 = MAnalyse(super, isb = true, delta = 2, blksize=16, overlap=8, chroma=false)
forward_vec1 = MAnalyse(super, isb = false, delta = 2, blksize=16, overlap=8, chroma=false)
forward_vec2 = MAnalyse(super, isb = false, delta = 4, blksize=16, overlap=8, chroma=false)
bc2 = bob.MCompensate(super, backward_vec2)
bc1 = bob.MCompensate(super, backward_vec1)
fc1 = bob.MCompensate(super, forward_vec1)
fc2 = bob.MCompensate(super, forward_vec2)
Interleave(bc2,bc1,bob,fc1,fc2)
dfttest(sigma=100.0,tbsize=5,sbsize=16,sosize=12,threads=1)
SelectEvery(5,2)
StackVertical(Separatefields(source),mt_makediff(last,Separatefields(source),u=3,v=3))
at bottom field You could see only noise without ghost.
About shimmer waiting -Vit- or try more power preset (Preset="Very Slow" and TR2=3).
yup.


Sorry for my english. It's no about shimmer but ghosts on the screen. I didn't know word what it may describing this. Thank You Yup for script but it doesn't work. When i run this script i get errors. On the screen:
http://imageshack.us/photo/my-images/210/erroror.png/

This is the orginal source file:
http://narod.ru/disk/58657475001.f4900655955bb3519540f25bddab1f75/vobik2.vob.html

Orginal has got too ghosts on the screen. I work on the previous script with sigma and when i gave sigma lover then i have worse effect. Ghosts didn't disappear. Please help what i must do with this.

yup
1st August 2012, 16:01
crismin; Thank You Yup for script but it doesn't work. When i run this script i get errors.

For this script You need plugins which using QTGMC (see first thread) or separately install MVTools2, dfttest and masktools2.
Also use Virtualdub for view Avisynth scripts, errors message will be more informative.
Analog capture using hardware capture from VHS to DVD not best way. Better make capture using capture card. See this forum Capture part.
yup.

simcut
1st August 2012, 18:38
First of all I'd like to say how good QTGMC, thank you.

Secondly, should I only be using QTGMC on Progressive source that needs repairing of artifacts? Or is it okay to use it regardless? I have this DVD (vob format) where there is a scene in a room and in the background there are some plants and they produce a flicker when the camera moves around focusing on the person, and the leaves of the plants have what look like interlaced lines, but the lines do not go out beyond the leaves, it's hard to explain! The flickering is really offputting, what can I do to fix it?

Thanks.

crismin
6th August 2012, 10:15
For this script You need plugins which using QTGMC (see first thread) or separately install MVTools2, dfttest and masktools2.
Also use Virtualdub for view Avisynth scripts, errors message will be more informative.
Analog capture using hardware capture from VHS to DVD not best way. Better make capture using capture card. See this forum Capture part.
yup.

Thanks Yup. I stay with this script. I think about Canopus ADVC-300 but it's very expensive.

TheSkiller
6th August 2012, 15:20
I know it's offtopic but don't get the Canopus ADVC-300, it's not a good device despite the name. I haven't, in all those years, ever read something good about it. It has a crappy and destructive TBC and destructive useless filters, it makes the audio drift out of sync by I think one frame forwards and backwards in an endless loop.

If you want to use DV-based hardware you're best off using an older MiniDV camcorder that has analog inputs and the ability to loop the incoming signal through to firewire into your computer without having to record to MiniDV tape first.


@ simcut
What you describe could be real interlacing as well as it could be something different. We need a short unprocessed sample to help you. Cut out maybe 10 seconds from the VOB using DGindex, upload it to MediaFire and post the link. :)

Terka
24th August 2012, 14:55
Hi -Vit-, are you planning to implement SVP motion interpolation into QTGMC?

fvisagie
26th August 2012, 14:17
Firstly, a huge Thank You to -Vit- for a fantastic tool. It brought a tremendous improvement to my latest project; in fact it lifted it "from the dustbin to the display cabinet"(tm);). Many, many thanks, I sincerely enjoy and appreciate all the effort you put into polishing its operation.:thanks:

Secondly, a small suggestion to make it easier and safer for new users to install and get going with QTGMC(). If you implement it, all that new users would have to do is:
Dump QTGMC() and all its plugins in a dedicated folder (e.g. C:\Program Files\Avisynth 2.5\plugins\QTGMC\)
Call it with only:
global QTGMCPath = "C:\Program Files\Avisynth 2.5\plugins\QTGMC\"
Import (QTGMCPath + "QTGMC-3.32.avsi")

No more figuring out long lists of LoadPlugin()s, typos, lost hours and hair, etc.!

All that is needed in QTGMC() is something like

# <mod>
try {
Defined (QTGMCPath)
}
catch (err_msg) {
Assert (false,
\ Chr (10) +
\ "Before importing QTGMC(), point the global QTGMCPath to its folder, e.g.:" + Chr (10)
\ + Chr (10)
\ + """global QTGMCPath = "C:\Program Files\AviSynth 2.5\plugins\QTGMC\"""" + Chr (10)
\ + """Import (QTGMCPath + "QTGMC-3.32.avsi")"""
\ + Chr (10))
}
LoadPlugin (QTGMCPath + "AddGrainC.dll")
LoadPlugin (QTGMCPath + "dfttest.dll")
LoadPlugin (QTGMCPath + "FFT3DFilter.dll")
LoadPlugin (QTGMCPath + "mt_masktools-25.dll")
LoadPlugin (QTGMCPath + "mvtools2.dll")
LoadPlugin (QTGMCPath + "nnedi3.dll")
LoadPlugin (QTGMCPath + "RemoveGrainSSE2.dll")
LoadPlugin (QTGMCPath + "RepairSSE2.dll")
LoadPlugin (QTGMCPath + "SSE2Tools.dll")
LoadPlugin (QTGMCPath + "Yadif.dll")
# etc.
# </mod>
Of course, it would be even better still if plugins were only loaded once needed.

This approach should also address the issue of Yadif.dll not autoloading, and QTGMC() not knowing where it is.

Since so many toolchain scripts use different versions of the same plugins, inside the body of QTGMC one might even consider using DLLName_function() syntax for improved safety. For complete safety one would also create unique names for DLLs inside the Plugin Package.

Many thanks again, and I hope some of this is useful to you.

Kind regards,
Francois

-Vit-
26th August 2012, 19:03
Terka: I already posted TGMC/QTGMC with default settings using SVP (http://forum.doom9.org/showpost.php?p=1568520&postcount=45). I have not really pushed forward much with SVP because I could not get either a great speed up or significant quality improvements using it. There is a small speed up, a few %, and it may be better for slower machines. But the quality of the vectors... well they're better in a few areas, but worse in others, much like any other MVTools tweak.

I think the vector needs of QTGMC and SVP are different. QTGMC requires correct vectors because it combines compensated with uncompensated frames. But at the same time QTGMC is less sensitive to areas where analysis fails, as it tends to fallback to NNEDI3. Of course SVP will also work well with correct vectors, but SVP is much more strongly affected by analysis failure. So I suspect SVP more strongly favors locally coherent vectors to produce more consistent vectors on complex areas, but with potential small inaccuracies in the vectors elsewhere. Small inaccuracies on simple motion makes little difference to SVP output compared to the big problems that flow typically faces. But it's a bad thing for QTGMC, or MDegrain for that matter since the sharpest output requires best vector precision whenever possible. I've tried tweaking SVP parameters to little effect (although I haven't tried recent versions), perhaps some of the algorithmic changes have been tweaked for flow rather than general use? That's all a bit fluffy as you should expect with MVTools discussion.

___

fvisagie: Interesting, thanks. I'm not sure if other users would prefer that or not. What if the plugins have already been loaded by something prior to the QTGMC call...? Can't remember, does that mean those custom LoadPlugins would be skipped?

I have considered a validation step at the start of the script - checking that all the correct plugins are available. Though not obvious how to do that cleanly - if only plugins were forced to expose a version number...

fvisagie
27th August 2012, 10:58
I have considered a validation step at the start of the script - checking that all the correct plugins are available.

Due to the number of shared scripts using different versions of the same plugins, I think it's safe practice to store each script with its associated plugins in their own dedicated folder (that's what I do at least). Following this approach then, will ensure that QTGMC() loads all (and only) the correct plugins. If those plugins are also uniquely named e.g. QTGMCPlugin.dll and called as QTGMCPlugin_function(), QTGMC() will only ever call the right function from the right version of the right DLL, stored with QTGMC(). This regardless of whatever other DLL versions and names of the same plugin/s got loaded by other scripts. Uniquely naming DLLs will also remove any doubt whether LoadPlugins will proceed as expected or not.

I suspect if all scripts accessed their preferred plugins this way, that problems with different versions of the same DLL being loaded will be a thing of the past!

SEt
28th August 2012, 13:54
That is a bad approach that only would lead to a mess. There should be only one – the most recent version of each plugin.

fvisagie, can you name scripts that require different versions of the same plugin? Btw, for example, MaskTools and mt_masktools are not "different versions" but rather "different plugins" because they provide different functions and can work together with no problems.

fvisagie
28th August 2012, 16:17
That is a bad approach that only would lead to a mess. There should be only one – the most recent version of each plugin.

I'm but an AVS novice and you sound like you know a lot more about it than me, so I'm happy to accept your verdict.

XMEN3
8th September 2012, 11:32
Here is a package of plugins for QTGMC using the latest Avisynth 2.6 interface (http://forum.doom9.org/showthread.php?p=1567792#post1567792). They may provide better multi-threading stability:
QTGMC 32-bit Plugins [Vit-2.6] (http://hotfile.com/dl/152000197/7dcecb4/QTGMC_32-bit_Plugins_Vit-2.6.zip.html) (mirror1 (https://rapidshare.com/files/3313295235/QTGMC_32-bit_Plugins_Vit-2.6.zip) | mirror2 (http://www.spirton.com/uploads/QTGMC/QTGMC%2032-bit%20Plugins%20%5BVit-2.6%5D.zip))
Thanks to SubJunk for the filehost-free mirror!

These plugins have been updated to the latest 2.6 interface:
- MVTools, MaskTools, NNEDI3, EEDI3, RemoveGrainSSE2, RepairSSE2, dfttest, FFT3DFilter, AddGrainC, VerticalCleanerSSE2, TDeint
The updated plugins will only work with versions of Avisynth 2.6 that support the new interface. Currently I believe that's only SEt's latest Avisynth 2.6MT build (http://forum.doom9.org/showthread.php?t=148782).

doesn't work anymore in the latest vit 2.6.0 mt 2012.08.28
Works on the one before...
:thanks:

Keiyakusha
8th September 2012, 12:51
doesn't work anymore in the latest vit 2.6.0 mt 2012.08.28
Works on the one before...
:thanks:
You should use avisynth from 2012.05.16. as you can read from that thread, they broke 2012.08.28 and not in hurry to roll it back.

Edit: i just corrected the date, it should be 2012.05.16, sorry. In other words not the most recent build.

Boulder
8th September 2012, 15:27
Or simply use the plugin package which uses the old interface. They seem to work just fine.

GEfS
9th September 2012, 18:26
Anyone please show me a No blending script for Anime (MPEG-2, Interlaced, Top Field First). And a telecine script with it.

wolfeeldiver
19th September 2012, 19:18
Thanks Vit and Didee for a great program. I am a newbie at this but see the potential of QTGMC of being a great deinterlacer tool for me to use more often.

Forgive me for such a newbie question, but I have been struggling for some time with a problem which I cannot resolve. I need someone’s guidance on characterizing the defects and suggestions how to resolve it.

I’m just trying to deinterlace my 1440x1080i60 Vegas Pro edited video to the best possible looking progressive output, no resizing, no color corrections. When I use the Vegas Pro to deinterlace and the built in Mainconcept codec the output is just fair, but no where as sharp and vivid as the file using QTGMC andX264. However the defect that I’ll describe below I don’t see when using the Vegas method.

When deinterlaced with QTGMC the ideo has in a few frames of motion some areas that appear to be wavey horizontal distortion, almost a shimmy, of the bright vertical sides of subjects.

I am unsure of what the proper name is for the observed defect, perhaps someone might look at the attached video file and pay careful attention at appx 7 seconds into it, where you see the enlarging red frame and Octopus. Notice towards the upper and lower left, of the image, the round white circular sea anemonies on the rock get distorted, and gets a wavey jagged edge. The same same happens to the "horns" of the octopus above his eyes. The distortion comes and goes briefly and I dont see this distortion in my Vegas Pro deinterlaced version, which leads me to suspect that I am not setting the proper parameters in QTGMC

What is the name for this type of distortion?
Does anyone have any suggested QTGMC setting examples to try?

At this point in time I'm keeping things simple and running QTGMC single threaded.

I have read this forum from start to finish, I am learning a lot, and have tried several different approaches, but I'll confess that I am so new to this process and not knowing the proper “name” for this defect hinders my ability to search for a solution.

Any suggestions are appreciated. Here’s a link to a file.
http://www.mediafire.com/?yjhxvily426y34z

Didée
19th September 2012, 20:29
What is the name for this type of distortion?
The name is "Interlaced-video-has-been-resized-before-it-was-deinterlaced".

It seems you first did the effects in Vegas, on the interlaced input, then exported the video, then deinterlaced with QTGMC? If so, it's the wrong order. (Some of) The effects involve changing the framesize, and when a plain progressive resizer is working on interlaced frames, you get exactly those distortions that the sample shows.

For best results, while doing the effects in Vegas, you need to first deinterlace the footage with QTGMC, and then edit in Vegas.

wolfeeldiver
21st September 2012, 02:29
Thanks for the reply Didee. I appreciate the suggestion.

Zaxooz
22nd September 2012, 05:42
First of all, the script is pure awesomeness, so huge thanks to all the parties responsible!

The reason I am posting is that I need some confirmation from those technically knowledgeable of certain empirically established facts:

1) What is the purpose of EdiMode="EEDI3" and "EEDI3+NNEDI3"? I've closely studied the test clips deinterlaced with both NNEDI3 and EEDI3+NNEDI. I could absolutely find no traces of EEDI3's superiority and I am quite picky about quality. The source is obviously SD. I haven't tried EEDI3 on its own, but from my experience with EEDI2+Yadif, it should't pack any surprises. And yes "EEDI3+NNEDI3" is thrice as slow than using NNEDI3 alone.

2) I believe someone might have asked this one previously but I can't find it in the thread. Basically, will using QTGMC( Preset="Slower", SourceMatch=3, Lossless=2, EZKeepGrain=1.0, NoisePreset="Slower", Sharpness=0.2 ) yield me better noise retention than QTGMC( Preset="Slower", SourceMatch=3, Lossless=2, Sharpness=0.2 ) alone? My experience with the script suggests "yes", but I'd like an authoritative answer.

3) What is TR2 for? Why is it enabled by default starting from "Medium" preset at a value of 1? Should I disable it if I prefer sharpness and grain? Or is there some other function to it other than denoising? Thanks.

-Vit-
23rd September 2012, 18:28
1) EEDI3 is a little better at connecting close-to-horizontal and parallel lines than NNEDI3. However, NNEDI3 outshines it in most other use cases. EEDI3+NNEDI3 uses EEDI3 with an initial predictor from a NNEDI3 pass. It gets some of the benefits of each. It can be better than NNEDI3, but as you say is incredibly slow.

2) Yes, and you can increase EZKeepGrain beyond 1.0 for more grain. Exact value depends on source noise.

3) TR2 runs a final MDegrain on the output. It denoises (very slightly) and stabilizes some remaining shimmer and artefacts that may creep through. It is kinda assumed with Lossless=2 where it helps to prevent residual combing. You can switch it off, but if you do you're effectively setting Lossless=1. It is disabled on faster presets for speed.

Zaxooz
23rd September 2012, 23:54
Thanks for the answers!

There's some other stuff I'd like to ask you:

1) Is there somewhere in this thread a MatchPreset and MatchPreset2 comparison charts like the ones for main and noise processing presets in the first post?

2) What areas of QTGMC usage would see most quality improvement provided I set both MatchPresets to Slower (and should I override both or just the MatchPreset2 when using QTGMC( Preset="Slower", SourceMatch=3, Lossless=2, EZKeepGrain=1.0, NoisePreset="Slower", Sharpness=0.2 )?)
I did a test of my own with running them both as Slower and the speed drop wasn't drastic, about 20% at most, however, my test material had been of inferior sort (old blurry trailer) and would not warrant me making my mind up for sure. A purely theoretical interest then that is, QTGMC being too good at the point of introducing the settings in question. Thanks again.

-Vit-
24th September 2012, 00:09
There are no MatchPreset charts except the script itself. Those presets set internal settings that are not exposed in any other way. The quality improvements from MatchPreset tweaks are typically very tiny. A few less aliasing artefacts perhaps, some very minor increase in accuracy to the source. They made sense during development of the source match algorithm, but their effect is so minor that I never tweak them from the defaults myself. But as always, try it and see.

johnmeyer
24th September 2012, 17:44
wolfeeldiver:

If you search both here and in the Vegas forums for "Nick Hope," you will find quite a few workflows for using QTGMC with Vegas. Much of the discussion focused on how to create a workflow for uploading to YouTube (which requires deinterlacing). They also focused on how to work around the pathetic MP4 (AVC) encoding that Vegas provides in both their MainConcept and Sony codecs. Far better results were obtained using Handbrake and MeGUI.

fbs
25th September 2012, 18:16
any clue why it crashes after some minutes with noiseprocess=0 ? if it's 1, it won't crash even when running for 18h long!

I'm using the stable (not the latest) avisynth 2.6 mt with latest plugins ...

SetMemoryMax(800)
setmtmode(3, 12)
DirectShowSource("d:\ds000.avi")
setmtmode(2)
AssumeBFF()
crop(0, 1, -0, -1)
ConvertToYV12(interlaced=true)
ChromaShift(C=-6,L=-6)

qtgmc(preset="very slow",edithreads=1, TR2=2, pelsearch=1, blocksize=32, SrchClipPP=1, subpel=1, noiseprocess=0, RepChroma=false, ChromaMotion=false)

converttorgb32()

fbs
27th September 2012, 15:15
An out-of-bounds memory access (access violation) occurred in module 'mt_masktools-26'...
...reading address 00000000.

after 18h of processing.. new-new interface 2.6 mt..

Selur
27th September 2012, 15:37
I agree QTGMC_32-bit_Plugins_Vit-Mod works fine QTGMC 32-bit Plugins [Vit-2.6] crashes in mt_masktools-26 and basically all the updated tools,..

simcut
3rd November 2012, 19:35
@ simcut
What you describe could be real interlacing as well as it could be something different. We need a short unprocessed sample to help you. Cut out maybe 10 seconds from the VOB using DGindex, upload it to MediaFire and post the link. :)

Okay, didnt realise I can cut a vob sample using DGIndex, will have to research that, although the content is, erm, err....adult :P *embarrassed* :o

I actually bought DGIndexNV, will have to try & figure out how to cut part of the vob using that, how do I go about doing that? tried googling for it but was unable to find anything.

simcut
3rd November 2012, 19:42
Had another question btw, I have a source dvd where its recognised by DGIndexNV as 4:3 however there are 2 huge areas of black that have to be cropped out (when I crop them out its something like 60 top 60 bottom, if I do that, should I choose 16:9 for the resolution or keep it as 4:3 for encoding to mp4 format..

Also, the actual content is recognised as Interlaced by DGIndexNV, the only time I can see interlace lines is at the beginning where the video goes from black frames into the normal video, from that point on the video has no interlace visible whatsoever until the end of the scene where the video returns to black frames, and the interlace lines appear again, how should I encode it? Deinterlace it? Leave it as Progressive?

I hate how complicated they make these DVD's sometimes....

Hope someone can help :) Thx!

simcut
3rd November 2012, 21:51
Here's a sample of the vob file, its only like 11.5mb or something to download :)

http://www26.zippyshare.com/v/93528545/file.html

As you can see at the beginning of the clip, the lines of the tiles on the floor flicker, as does the door frame they walk through, and also the bottom of the door behind them to the left of the picture. Also the door handles in the background on the 2 doors to the left of the one they walk through. This happens a lot in some other movies I have. Is it Interlace Artifacts, or is it something else?

It's driving me bonkers! Really wanna get rid of it :)

Hope you can help...

Cheers :)

Pulp Catalyst
13th November 2012, 18:23
is it ok to use this version (3.33)

i'm asking as it's not here which is making me think perhaps not to use it.

http://www.spirton.com/uploads/QTGMC/QTGMC-3.33.avsi

Fullmetal Encoder
29th November 2012, 23:41
-Vit-

Are you still exploring a port of QTGMC over to VapourSynth? NNEDI3 has been ported though I'm not sure how complete it is. There may not be much to gain in speed but the stability should be much greater.

sneaker_ger
29th November 2012, 23:45
@Fullmetal Encoder
http://forum.doom9.org/showthread.php?t=166582

Fullmetal Encoder
1st December 2012, 00:59
@Fullmetal Encoder
http://forum.doom9.org/showthread.php?t=166582

Ah thanks, sorry about that. I changed the way I was checking the forums and missed that one. :o

byme
4th December 2012, 20:31
I have a question

the QTGMC, Placebo mode, I noticed that "sharpen" the image so decided
I want to know if it's all due to the sharpening, or if it depends on something else

What kind of sharpening using the QTGMC?
is possible extract the sharpening (or other filters that are used to improve the image) from QTGMC?.. for use with video already deinterlaced

thanks

(sorry for my english)

agni451
5th December 2012, 02:27
Any chance there will ever be a qtgmc ffmpeg filter developed? ffmpeg only uses yadif and it's nowhere near the quality of qtgmc. I wish I was an expert and could do it, but I'm not, even with ffmpeg's filter-writing guide (http://wiki.multimedia.cx/index.php?title=FFmpeg_filter_howto).

poisondeathray
5th December 2012, 02:48
Any chance there will ever be a qtgmc ffmpeg filter developed? ffmpeg only uses yadif and it's nowhere near the quality of qtgmc. I wish I was an expert and could do it, but I'm not, even with ffmpeg's filter-writing guide (http://wiki.multimedia.cx/index.php?title=FFmpeg_filter_howto).



I doubt it. Too many other dependencies and prerequisite filters. Everything else would have to be compiled with ffmpeg

fvisagie
6th December 2012, 08:03
Any chance there will ever be a qtgmc ffmpeg filter developed? ffmpeg only uses yadif and it's nowhere near the quality of qtgmc.

I'm not sure if this addresses your requirement, but to use QTGMC() with ffmpeg as is, is quite straight-forward. All you need to do is put QTGMC() (and any other Avisynth-related processing you want to do) into an .avs script and use that as ffmpeg input:

Input="input_file.avi"
FFIndex(source=Input, cachefile=Input+".ffindex", indexmask=-1, dumpmask=0, errorhandling=3, overwrite=false)
Audio=FFAudioSource(source=Input, track=-1, cache=true, cachefile=Input+".ffindex", adjustdelay=-1)
Video=SelectOdd(QTGMC(AssumeBFF(FFVideoSource(source=Input, track=-1, cache=true, cachefile=Input+".ffindex", seekmode=1, rffmode=0, width=-1, height=-1, colorspace="YV12")), Preset="Slower"))
AudioDub(Video, Audio)


ffmpeg -y -i "input_file.avi".AVS -an -vcodec libx264 -vpre fastfirstpass -vpre ipod640 -f rawvideo -b:v 1000000 -threads auto -pass 1 NUL
ffmpeg -y -i "input_file.avi".AVS -i "input_file.avi" -map 0:0:1:1 -map 1:1:1:1 -vcodec libx264 -vpre hq -vpre ipod640 -f ipod -b:v 1000000 -refs 2 -threads auto -pass 2 "input_file.avi".m4v


For encoding to iPod classic and Nokia N8 formats I use a batch file that generates and loads this .avs script if deinterlacing is required, before calling ffmpeg with the appropriate input. Let me know if you want to look at it.

SubJunk
6th December 2012, 21:15
Yep like fvisagie said, FFmpeg supports using AviSynth inputs, so it can use any AviSynth script

ChibiBoi
7th December 2012, 04:42
I love this script a lot! But I have a problem, I'm trying to transfer my VHS fansub caps, and the subtitles are hardsubbed, so sometimes when I try to use the script, it makes the subtitles flash/jitter/expand and contract, I'm not sure which ideal settings can fix this:
AVISource("C:\Users\Ty\Desktop\sms vhs test.avi", audio=false).AssumeFPS(30000,1001)
converttoyv12(interlaced=true)
assumetff()
qtgmc(preset="medium")
srestore(frate=23.976)
crop(2,0,-2,-4)
lanczos4resize(640,480)
fastdegrain()

I also have uploaded the original footage:
http://www.mediafire.com/?qgtn0qzdh3l71ck
and the filtered footage:
http://www.mediafire.com/?kz7owd614re68kd
The problem that I'm talking about is most apparent at the 10 second mark. I'm not quite sure what the correct terminology for this is. Is this the horizontal shimmering that's talked about in the QTGMC manual?

Taurus
8th December 2012, 15:54
@ChibiBoi
I dont know why you are going for 23.976.
But anyway...Try this:
AVISource("sms vhs test.avi", audio=false).AssumeFPS(30000,1001)
converttoyv12(interlaced=true)
assumetff()
qtgmc(preset="medium")
selecteven()
srestore(frate=23.976)

or this

AVISource("sms vhs test.avi", audio=false).AssumeFPS(30000,1001)
converttoyv12(interlaced=true)
assumetff()
QTGMC(TR0=2, TR1=1, TR2=3, Rep0=0, Rep1=0, Rep2=0, Edimode="NNEDI3",edithreads=1,precise=true,truemotion=true)
srestore(frate=23.976)
Both slow as hell.
The edithreads are adjustable.
And maybe try an Avisynth MT version for speed.
The colours are bleeding and some halos in your source.
But this is another story.

ChibiBoi
10th December 2012, 01:28
@ChibiBoi
I dont know why you are going for 23.976.
But anyway...Try this:


or this

AVISource("sms vhs test.avi", audio=false).AssumeFPS(30000,1001)
converttoyv12(interlaced=true)
assumetff()
QTGMC(TR0=2, TR1=1, TR2=3, Rep0=0, Rep1=0, Rep2=0, Edimode="NNEDI3",edithreads=1,precise=true,truemotion=true)
srestore(frate=23.976)
Both slow as hell.
The edithreads are adjustable.
And maybe try an Avisynth MT version for speed.
The colours are bleeding and some halos in your source.
But this is another story.
Thanks, I'll try it. I did a test with preset="slow" for another tape, and the flickering seemed less prominent. The reason I tried to get it to 23.976 is because that's the original animation speed, but it was converted to 29.970 using blended fields and whatnot, so I wanted to get rid of those blendings. And as for haloing and bleeding, I'm not really too concerned with that :p I think I could get something to clean up the bleeding though (I'm worried a dehalo script will change the crispness of the subtitles)

asdfen
15th December 2012, 10:47
thank you
awesome script

DJ-1
22nd December 2012, 00:29
Hi, I got a question regarding the version of ms redistributetable atl updates..
I have a Win7 64bit OS...
NO avisynth (as the Hybrid GUI(32bit) as its own avisynth.dll)

I'm importing PAL DVD (with just 1title/pgc/angle (as avisynth support DVD only in this way))

When trying to preview the clip (with QTGMC de-interlacing) b4 output I'm getting an "error loading eedi3.dll error code 0x36b1"

A possible fix is to install the ms 2005 or 2008 atl update, BUT my pc already has ms redistribute 2010, so do I still need the patched version.... Or does the 2010 version cover it?

I've tried in the relevant thread, but currently the Dev of Hybrid doesn't know what " error code 0x36b1" means for avisynth....

I'm just searching to try and find out if it's related to the atl patches or the eedi3.dll itself....

Thanks.

StainlessS
22nd December 2012, 05:38
From MSDN
http://msdn.microsoft.com/en-gb/library/windows/desktop/ms681384%28v=vs.85%29.aspx

-------------------
ERROR_SXS_CANT_GEN_ACTCTX

14001 (0x36B1)

The application has failed to start because its side-by-side configuration is incorrect.
Please see the application event log or use the command-line sxstrace.exe tool for more detail.
-------------------

Perhaps the above will enable some W7 user to assist.

Application event log available on W7 via "[Right Click]Computer/Manage/Event Viewer" (if "My Computer" on Desktop) or,
Via Windows Explorer -- "[Right Click]Computer/Manage/Event Viewer"

EDIT: For a related problem with MS Office Access 2010:- http://support.microsoft.com/kb/2525435

EDIT: and the source for the previous link:http://forum.worldoftanks.com/index.php?/topic/133678-launcher-critical-error/page__st__20__pid__2102316#entry2102316

Selur
22nd December 2012, 15:13
As the Hybrid author I have to say: I have no clue why it's not working for him.
I can't reproduce the problem on any of my Windows machines (Windows XP 32, Windows 7 32/64bit)
@DJ-1: do you use some personnel firewall or similar? (if so try if it helps to disable it) Last time a user had a problem which I couldn't replicate at all it turned out that his "ZoneAlarm Firewall Free" interfered with Hybrid to make it crash randomly. (couldn't reproduce that either by installing "ZoneAlarm Firewall Free" here, but it solved the problem for him, so my be you got a similar problem.

Cu Selur

Ps.: the avisynth.dll Hybrid is using is the normal Avisynth 2.6 MT dll.

Taurus
23rd December 2012, 19:06
"I'm getting an "error loading eexi3.dll error code 0x36b1"
This is a typo, right?
The real name should be "eedi3.dll".
Better post your whole script.

Selur
23rd December 2012, 19:15
That was a typo he made. :) (Hybrid calls eedi3.dll, otherwise it wouldn't work for me too ;))

Selur
28th December 2012, 19:58
Problem is that eedi3.dll depends on some vcomp dll -> can someone upload a eddi3.dll together with the vcomp.dll it requires?

Taurus
28th December 2012, 20:40
Problem is that eedi3.dll depends on some vcomp dll -> can someone upload a eddi3.dll together with the vcomp.dll it requires?
I have a working version of eedi3 and many vcomp.dll's :(:o
Where can I upload the files for you?
Please not mediafire.
Edit:
Aaah, I forgot to mention this is on WinXp32bit.

Selur
29th December 2012, 05:58
@Taurus: send you a pm

related question: will it be enough to put the vcomp.dll next to eedi3.dll or does it have to be inside the windows/system32 folder?

-> seems like the only way to get is running is to install:
http://www.microsoft.com/en-us/download/details.aspx?id=3387 (Visual Studio 2005 runtime)
and
http://www.microsoft.com/en-us/download/details.aspx?id=5638(Visual Studio 2005 runtime SP1)
->would be cool if someone could compile eedi3 in with a newer version installing 2005 runtime when we are nearly @2013,...
(copying the vcomp.dll from the 'Visual Studio 2005 runtime SP1' leaves me with interlockedIncrement and interlockedDecrement missing from the kernel32.dll, seems like eedi3.dll tries to load windows/system32/kernel32.dll, shouldn't it load windows/syswow64/kernel32.dll ??)

SEt
29th December 2012, 11:23
Here is rebuild of eedi3 without OpenMP: http://www.mediafire.com/?hthznhnhe5h59g5

Selur
29th December 2012, 11:27
Works without a problem. THANKS SEt!!

Maxiuca
7th January 2013, 16:22
I have a problem with the way motion blur is being applied.

I've noticed the problem on a real-life footage I'm just working with. I've created a test sequence to look further into it and try to find a parameter responsible, but so far no luck.

The test footage is basically a static background with an object moving across it.

Here is a frame from that test footage:
http://fixafilm.eu/temporary/doom9/orginal.jpeg

The deinterlace step is (of course :) ) fine:
http://fixafilm.eu/temporary/doom9/deinter_shutter_0_crop.jpegLink to full image (http://fixafilm.eu/temporary/doom9/deinter_shutter_0.jpeg)

The problem starts when I want to add motion blur.
The blur itself looks really nice but the problem is the area where it's being applied. It looks like the motion (used to determine which area to blur) is calculated from both fields, so the blur is also being applied to area with motion on the other field so in the end it creates a "ghost". This ghost is usually next to the moving object, so over some backgrounds it will give a "smearing" effect.

Here is the same frame, but with motion blur on:
http://fixafilm.eu/temporary/doom9/deinter_shutter_180_crop.jpg
Link to full image (http://fixafilm.eu/temporary/doom9/deinter_shutter_180.jpeg)


So I was wondering whether it is possible to calculate the motion for the motion blur from only one field?

I've read the manual very thoroughly, spent a lot of time doing the tests but haven't found a corresponding switch.

2Bdecided
18th January 2013, 18:08
I asked the folk on the Sony Vegas forum (http://www.sonycreativesoftware.com/forums/ShowMessage.asp?MessageID=754540&Replies=10) and the general consensus is that 50i @ 1/50 or 60i @ 1/60 equates to a 180 degree shutter angle.
I wish I'd spotted this sooner. IMO the people you asked on the Sony Vegas forum didn't know what they were talking about. A 360 degree shutter (mechanically impossible btw!) captures everything. 1/50th 50i captures everything. 1/50th 50i is a 360 degree shutter. 1/60th 60i is a 360 degree shutter.

1/120th 60i is a 180 degree shutter.

1/48 at 24p is also a 180 degree shutter.

The shutter relates to the individual moments in time that you capture. For interlaced footage, these individual moments are fields. For progressive footage, these individual moments are frames. It's really not that complicated (when you get it right!).

Cheers,
David.

nhope
18th January 2013, 19:13
... The shutter relates to the individual moments in time that you capture. For interlaced footage, these individual moments are fields...

Not sure about that, David. My Sony Z1's shutter defaults to 1/60 at 60i. By your theory that makes it as 360 degree shutter. I've always assumed it's actually only open half the time (i.e. 180 degree equivalent), but I've never tested it. In other words, at least in Sony's case, I suspect the shutter relates to frames, not fields.

It doesn't really help that 50i and 60i should probably be called 25i and 30i.

2Bdecided
22nd January 2013, 16:43
Not sure about that, David. My Sony Z1's shutter defaults to 1/60 at 60i. By your theory that makes it as 360 degree shutter. I've always assumed it's actually only open half the time (i.e. 180 degree equivalent)Well then it's not 1/60th is it, because there is no one in the world who argues about the definition of seconds (or fractions there of), or the durations of fields in 60i video - the two are identical (to within 1000/1001 ;) ) and if a camera says "1/60th" when it means "1/120th", it is simply wrong.

However, I suspect it's absolutely correct. Many video cameras default to 1/50th for 50i and 1/60th for 60i - i.e. 360 degree shutter, or (as near as damn it as you can manage easily) Nyquist temporal sampling - i.e. not leaving anything out. It avoids stutter. Cheaper cameras often shorten the shutter to combat lots of light, leading to strobing.

It doesn't really help that 50i and 60i should probably be called 25i and 30i.I think all sensible people know that both mean the same thing. Some may wish to argue about which is more correct, but that's a different matter. There is no confusion, since there is no video format with 12.5 interlaced fields per second, nor one with 100 interlaced fields per second (though some old CRTs ran their displays at this rate!).

Cheers,
David.

kolak
22nd January 2013, 17:05
Hehe- BBC guys say 25i (or even i25 if I remember correctly)- I don't know in what sense this is better than 50i. For me 50i makes more sense then 25i. 25p is 25 frames/sec, so 50i is 50 fields/sec. 25i makes no sense, as we should be talking about fields, not frames in case of interlaced signals.

Selur
22nd January 2013, 17:10
25i = 25 interlaced frames :D
I like this notation more since it always indicates frames per seconds and not one time fields and one times frames. ;)

Poutnik
22nd January 2013, 17:18
I use the latest SET's MT Avisynth 2.6, but the testing plugin pack for AVS 2.6 give me Memory read access violation errors for most of plugins.
( I.e. when I replaced the affected plugin one by one, it occurred again and again at some other plugins from the package ).

Currently I use Plugins from Vit's Modded package.

Didée
22nd January 2013, 19:13
coded_frames/coding_type/number_of_samples. 25i25, 25i50, 30i60, 30i24, all confusion gone.

But hey, it would be too boring if everyone knew what everyone else is talking about. Confusion and misunderstanding keeps people busy.

LigH
24th January 2013, 16:26
is it ok to use this version (3.33)

i'm asking as it's not here which is making me think perhaps not to use it.

http://www.spirton.com/uploads/QTGMC/QTGMC-3.33.avsi

Most probably yes. As far as I understand the changes, they are more than just "cosmetic".

bcn_246
25th January 2013, 05:28
# --- LATEST CHANGES ---
#
# v3.33
# - Increased maximum value for Rep0, Rep1 and Rep2 to 7 (from 5). Higher values help with flicker on static detail, potential for minor motion blur
# - Bug fix for the fact that Bob always outputs a BFF clip regardless of field order of input (thanks ajp_anton)
# - Improved generation of noise (NoiseDeint="Generate") for noise bypass / EZKeepGrain
# - Minor change to denoising

I've been using it for ages, not seen any issues...

trevorjharris
25th January 2013, 13:11
I cannot get QTGMC 3.33 to run multithreaded without crashing in mt_masktools-26.dll. I have a HP Z800 with dual xeon X5660 (6 core) and 48gb of memory and I am using virtualdub.. I removed all traces of my previous avisynth and installed avisynth 2.6 alpha 4. I then installed avisynth 2.6 MT dated 16-5-2012 and the latest plugins pack posted by vit. This is the script I used:

SetMemoryMax(400) # Optional line. Leave it out at first. See below for value M
SetMTMode(5, 6) # See below for value X
avisource("00218.avi")
assumetff()
converttoyv12(interlaced=true)
SetMTMode(2)
QTGMC( Preset="fast", EdiThreads=3 ) # Choose preset based on overall speed/quality you want. See below for value Y
selecteven()
#Distributor() # This line may or may not be necessary, try removing it and see if you get more speed

I have tried the other plugins pack without success. Please can anyone help.

LigH
25th January 2013, 13:22
You may try using mt_masktools-25.dll as you only need YV12 anyway, it is probably more stable. And you may want to reduce the number of tasks as you will probably multiply 3×EDI with 6×QTGMC.

trevorjharris
25th January 2013, 16:03
Thanks for your help.
Actually I seem to have found an answer. I set virtualdub to be large address aware and it is much more stable. This seems to be my optimum setup:

SetMemoryMax(1000)
SetMTMode(5, 4)
avisource("00218.avi", audio=false)
assumetff()
converttoyv12(interlaced=true)
SetMTMode(2)
QTGMC( Preset="slow", edithreads=2)
selecteven()
#Distributor()

I find it rather odd that I have to setmtmode to such a low value as I have 24 threads available. CPU usage is only about 16% and I get 5 fps from an hdv clip. If I increase the threads I get over 80% usage but it runs alot slower.

I think it is about time avisynth and all its filters were 64bit and avoid all this sillyness.:)

LigH
25th January 2013, 16:09
If it were so easy to port the AviSynth source to 64-bit with a stable result, it were already done. Instead, its "coding style" (cough) seems to be the reason why it doesn't finish...

Selur
25th January 2013, 16:09
I find it rather odd that I have to setmtmode to such a low value as I have 24 threads available.
Your problem is probably that the memory the threads need combined with the SetMemoryMax are simply cracking the limit of RAM 32bit Avisynth can handle,...

Mystery Keeper
25th January 2013, 16:10
Offtopic, but I agree. AviSynth AND its plugins need to be made x64 aware. Right now even if I use x64 AviSynth and plugins - they crash at reaching 4GB memory load.

trevorjharris
26th January 2013, 16:21
A couple of questions:

Please can some one tell me if there is any difference in using FPSDivisor=2 or selecteven() to get the original frame rate.

The other concerns color spaces.

I am using DebugMode frameserver which delivers YUY2 and compressing with cineform which also uses YUY2, so I am using QTGMC in YUY2 mode to avoid conversions. My ultimate destination is Blu-ray which is YV12.

My question is will I loose quality if I use QTGMC in YV12 mode by converting to YV12 before deinterlacing. I have always felt that it is best to minimise color space conversions but I have wondered if deinterlacing in YUY2 might give better quality.

Thankyou for your help.

LigH
26th January 2013, 16:50
FPSDivisor belongs to the Motion Blur feature; SelectEven instead removes each second output frame regardless of the used features.

YUY2 represents Chroma Subsampling 4:2:2; YV12 represents Chroma Subsampling 4:2:0. Indeed, the vertical chrominance resolution is higher in YUY2. If you have enough time and available RAM, a late conversion may keep a little more quality until the end, at the cost of 4:3 required memory per cached/processed video frame and time to process so much more data; if you can recognize the difference, is another topic.

Pulp Catalyst
28th January 2013, 11:52
hi, with 3.32 or 3.33 script,

the following works fine, never get a crash

global MeGUI_darx = 123
global MeGUI_dary = 92
SetMemoryMax(1024)
SetMTMode(5,4)
LoadPlugin("D:\Program Files (x86)\MeGUInew\tools\dgindexnv\DGDecodeNV.dll")
DGSource("E:\Working\qi4nlowk.vns\War03.dgi",fieldop=0)
SetMTMode(2,2)
QTGMC( Preset="Slow" )
SelectEven()
#deinterlace
crop(6, 0, -10, 0)
#resize
#denoise



however when using Progressive mode, i always (ALWAYS) get a crash around the 50-80% of the encoding process,

the following script is what i use

global MeGUI_darx = 123
global MeGUI_dary = 92
SetMemoryMax(1024)
SetMTMode(5,4)
LoadPlugin("D:\Program Files (x86)\MeGUInew\tools\dgindexnv\DGDecodeNV.dll")
DGSource("E:\Working\qi4nlowk.vns\War03.dgi",fieldop=0)
SetMTMode(2,2)
QTGMC( Preset="Slow", InputType=1 )
#deinterlace
crop(6, 0, -10, 0)
#resize
#denoise



now i use Avisynth MT 2012.08.28 although i have also tried 2012.05.16 to no avail,

i have tried several different DVD's all the same

i have also tried a combination within the script

SetMTMode(5,4)
5,2 and 5,6 nothing

SetMemoryMax(1024)
512 and 1536

weird why it ALWAYS works with using the first method, but the other method always fails (crash)

any ideas why this could be happening, really appreciate it the feedback,

for the time being, i've resorted too LimitedSharpenFaster(), which is OK really..... but not sure if I'm missing out by NOT using QTGMC for progressive sources?

Mole
28th January 2013, 12:07
I also usually get crash in the middle or at the end when using InputType=1.

My remedy is to use SetMTMode(5,0)

It won't be multithreaded, but at least it'll finish 100%, albeit slowly.

yup
28th January 2013, 12:14
Pulp Catalyst!
SetMTMode(5,4)
and after
SetMTMode(2,2)
useless number threads set at first call SetMTMode
try
SetMTMode(5,2)
and after
SetMTMode(2)
and report
Go to Win7 x64 or add memory and use LAA. When I am upgrade my PC to Win7 x64 QTGMC became more stable.
yup.

Pulp Catalyst
28th January 2013, 12:55
my combinations have already came close to that, and SetMTMode(2) is not that much difference to SetMTMode(2,2) but i put two in to keep the number even

i'm on x64 with 8gb, but i have a strong feeling that this crash is not memory related,

but i'm not skilled enough to analyse the script to see what differs in operation when using InputType=1 as opposed to without this line, for example does Input=1 run an extra plug-in that maybe responsible for not playing nice?

LigH
28th January 2013, 14:39
As far as I remember, the number of threads must not be set in any call of SetMTMode except the very first. At least it should not change the number of threads again in later calls. I am not sure if it may cause instability trying so, only a look into the AviSynth-MT source code will prove if it is safe or unsafe to even try.

AviSynth Wiki: Multithreading functions (http://avisynth.org/mediawiki/Internal_functions/Multithreading_functions)

threads: Number of threads to use. Set to 0 to set it to the number of processors available. It is not possible to change the number of threads other than in the first SetMTMode. Default value 0.

Pulp Catalyst
29th January 2013, 03:37
didn't make any difference, tried several more different combinations, also changed masktools versions, and tried several backdated avisynth versions.... all to no avail unfortunately,

it's not a major issue mind, as like i said above QTGMC works really well in default mode "QTGMC( Preset="Slow" )
SelectEven()" and it was designed for interlaced material in mind, in fact i can't recollect ever having a crash with it when using it for interlaced material, i guess i'll just have to accept that when it comes too progressive material i can't use it!

looking forward to the day though that the mess behind avisynth is once and for all settled... there seems to be a lot of branches now...

i have a lot of hope though in this new vapoursynth.... looks promising (of course all the old plugins would have to be ported.... and most of the developers aren't around no more.... getting hold of permissions will be a near impossible task for some of them)

but the extensive support behind vapoursynth is really starting to come into it's own now, been following it for a long time.... to rewrite a foundation such as avisynth.... my hat goes off!

nhope
29th January 2013, 13:21
A couple of questions:

Please can some one tell me if there is any difference in using FPSDivisor=2 or selecteven() to get the original frame rate.

I don't think there is a difference. I used to use selecteven() and now I use FPSDivisor=2. If in doubt do a test with each and A/B compare them in 2 tracks in your NLE while looking at the NLE's waveform scope. I suppose FPSDivisor=2 might be doing a selectodd() though.

I am using DebugMode frameserver which delivers YUY2 and compressing with cineform which also uses YUY2, so I am using QTGMC in YUY2 mode to avoid conversions. My ultimate destination is Blu-ray which is YV12.

My question is will I loose quality if I use QTGMC in YV12 mode by converting to YV12 before deinterlacing. I have always felt that it is best to minimise color space conversions but I have wondered if deinterlacing in YUY2 might give better quality

Are you using Sony Vegas? That works internally in RGB, so I always frameserve out of it in RGB24. See the posts from Frameserver author Satish in this old thread (http://www.sonycreativesoftware.com/forums/showmessage.asp?forumid=4&messageid=301018).

So if you frameserve in YUY2 then Frameserver is just doing a conversion. I prefer to do such a conversion later in AviSynth. If Cineform will handle YV12 then I would convert to YV12 in AviSynth before deinterlacing.

I do use YUY2 instead of YV12 if I am re-interlacing later the script for DVD using Weave, because of this (http://forum.doom9.org/showthread.php?t=161011).

If you are using another NLE such as Premiere Pro then the above might be irrlevant to your case since it's not necessarily delivering RGB to Frameserver. See the Frameserver usage instructions (http://www.debugmode.com/frameserver/usage.htm).

trevorjharris
31st January 2013, 12:21
My workflow is now:

Use mvctoavi to convert mvc to cineform.
Use virtualdub and qtgmc to deinterlace and change to 23.976 to cineform.
Use firstlight to mutiplex left and right into a cineform 3d file.
Edit in Premiere Pro and export as cineform 3d.
Import to Vegas Pro and render avc and mvc file.
Import to DVD Architect Pro.

Cineform is YUY2 10 bit so after deinterlacing 10 bit YUY2 is preserved till Vegas Pro. It is a great pitty the qtgmc is only 8bit.

I am coming to the conclusion that it best to deinterlace before editing. When I tried editing interlaced video in Vegas and I got some horible artifacts. I suspected the Vegas was deinterlacing and reinterlacing to render. I have since learned that you must not set vegas interlace method to none when editing interlaced video. Premiere pro is a much better editor than Vegas as it can use YUY2 and up to 32 bits. I use Vegas just for encoding MVC.

It is very important to make make Virtualdub "Large Address Aware" particularly on 64bit machines. Since doing this I have not had a single crash from qtgmc.

2Bdecided
31st January 2013, 17:25
Anyway, any chance of correcting the shutter angle?
http://forum.doom9.org/showthread.php?p=1611626#post1611626

bcn_246
1st February 2013, 08:01
I use the latest SET's MT Avisynth 2.6, but the testing plugin pack for AVS 2.6 give me Memory read access violation errors for most of plugins.
( I.e. when I replaced the affected plugin one by one, it occurred again and again at some other plugins from the package ).

Currently I use Plugins from Vit's Modded package.

I found exactly the same thing. Have .NET v4.5, Visual C++ 2005/2008/2010 (x86 & x64) installed.

Have reverted to the original -Vit- mod pack and havn't had any issues (except with masktools - had to revert to the standard a48 in order to get any support for YV16/YV24.

Mole
2nd February 2013, 03:49
When using FPSDivisor=2

Does it discard the frames before or after the denoise routines?

There may be a difference regarding how temporal noise is processed if the denoise routines are performed after the decimation.

dioxin
6th February 2013, 11:30
Hi! In some anime there's such artifacts as they can fix it?
http://s1.ipicture.ru/uploads/20130130/T2wRZuw2.pnghttp://s1.ipicture.ru/uploads/20130130/axaZXOOI.png

LigH
6th February 2013, 11:44
Do not try to deinterlace Anime with QTGMC. Anime has no continuous interlacing. Motion prediction will fail.

Mole
6th February 2013, 12:32
Did you crop before using QTGMC? If so, you must either crop by 4 pixels, or use crop after QTGMC.

For example, crop top 6 pixels is not good, you must crop 4 or 8.

You will get effect like that if you crop before QTGMC.

TheSkiller
6th February 2013, 15:10
This effect is due to either upsampling the chroma in a progressive fashion while the frame was actually showing interlacing (before IVTC or deinterlacing) or because the field order of the chroma – but not the luma – was swapped by cropping beforehand.

You cannot fix it afterwards without nuking the chroma, it's screwed up.

kolak
11th February 2013, 21:15
I use TFM to find progressive frames and than QTGM for deinterlacing, but sometimes progressive frames are detected and processed by QTGMC (no way to make TFM 100% accurate).

Deinterlacing is more important, but are there any settings in QTGMC, which would help to keep other frames more as source?

mastrboy
11th February 2013, 21:52
I use TFM to find progressive frames and than QTGM for deinterlacing, but sometimes progressive frames are detected and processed by QTGMC (no way to make TFM 100% accurate).

Deinterlacing is more important, but are there any settings in QTGMC, which would help to keep other frames more as source?

Read the "manual" on the Sourcematch parameter.

kolak
11th February 2013, 23:08
SourceMatch is to slow for HD even with very fast preset.

simcut
16th February 2013, 01:40
Had a quick question, does it matter what order you put things in the avs script, for example if I put the crop info before the QTGMC line, or the SelectEven before/after the QTGMC line? whats the correct structure?

An example of how I have it right now is:-

# Set DAR in encoder to 16 : 9. The following line is for automatic signalling
global MeGUI_darx = 16
global MeGUI_dary = 9
LoadPlugin("C:\Program Files (x86)\MeGUI_2153_x86\tools\dgindexnv\DGDecodeNV.dll")
DGSource("D:\Encode\SATA 1\Test.dgi",fieldop=0)
AssumeTFF()
crop(0, 2, 0, -2)
QTGMC( Preset="Medium" )
SelectEven()

is that okay?

Thanks in advance

Mole
16th February 2013, 01:54
Crop before QTGMC can save processing time, especially if you're cropping out the letterbox. However because of YV12, the crop must be 4 pixels at a time.

So in your case, if you're only cropping 2 pixels, you'll have to put the crop after QTGMC.

Alternatively, one can crop out most of the letterbox first, then crop the rest 2 pixels after QTGMC like this:

crop(0, 72, 720, 432)
QTGMC( Preset="Medium", FPSDivisor=2)
crop(0, 2, 720, 428)

Will speed up QTGMC considerably.

simcut
16th February 2013, 02:05
Crop before QTGMC can save processing time, especially if you're cropping out the letterbox. However because of YV12, the crop must be 4 pixels at a time.

So in your case, if you're only cropping 2 pixels, you'll have to put the crop after QTGMC.

Alternatively, one can crop out most of the letterbox first, then crop the rest 2 pixels after QTGMC like this:

crop(0, 72, 720, 432)
QTGMC( Preset="Medium", FPSDivisor=2)
crop(0, 2, 720, 428)

Will speed up QTGMC considerably.

Thanks for the quick reply, but I'm a bit confused with what you are saying, sorry, I am relatively new :)

Mole
16th February 2013, 02:08
If you crop before, it must be divisible by 4 pixels. If you're only cropping 2 pixels, it must be placed after.

Is this too difficult to understand??

simcut
16th February 2013, 02:16
If you crop before, it must be divisible by 4 pixels. If you're only cropping 2 pixels, it must be placed after.

Is this too difficult to understand??

Okay, thats better, thanks. Just those values in the example you gave confused me a bit, plus it's late here -.- I need sleep

Mole
16th February 2013, 02:19
The examples were not for your particular case, but to illustrate that if you're going to crop out quite a lot, you can crop most of it first, then the rest 2 pixels after.

simcut
16th February 2013, 02:23
The examples were not for your particular case, but to illustrate that if you're going to crop out quite a lot, you can crop most of it first, then the rest 2 pixels after.

Yeah I see what you are saying now

If I was just cropping just 2 pixels and put the line before the QTGMC line, what issues would it cause exactly?

Would it solely just be impacting processing times, or would it have any other impact?

Mole
16th February 2013, 02:31
Because of the colorspace YV12, your output may be screwed up. It will kinda look like a color "shadow" in movements.

Just 2 pixels wouldn't really impact on processing time.

LigH
16th February 2013, 07:08
Oops, there was already half a page more...

Selur
16th February 2013, 09:19
crop should normally always behind deinterlacing,...

laz1989
18th February 2013, 19:16
Can someone please,help a newbie using this script on some PAL interlaced video? PM me.

manono
18th February 2013, 21:26
Can someone please,help a newbie using this script on some PAL interlaced video? PM me.
We don't work like that. What is shared here is shared for everyone that might come after. Please post an untouched sample of the video (10 seconds with steady movement will be plenty), and the script you're trying. Let us know of any specific problems or error messages you're receiving from VDub. Read the included doc 3 or 4 times. It's very complete and very good. Also study the first post in this thread:

http://forum.doom9.org/showthread.php?t=156028

laz1989
18th February 2013, 22:04
I tryed with veryfast preset and fast..only 24 fps max,with very very slow speed,i don't care about speed but i want 25 fps.All day this i was doing,then i will remain to Yadif,thanks.

Selur
18th February 2013, 22:08
i don't care about speed but i want 25 fps
okay,... are you using Avisynth MT? If not, it should speedUp the whole thing a lot, assuming you got the cpu power,...

kolak
18th February 2013, 22:19
Are you talking about processing speed or final video output fps?
If you feed QTGMC with PAL source you can't get 24p- it will be 50p by default.

Use avisynth 2.6MT- you will find it on doom9.

setmemorymax(768) - try 512 or 1800 if you use patched Vdub
setmtmode(3,threads)
avisource() or ffvideosource() etc
setmtmode(2)
qtgmc(preset="medium")
selecteven() if you want 25p output instead of 50p

Set threads to number of cores in your PC- for QTGMC you want i7 4 cores or better to have decent speed.
If you have to low speed change preset to faster one. If you have crashing reduce number of threads, read about Large Address Aware patch and use patched Vdub or use mp_pipeline.
If still not happy don't use QTGMC as it's not for your needs.

laz1989
18th February 2013, 22:42
About procession output fps. I will try.thanks.so..to install that 2.6 MT from doom9..NOT that 2.6 Alpha stage from sourceforge.

manono
19th February 2013, 00:45
Get everything from the first post in this thread, the one to which I linked last time. And if your source is 25fps you'll get 50fps out of QTGMC, or 25 fps with SelectEven/Odd added afterwards. You'll never get 24fps. Unless maybe you're using QTGMC together with SRestore. Anyway, there are reasons why I asked for a sample. I'm always suspicious when PAL guys say their source is interlaced because so often it's only been encoded as interlaced and the content isn't interlaced at all. Or it's field-blended and has to be unblended rather than just deinterlaced. Or it's phase-shifted.

Groucho2004
19th February 2013, 01:27
so..to install that 2.6 MT from doom9..NOT that 2.6 Alpha stage from sourceforge.
Just to avoid misunderstanding - SEt's 2.6 MT is based on an earlier Alpha of Avisynth 2.6.

LigH
19th February 2013, 08:23
manono, I wonder if the processing speed is confused with the clip framerate...

laz1989: Do not try to use QTGMC as real-time deinterlacer (e.g. in ffdshow's AviSynth page or as MediaPlayer input).

AviSynth scripts were never meant to be used as real-time video filter. Quality takes its time. Even if Q(=Quick)TGMC may be faster than its parent...

laz1989
19th February 2013, 11:49
I will give it a try with kolak settings when i get back from work.
@Ligh:I don t use it at real-time deinterlacer.
My mistake,sorry,with "veryfast" and "fast" i got 50 fps output
http://i1284.photobucket.com/albums/a572/laz1989/test_zps6bb271ae.png ( one frame and MeGui scan)
https://mega.co.nz/#!AExDRQTB!OsTlq3wn7ru7v2C5zarRIDxizc5pcv6TjCtXQ6EiPMw sample!
So,anybody ?

strangeluck
19th February 2013, 21:43
My mistake,sorry,with "veryfast" and "fast" i got 50 fps

Make sure you're using SelectEven() to retain the original frame rate, default behavior provides a smoother doubled frame rate.

laz1989
19th February 2013, 22:03
Yeah,i tryed.i will remain at Yadif,if my source is really interlaced,MeGui says other thing how i post in my capture in last post.If someone can help me take the best quality from a video,like that sample.i will be happy.

wonkey_monkey
21st February 2013, 09:29
i will remain at Yadif,if my source is really interlaced

It isn't!

laz1989
21st February 2013, 10:42
Understand,then the proper way is to encode it like this ? whitout any kind of deinterlacing ?

LigH
21st February 2013, 11:17
Your example.ts may be encoded in interlaced mode, according to MediaInfo; but the video content has no combing, the Bob test reveals pairs of same-time fields. A proof that it is in fact not interlaced, and therefore should not be deinterlaced.

The interlacing encoding mode was probably forced by the 1080 resolution.

laz1989
21st February 2013, 11:52
https://mega.co.nz/#!lII2CZRI!CRcrbyFa_Cp9NDKibfluvTP4Wp8bOEQ4dyf79FWyjMY
how about this ?

manono
21st February 2013, 12:11
how about this ?
Interlaced. Just watch it with any player with the deinterlacer turned off. Or open it in a script (I used FFVideoSource). LigH's method of bobbing it is perhaps the best because it will catch video with out-of-phase fields which are really progressive once the fields are lined up properly. When bobbed, this one shows every field/frame to be different which wasn't the case with the earlier one.

laz1989
21st February 2013, 12:16
Thanks for all your advice guys,and excuse me for all begginer questions.
https://mega.co.nz/#!YRZBgDrR!LA99_AtOwj838pVgTOA_5nhRz9Mqdj74D7NgZ3nRBCE Yadif.
https://mega.co.nz/#!Bd5CTIJD!B0qRC3kf8ewVGJXiokoSeyczGZ1oSxMrf9KSiYqHcoE QTGMC with SelectEven() with bob is the same playback.

InTheLight
22nd February 2013, 01:45
Hey all, hoping for some pointers...

Right now I'm using TFM to decimate my files - works great expect for occasional residual combing here and there, which I'm trying to catch with QTGMC via 'clip2'.

This works great, however in some spots QTGMC destroys the picture with shimmer, jumps and blur.

Below is a situation where TFM decimates fine, but PP still picks it up as combed and passes it along to QTGMC, which then destroys it. Everywhere else TFM-PP-QTGMC works clean and clear. If I reduce the PP sensitivity slightly so it skips the trouble scenes, it then begins missing combs elsewhere. I also can't simply "skip" the frames manually as this type of scene makes up a good majority of the series I'm working on.

TFM-QTGMC Example (http://www.mediafire.com/?4gw6y7gvo1dqn79)(4MB)
Raw Example (http://www.mediafire.com/?dhb2h8u445q6b2j)(12MB)

So not sure what to do with this. I don't mind allowing QTGMC to process the area, and I understand that this type of scene is on the extreme end of things just by its nature, but is there a way to do it without destroying the picture?

Still trying to find my way around and any help is appreciated.

poisondeathray
22nd February 2013, 02:20
Hey all, hoping for some pointers...

Right now I'm using TFM to decimate my files - works great expect for occasional residual combing here and there, which I'm trying to catch with QTGMC via 'clip2'.

This works great, however in some spots QTGMC destroys the picture with shimmer, jumps and blur.

Below is a situation where TFM decimates fine, but PP still picks it up as combed and passes it along to QTGMC, which then destroys it. Everywhere else TFM-PP-QTGMC works clean and clear. If I reduce the PP sensitivity slightly so it skips the trouble scenes, it then begins missing combs elsewhere. I also can't simply "skip" the frames manually as this type of scene makes up a good majority of the series I'm working on.

TFM-QTGMC Example (http://www.mediafire.com/?4gw6y7gvo1dqn79)(4MB)
Raw Example (http://www.mediafire.com/?dhb2h8u445q6b2j)(12MB)

So not sure what to do with this. I don't mind allowing QTGMC to process the area, and I understand that this type of scene is on the extreme end of things just by its nature, but is there a way to do it without destroying the picture?

Still trying to find my way around and any help is appreciated.


Are you sure you even need clip2 ? Do you have a sample where it's required for "combing" ?

On this sample just turn PP off. PP=0

MPEG2Source()
AssumeTFF()
TFM(PP=0)
TDecimate()

It depends what you mean by "residual combing" in the other sections. If you have fine combing, an alternative strategy is to use something less destructive like vinverse() afterwards

InTheLight
22nd February 2013, 02:39
Are you sure you even need clip2 ? Do you have a sample where it's required for "combing" ?

On this sample just turn PP off. PP=0

MPEG2Source()
AssumeTFF()
TFM(PP=0)
TDecimate()

It depends what you mean by "residual combing" in the other sections. If you have fine combing, an alternative strategy is to use something less destructive like vinverse() afterwards

Yes I need clip2 (or something equivalent). The above sample is just a section snipped from 25 minutes to show what things look like when QTGMC is "not working".

By "residual combing" I mean after TFM is done, once in awhile I'll have stray combed frames randomly here or there. (this is across multiple files of the same series). QTGMC via clip2 works great for eliminating them, except for scenes like above, which is a very common occurrence in the series.

I'll give vinverse() a try.

Thanks for the help.

Edit: So it looks like vinverse(dll) does take care of the misc combing, but it seems to do so by blurring it. Due to that I'm still trying to get QTGMC to work in the trouble spots since the quality is great where it does work.

osgZach
23rd February 2013, 20:29
I've been out of the encoding scene for a while, so maybe I am just screwing up something obvious. But I can't get QTGMC to run.

Initially I installed Avisynth 2.6 official. So I downloaded QTGMC and then downloaded the DLL pack for version 2.6. However I was getting an exception (access violation) on line 393 when trying to run a QTGMC command I found in a thread, where someone asked about converting 60p -> 30p while maintaining fluidity of motion. Which is what I'd like to do with recorded video game footage.

I thought maybe it had to do with using the vanilla 2.6 install and downloaded SET's latest 2.6MT DLL, since it was "recommended". I tried using a plain command (assuming there are default run values) "QTGMC()" And now my error message has changed substantially, pointing to MaskTools.


Avisynth Open Failure:
Avisynth: access violation at 0x0001F0CC in C:\Program Files (x86)\AviSynth 2.6\plugins\mt_masktools-26.dll,
attempting to read from 0x00000000
(QTGMC-3.32.avsi, line 776)
(QTGMC-3.32.avsi, line 386)
(E:\ys2.avi)


Here is some info in case it helps.
CPU: Intel i5 3570k (Turbo @ 4.6Ghz)
RAM: 16GB DDR3 @ XMP Profile 1600Mhz
OS: Windows 7 Ultimate 64-bit

Codec: Lagarith
Color: YV12
App: VirtualDub 1.9.11

Script trying to run:

AVISource("E:\ys2.avi", audio=false).AssumeFPS(60,1)
QTGMC()


Also tried running script in this thread - http://forum.doom9.org/showthread.php?p=1485123#post1485123
Produces an error in RemovegrainSSE2.dll (another access violation)

Boulder
23rd February 2013, 20:41
I had problems with the 2012-08-28 build of SEt's MT Avisynth and have not tried the new one yet because of that. You might want to try the 2012-05-16 build which seems to be running fine with -Vit-'s modified plugins.

osgZach
23rd February 2013, 21:05
Mediafire won't allow any more downloads for his files.

Can you provide it for me?

LigH
23rd February 2013, 21:11
Even with AviSynth 2.60, using mt_masktools-25.dll may be more compatible and more reliable. Use mt_masktools-26.dll only if you need support for new color spaces.

AviSynth 2.60a4 MT by SEt (2013-02-20) may not be compatible with mt_masktools-26.dll, as recently discovered. There are unsupported cache functions.

Boulder
23rd February 2013, 21:43
Mediafire won't allow any more downloads for his files.

Can you provide it for me?

Can you get it via this link: https://docs.google.com/file/d/0BzeF_1syecQwLWlnaU14bjhjSWM/edit?usp=sharing ?

osgZach
24th February 2013, 03:50
Yes I was able to get the file through the link, thanks.
Unfortunately still having problems. I will try swapping out MaskTools for version 2.5 when I have a chance.

Update:
Switching out MaskTool for 2.5 as well as downloading the 32bit Thread-Fix DLL pack seems to have resolved the issue for now. I successfully opened my AVS script

zipi
26th February 2013, 21:24
Vit, there might be a problem with the RepairSSE2.dll in "QTGMC 32-bit Plugins [Vit-Mod].zip".

If you use TemporalRepair, with something like:
rg=input.RemoveGrain(mode=1).RemoveGrain(mode=5)
tr = TemporalRepair(rg, input)

you get artifacts like this:

http://www.freeimagehosting.net/t/fvefh.jpg (http://www.freeimagehosting.net/fvefh)

I could mostly see these in scene changes, using latest 2.6 MT.

simcut
2nd March 2013, 03:22
Another one of my questions, is there any difference between using FPSDivisor=2 instead of SelectOdd() or SelectEven()

Is it better to use the FPSDivisor as part of QTGMC rather than keeping SelectOdd or SelectEven in the avisynth script?

Thanks in advance

BeNooL
4th March 2013, 12:42
Curious about this too as I also keep my videos at that original framerate.

Mole
4th March 2013, 12:57
I think I remember reading in the manual that it's identical to SelectEven().
However, this internal switch is supposed to be used with ShutterBlur= option. If it's used on it's own, there is no difference to SelectEven().

So you can use FPSDivisor=2 or SelectEven(), the result is identical.

Mole
4th March 2013, 13:03
Speaking of FPSDivisor=2

Wouldn't it be a good idea if certain functions could be performed after decimation?

For example, temporal denoise may work out differently if it was applied to only the frames which will be kept.
It may also be faster since we're basically applying the functions to only half the frames.

zipi
6th March 2013, 16:12
I'm always suspicious when PAL guys say their source is interlaced because so often it's only been encoded as interlaced and the content isn't interlaced at all. Or it's field-blended and has to be unblended rather than just deinterlaced. Or it's phase-shifted.

wow, thanks for this, how can one figure that out?

Mole
6th March 2013, 16:17
It's quite easy to see if it's been phase shifted. It'll look like 12 frames interlaced, then another 12 progressive.

You should not deinterlace it, but use for example tivtc

tfm()
tdecimate(cycle=25)

You will end up with 24fps progressive.

zipi
6th March 2013, 16:21
Thanks, & what does 'field-blended and has to be unblended' looks like?
when something has 'only been encoded as interlaced' does it look like regular progressive ?

Selur
6th March 2013, 16:26
Hoping that I didn't mix something up:

Typical interlace patterns:

content is progressive:

applying AssumeTFF().Bob() you will see: stop -> forward_movement -> stop -> forward_movement *
applying AssumeBFF().Bob() you will see: stop -> forward_movement -> stop -> forward_movement *

content is field shifted:

applying AssumeTFF().Bob() you will see: backwards_movement -> forward_movement -> backwards_movement -> forward_movement *, **
applying AssumeBFF().Bob() you will see: forward_movement -> stop -> forward_movement -> stop *, **

content is interlaced TFF:

applying AssumeTFF().Bob() you will see: forward_movement -> forward_movement -> forward_movement -> forward_movement *
applying AssumeBFF().Bob() you will see: forward_movement -> backwards_movement -> forward_movement -> backwards_movement *

content is interlaced BFF:

applying AssumeTFF().Bob() you will see: forward_movement -> backwards_movement -> forward_movement -> backwards_movement *
applying AssumeVFF().Bob() you will see: forward_movement -> forward_movement -> forward_movement -> forward_movement *

content is interlaced BFF/TFF with blending:

same as the corresponding interlaced pattern, but you will also see some blended (= ghosted) frames in-between



* then moving through the content
** or vice versa

Cu Selur

LigH
6th March 2013, 16:27
It's quite easy to see if it's been phase shifted. It'll look like 12 frames interlaced, then another 12 progressive.

Well, that's not Phaseshift, but Euro Pulldown (http://forum.doom9.org/showthread.php?t=151372) (2:2:2:2:2:2:2:2:2:2:2:3).

Phaseshifted PAL would still have 25 fps, but appear combed in all frames with motion {DoubleWeave().SelectOdd()}.

And "blended Euro pulldown" requires more elaborate scripts (like Srestore) to be fixed.

zipi
6th March 2013, 16:32
Selur, thank you very much, this info is very helpful!

So assuming you do have a TFF 25fps pal clip, youd need selectodd() after qtgmc ?
& if so will FPDivisor=2 do the same?
I now read that QTGMC 3.32 had some issue with TFF, so do I need a different version for outputting 25 fps TFF PAL?

LigH
7th March 2013, 07:58
Look for QTGMC 3.33, it contains a fix about that.

laz1989
9th March 2013, 18:53
Is this video interlaced guys ? -->https://mega.co.nz/#!8NQFUQbJ!Dw_bGyhaVCJfEfoEi9nz61o4h252VJOPZxAK7OU63Ww
Is worth to deinterlace it?
Thanks.

blubb444
9th March 2013, 20:52
Is this video interlaced guys ? -->https://mega.co.nz/#!8NQFUQbJ!Dw_bGyhaVCJfEfoEi9nz61o4h252VJOPZxAK7OU63Ww
Is worth to deinterlace it?
Thanks.

A quick loading into VirtualDub via avs script shows it's interlaced-TFF

laz1989
9th March 2013, 21:16
Thank you for quick answer blubb.

Jonaldinho
15th March 2013, 14:49
Hi, I've got a clean source that I want to deinterlace without any extra blurring. I know there's a way of doing this using SourceMatch and Lossless in the script but i'm unsure where to add it and which setting to use. What would my script need to be if I wanted the best quality results? The line i'm using is:

QTGMC( Preset="medium", FPSDivisor=2 )

Thanks

SamKook
15th March 2013, 16:11
To get the best quality results you should use the veryslow preset or at least the slow one instead of medium.

As for Sourcematch and lossless, you simply add it between the () with the other settings(the order doesn't matter when you name them) like so: QTGMC( Preset="veryslow", FPSDivisor=2, SourceMatch=2, Lossless=1 )
I went from memory for the values so I might be wrong, but if you check the html manual that comes with it, there's plenty of good examples and you should be able to choose the one that best suit your needs for the specific source you're using.

Jonaldinho
15th March 2013, 21:06
Thanks for the reply, I kept getting an error and then I realised I had to change the "veryslow" to "very slow". But now i'm getting an error saying:

there is no function named FFT3D filter

If I change it back to:

QTGMC( Preset="medium", FPSDivisor=2 )

it works. Any ideas?

Stormborec
15th March 2013, 21:21
Is it possible to combine interlaced mode with progressive mode? Something like:

QTGMC(SourceMatch=2,Lossless=2,EZKeepGrain=1,Sharpness=0.2,tr2=0)

lanczosresize(width*2,height*2)

QTGMC(InputType=1,TR0=0,Rep0=0,SrchClipPP=2,EZKeepGrain=1)

LigH
15th March 2013, 22:14
@ Jonaldinho:

Different QTGMC presets use different AviSynth filters for specific parts of the process, this is documented inside the source.

If a specific preset uses FFT3DFilter, you need to have auxiliary maths libraries where they can be found, usually the system32 (or SysWoW64) subdir in the Windows dir, where the avisynth.dll is located too.

SamKook
15th March 2013, 22:17
Thanks for the reply, I kept getting an error and then I realised I had to change the "veryslow" to "very slow". But now i'm getting an error saying:

there is no function named FFT3D filter

If I change it back to:

QTGMC( Preset="medium", FPSDivisor=2 )

it works. Any ideas?

very slow uses different filters than the medium preset and that particular error is due to a file similarly named you probably forgot to put(or rename if it's needed) in the windows or system32(or syswow64 depending on your windows version). It doesn't go in the avisynth plugin folder so it's easy to miss.

It's specified in the pluging package but I can't download it to check from where I am so I can't say where and what for sure since it's been a while since I installed it.

LigH
15th March 2013, 22:22
From the QTGMC 3.33 source:

# For FFT3DFilter & ddftest you also need the FFTW3 library (FFTW.org). On Windows the file needed for both is libfftw3f-3.dll. However, for FFT3DFilter
# the file needs to be called FFTW3.dll, so you will need two copies and rename one. On Windows put the files in your System32 or SysWow64 folder

sinz718
16th March 2013, 01:08
is it ok to use this version (3.33)

i'm asking as it's not here which is making me think perhaps not to use it.

http://www.spirton.com/uploads/QTGMC/QTGMC-3.33.avsi

So anyword on whether we should be using this or not?
If so the first post is not updated with this "update". :confused:

Thanks for posting the link in any event Pulp.

Edit and just wanted to add I'm using the previous one and made a script and lmfao at 0.20 FPS with MT 16 minutes for 200 frames.
Perhaps I did something wrong with my script setup.

Ligh:
Thanks for the infoz

LigH
16th March 2013, 01:11
I read about bug fixes inside the code.

So I would vote for "yes". And I know I am not the only one.

The first post is not updated because the author of this update is not the thread starter.

thebigmunch
16th March 2013, 14:02
I read about bug fixes inside the code.

So I would vote for "yes". And I know I am not the only one.

The first post is not updated because the author of this update is not the thread starter.
Not so sure about that (http://forum.doom9.org/showthread.php?p=1573657#post1573657)

Stormborec
16th March 2013, 14:32
Just two questions:

1)
Is the sharpening function in qtgmc script comparable with lsfmod? At first - there is no supersample in qtgmc - is it a good idea to disable sharpening -> smode=0 ; then upscale and then to use lsfmod?

2)
Is it a good idea to upscale first, if using inputtype=1? It seems, it's preserving more fine details ...

LigH
16th March 2013, 19:23
Not so sure about that (http://forum.doom9.org/showthread.php?p=1573657#post1573657)

Then let's poke -Vit- about it... ;)

osgZach
17th March 2013, 02:14
I'm not really tweaking anything but speed presets, and I really like the results I am getting on a particular source. The problem is I am getting line artifacts from previous frames showing up very faintly in some parts. It happens in both static and motion scenes, and I'm not sure what I can tweak to try and get rid of it..

It's not always entire outlines of entire objects per-say, just some faint remnants that show up on certain parts of the new frame, in the place where they were in the old frame.?
I guess some kind of blending or residual image. I believe it is also the case that immediately following these frames with artifacts, a much cleaner frame which is almost always an exact duplicate seems to appear in the stream as well.

edit: I think the source may have field blends, no idea if its a conversion though. But I'm a little rusty on procedures used to identify field blending, however. But it does appear artifacts showing up are coming from both C + P frame and possibly N frames too. There do seem to be progessive frames sandwhiched between most if not all of them as well. You can usually tell something is up because the frame image overall does not but there are subtle shifts resulting in some lines looking thinner/thicker and stuff like that..

No idea what to make of this...will post a sample later when I have time, I guess. But any ideas to try in the mean time would be nice.

kypec
21st March 2013, 09:32
Dear fellows,

I've been using QTGMC with great results so far but recently I spotted very annoying artifacts during normal playback of my encoded footage (PAL 25fps).
The source sample (AVS + D2V + M2V) is available for download here (43MB) (http://www.ulozto.net/xCCGjiv/samples-zip). Download also fixed AVS + D2V (http://www.ulozto.net/xcVtLSz/samples-fixed-zip) and replace original files that point to non-existent VOB file. :o
Four consecutive frames that demonstrate my problem below - please note how every other frame is blended, this is actually causing very ugly stutter or judder(?) during normal watching of encoded deinterlaced progressive video @ 25fps.http://i50.tinypic.com/s60j77.jpg
http://i48.tinypic.com/2mq6sjt.jpg
http://i47.tinypic.com/xq9w1.jpg
http://i47.tinypic.com/34dg41c.jpg

I've been trying to fight this with few ShutterBlur, ShutterAngleSrc, ShutterAngleOut parameter combinations but achieved no visible improvement apart from slightly blurred frames that were originally non-blended. The blended ones remain intact :(

Can anyone recommend any possible solution to this? Whatever advanced plugin/script that could help? I don't mind if it's slow as long as it doesn't damage otherwise clean parts of deinterlaced video where QTGMC provides excellent output (watch the rest of the sample opening scene). Only these panning scenes are irritating me. Perhaps I'll try to encode source as x264 interlaced and see how my TV deinterlaces this on playback if no viable solution via Avisynth can be found...

P.S. I prefer to stick with 25fps output (single-rate) if possible because I'm afraid that double-rate (50fps) would be too big for final x264 encode. :thanks:

osgZach
21st March 2013, 09:51
fyi, your d2v was pointing to the wrong file.. I just reindexed it. I am guessing the original source was 23.976 NTSC and it went through a PAL conversion, so maybe you need to consult QTGMC's documentation for how to deal with NTSC-> PAL conversions. I don't know much about dealing with them myself. But there are also tools like Srestore to look in to as well.

Didée
21st March 2013, 09:54
The sample in the ZIP is a fieldblended PAL-to-NTSC conversion. To get progressive 25fps again, use Srestore after bobbing to 60fps .

kypec
21st March 2013, 10:37
The sample in the ZIP is a fieldblended PAL-to-NTSC conversion. To get progressive 25fps again, use Srestore after bobbing to 60fps .
Didn't you mean to say NTSC-to-PAL conversion? Sure, this TV series was shot & produced in US originally (NTSC land) and then transferred to DVD Region 2 (PAL land) which is the source I have to work with. Do you mind to show me a script how to bob it to 60fps as the source is 25i, pretty please?:confused:

kypec
21st March 2013, 10:39
fyi, your d2v was pointing to the wrong file.. I just reindexed it. I am guessing the original source was 23.976 NTSC and it went through a PAL conversion, so maybe you need to consult QTGMC's documentation for how to deal with NTSC-> PAL conversions. I don't know much about dealing with them myself. But there are also tools like Srestore to look in to as well.
Sorry for messed up index files to everyone. Here are fixed versions of D2V & AVS zipped (http://www.ulozto.net/xcVtLSz/samples-fixed-zip) together, please download and replace.

Didée
21st March 2013, 11:23
Oops sorry, it is indeed 25i. I just looked at the mediplayer's quickinfo field, and it falsely reported the source framerate being 29.97.
Important point is that QTGMC is not at fault, because the source already contains all those blendings that you issued.
Anyhoo, the strategy stays the same. Just bob it, und stuff it into Srestore.

--EDIT--
However, it seems that the source requires to be restored to 25fps directly, instead of Srestore's default of 23976 for PAL input.

source
bob
Srestore(frate=25.0)

In fact, the scheme of blending is quite similar to the one that is typical for PAL-to-NTSC conversions. (Oversimplified: there are not quite as much blended fields, but a lot more quasi-duplicated fields.)
This is also why I "trusted" the false report of the source being 29.97 fps: because the blending pattern looks like in blended NTSC. ;)

bcn_246
21st March 2013, 21:08
Can anybody mod srestore to use SVP?

tia

Didée
21st March 2013, 21:14
Why, how, what? Srestore does not use motion interpolation or compensation in any way. There is nothing to mod.

chibijoshie
24th March 2013, 05:39
I was wondering if anyone had thought of modding animeIVTC to use QTGMC. I'm asking because the script uses a modded version of TempGaussMC() (precision=3 in mode=1/4, bbob=4 in mode=2, cbob=4 in mod=3), and since QTGMC is (perceived to be) better than TGMC, it was just a floating thought.

wqcr
25th March 2013, 21:54
Thanks for your great script, -Vit- . For the last two years I relied on MCBob, which was great but extremely slow, about 1.5FPS. "Placebo" setting gives me around 3FPS which is blazingly fast for me. :)
Unfortunately when running the script at any preset, frames just like this appear in the final video every 350 frames or so (it is rather infrequent):
http://dl.dropbox.com/u/3664253/photo/a0000.png

Source: DV Video PAL 720x576@25, encoded with Cedocida DV Codec through Virtualdub, fast recompress
System: Windows XP SP3

Any suggestion?

manono
26th March 2013, 00:49
Any suggestion?
That can sometimes be indicative of memory going bad. So you could run memtest86 or other memory testing programs to check.

Are you overclocked, by chance?

Is QTGMC the only thing in the script or are there also other complex filters?

wqcr
26th March 2013, 09:40
That can sometimes be indicative of memory going bad. So you could run memtest86 or other memory testing programs to check.

Are you overclocked, by chance?

Is QTGMC the only thing in the script or are there also other complex filters?

Memtest went fine, no errors at all. CPU is running on x10 default multiplier (C2D E7300) and no other processing apart from deinterlacing is performed.
I forgot to mention that I am using MT Avisynth 2.6 and multithread script. There were no such problems with MCBob so I guess it has something to do with the dlls.

Groucho2004
26th March 2013, 10:33
Memtest went fine, no errors at all. CPU is running on x10 default multiplier (C2D E7300) and no other processing apart from deinterlacing is performed.
I forgot to mention that I am using MT Avisynth 2.6 and multithread script. There were no such problems with MCBob so I guess it has something to do with the dlls.

In order to track this down you have to start with a reasonably stable baseline:
- "official" Avisynth 2.6 Alpha 4
- Plugin package recommended by -Vit- in the first post of this thread

As a side note, I doubt that you'll get a significant performance boost with multi-threaded Avisynth on your dual core CPU. You have to consider that the encoder also needs CPU cycles. Check the speed of the entire decoding/filtering/encoding chain.

Poutnik
26th March 2013, 13:34
As a side note, I doubt that you'll get a significant performance boost with multi-threaded Avisynth on your dual core CPU. You have to consider that the encoder also needs CPU cycles. Check the speed of the entire decoding/filtering/encoding chain.


For scripts much faster than X264 ( like LRemoveDust script ) encoding with MT does not makes much sense.
But for scripts much slower MT makes big sense. Demanding scripts like MCTD or QTGMC takes much more CPU than X264.

E.g. on my core2duo E4700 2.6GHz and Vits MT AVS based on AV 2.6b3,
MCTD script takes 75-80% CPU versus 20-25% CPU for X264 for Slower preset.
I do not remember FPS gain when I compared it, but I guess it was like 1.6-1.8 times.

I think even for comparable speed of script and X264 MT can make sense, as the whole chain can be less affected by one core business by other processes. But this is rather guessing, I am not familiar with windows CPU respources policy.

I recommend modded plugin set by vit at the first page.

Boulder
26th March 2013, 18:09
Unfortunately when running the script at any preset, frames just like this appear in the final video every 350 frames or soCould you post your full script? That one looks like incorrectly decoded DV, in fact it looks the same as my tapes if the tape or the head on the recorder is dirty.

wqcr
26th March 2013, 19:34
I've figured it out. It was the multithread script and Avisynth MT. So for now I switched to Avisynth 2.58 and single-core operation, yet it is possible for me to run two instances of VDub, each one processing one-half of the footage thus occupying both cores. The result is much higher framerate than with multithread solution (4.2FPS vs. 2.9FPS) plus no artefacts :o

Stormborec
8th April 2013, 14:58
Is this setting really the most closer to the original interlaced source, or did I something wrong understand?

QTGMC( Preset="Very Slow", EZKeepGrain=0.5, SourceMatch=2, Lossless=2, Sharpness=0.1, Sbb=0 )

cybersharky
18th April 2013, 12:41
I'm using the SEt's latest avisynth MT 2.6.0.3 and -Vit-'s plugin's from: http://forum.doom9.org/showpost.php?p=1568142&postcount=1126

https://dl.dropboxusercontent.com/u/47490038/avs.jpg
LoadPlugin("B:\Gary\MeGUI_2308_x86\tools\dgindex\DGDecode.dll")
DGDecode_mpeg2source("B:\Gary\voy\VideoFile.d2v", info=3)

LoadPlugin("B:\Gary\MeGUI_2308_x86\tools\avisynth_plugin\AddGrainC.dll")
LoadPlugin("B:\Gary\MeGUI_2308_x86\tools\avisynth_plugin\RemoveGrainSSE2.dll")
LoadPlugin("B:\Gary\MeGUI_2308_x86\tools\avisynth_plugin\RepairSSE2.dll")
LoadPlugin("B:\Gary\MeGUI_2308_x86\tools\avisynth_plugin\mt_masktools-26.dll")
LoadPlugin("B:\Gary\MeGUI_2308_x86\tools\avisynth_plugin\mvtools2.dll")
LoadPlugin("B:\Gary\MeGUI_2308_x86\tools\avisynth_plugin\SSE2Tools.dll")
LoadPlugin("B:\Gary\MeGUI_2308_x86\tools\avisynth_plugin\nnedi3.dll")
Import("B:\Gary\MeGUI_2308_x86\tools\avisynth_plugin\QTGMC-3.32.avsi")

QTGMC( Preset="Slow" )

Edit changed all the plugins, now I get:
https://dl.dropboxusercontent.com/u/47490038/voy1002777.bmp

LigH
18th April 2013, 16:26
Therefore the "latest" version is a patch for mt_masktools26.dll by 06_taro (http://forum.doom9.org/showthread.php?p=1619023#post1619023) for AviSynth MT 2.60 alpha 4, not 3.

cybersharky
18th April 2013, 18:40
None of those included in -Vit-'s 2.6 package work with 2.6.0.3.

Reel.Deel
19th April 2013, 03:27
None of those included in -Vit-'s 2.6 package work with 2.6.0.3.

In my case that's partially incorrect. All of -Vit-'s 2.6 plugins seems to work with SEt's 2.6.03 MT 2012.05.16 (http://forum.doom9.org/showthread.php?t=148782).
With newer builds I get access violations and similar errors like what you have posted above. That's the main reason why I stick to the older build.
I wonder what change made those plugins incompatible?

LigH
19th April 2013, 07:19
A programmers' interface to set the frame caching strategy by another plugin, if I understood the brief explanation by 06_taro well; I did not read the diff, but it should be included.

cybersharky
23rd April 2013, 18:32
What I've done so far: http://forum.doom9.org/showthread.php?t=167671

Posting here because I was going to use QTGMC, but the source is only partially interlaced. What would happen to the progressive frames if I used QTGMC?

Or is there a way to conditionally use QTGMC based on frame type?

osgZach
24th April 2013, 01:41
If you consider manually writing out a bunch of Trim frame ranges, filtering the interlaced ones and splicing them back together "conditional" you could do that :p

You could make it slightly less tedius by marking the ranges in YATTA and letting it sort out the actual Avisynth script, but that's still a lot of work if you have a lot of interlaced content.
(Ok I was only half serious)

Or you could just use Tdeint or some such and feed the interlaced frames to QTGMC. <--- most sane option.
You should get pretty close with the right thresholds and then for anything slipping through just use an overrides file to force those frames to be deinterlaced or not deinterlaced.

x265
24th April 2013, 05:57
Is this how i postprocess the residual combs after IVTC?


interp=QTGMC(preset="very slow")
deint = tdeint(edeint=interp, emask=tmm())
tfm(pp=6, micmatching=2, slow=2, clip2=deint)
smartfade(dgm=true)
tdecimate(mode=1)

LigH
24th April 2013, 07:31
With my limited theoretical NTSC experience here in PAL land, I would immediately think: "You are doing it wrong. If the original is telecined, don't use deinterlacing. Use Inverse Telecine (IVTC) instead: TFM().TIVTC()"

I don't know if your script makes sense at all. If it does, it would surprise me, but someone would have to explain to me why it works and why it is better or worse than the ^ trivial solution as the first step. At the moment I don't see a valid reason for using QTGMC on telecined material. The temporal progress of the fields is not what a deinterlacer would expect.

AzraelNewtype
24th April 2013, 09:39
Is this how i postprocess the residual combs after IVTC?


interp=QTGMC(preset="very slow")
deint = tdeint(edeint=interp, emask=tmm())
tfm(pp=6, micmatching=2, slow=2, clip2=deint)
smartfade(dgm=true)
tdecimate(mode=1)

You'll have to add FPSDivisor=2 to qtgmc, otherwise interp will be bobbed, but this should work. Whether it's actually worthwhile to use such a slow deinterlacer just for grabbing pixels for match failure is a different question entirely.

osgZach
24th April 2013, 22:54
With my limited theoretical NTSC experience here in PAL land, I would immediately think: "You are doing it wrong. If the original is telecined, don't use deinterlacing. Use Inverse Telecine (IVTC) instead: TFM().TIVTC()"

I don't know if your script makes sense at all. If it does, it would surprise me, but someone would have to explain to me why it works and why it is better or worse than the ^ trivial solution as the first step. At the moment I don't see a valid reason for using QTGMC on telecined material. The temporal progress of the fields is not what a deinterlacer would expect.

Because IVTC is not flawless and as mentioned, sometimes you have to deal with residual combing (which look suspiciously like interlacing) left-over from field matching. So you deinterlace the frame.

But I'm not sure which post you were replying to, so that's my generic response.

LigH
25th April 2013, 07:43
@ osgZach:

I referred to x265's script just one post above my reply; usually I would expect that a straight 3:2 pulldown can be exactly reversed to its progressive original. Except some *censored* cut the video after telecine and destroyed the regular pattern, so the field matcher has to re-adapt it now and then.

osgZach
25th April 2013, 08:20
Anime is kind of notorious for all kinds of problems, in this case. Newer stuff is a lot better, but...yeah

LigH
25th April 2013, 09:48
Newer ... Anime ... better ... a user of the german doom9/Gleitz board (Selur) reported a Blu-ray of "Galaxy Rangers" being actually worse than the DVD: Not even the full SD resolution was used in an MPEG2 video stream. MPEG2! On Blu-ray!

But yes, real cartoons have such a low original frame rate, that a not-so-smart field matcher may have issues detecting the pattern correctly, due to so many duplicated progressive frames already before the telecine.

simcut
25th April 2013, 16:34
Hi all

A quick question, I was previously using the QTGMC 3.32 and noticed there was a small update to 3.33, how do I get the update to work? all I've downloaded is a QTGMC-3.33.avsi file, do I put that in the C:\Program Files (x86)\AviSynth 2.5\plugins folder and delete the 3.33 one?

Thanks :)

Selur
25th April 2013, 20:24
all I've downloaded is a QTGMC-3.33.avsi file, do I put that in the C:\Program Files (x86)\AviSynth 2.5\plugins folder and delete the 3.33 one?
yes, but you should delete the old 3.32 not the new 3.33 ;)

simcut
25th April 2013, 22:53
yes, but you should delete the old 3.32 not the new 3.33 ;)

Haha, yes, sorry, was a typo, I obviously delete the old 3.32 :P

Cheers.

Johnnyas
29th April 2013, 11:01
I'm trying to use QTGMC with X264 to compress a home video (full hd, 25fps interlaced). I'm using this script:

SetMemoryMax(1400)
SetMTMode(3, 4)
AVISource("F:\DigiVidCam\video.avi",audio=false).AssumeFPS(25,1)
SetMTMode(2)
AssumeTFF()
QTGMC( Preset="Slower", EdiThreads=1 )
Distributor()

Right now I'm using v3.33 of the script, with the modified MT package from the op.

I'm rendering on a quad core i7@2,9ghz, with 8gb ram (and on a SSD disk). The video is 89 minutes, and at first it starts off at around 1,80 fps. Projected completion time was around 50 hours. Not exactly blazing speed, but I'm ok with it - it usually produces very good results.

The main problem is that it slows down. Right now, close to 12 hours in (and close to 10 minutes done of the video), it's at 0,69 fps, with a projected time remain very close to 4 days.

As this happens gradually during the compression, testing takes an awful lot of time. Anybody have any good tip as to where I should start with testing given the slow-down symptom?

(This usually happens when I use QTGMC. I've usually had a bit shorter videos, and also only one every now and then - but I have some more lined up now so it'd be nice if a change in settings can speed things up (well.. other than reducing quality really)).

Taurus
29th April 2013, 11:29
@Johnnyas
Just some wild guessess...
Dont use "distributor()" in your script!
x264 gets it's own threading model.
With "distributor" you are multiplying the threads until it gets unstable.
Maybe lower your memorymax, start with "SetMemoryMax(1024)".
Which avi decoder you are using for your avi?
Maybe try another one.
Or give ffvideosource a chance, yes it can decode avi.
Or set SetMTMode(3, 4) to SetMTMode(5, 4).
Without knowing your source it's almost impossible to help you
And maybe a mediainfo.
And why you are using (beta)QTGMC 3.33?
Edit: Which avisynth version?
To get all the benefits from -VIT-'s modded plugins
it's the best to follow the instructions on the first page to the bone.
Especially the Avisynth MT version is important.

LigH
29th April 2013, 12:01
As Taurus already stated, a "Distributor()" call is only recommended for very few exceptional uses, not for a normal 32-bit encoding process.

Most common reasons for a slowly decreasing speed are a) excess swap file usage (check your harddisk activity); b) excess threading (ProcessExplorer may help to reveal that); c) extreme RC-lookahead complexity (too slow x264 preset)

Boulder
29th April 2013, 12:18
Encoding also gets slower when the bitrate is higher.

Whenever I need to deal with interlaced sources, I save the QTGMC pass to a lossless intermediate file (ffv1) with VirtualDub and then feed that to x264 in the script. Of course you need the extra diskspace but diskspace is quite cheap these days.

Johnnyas
29th April 2013, 20:25
Thanks for the speedy help! I included the distributor line just because it said 'this line may or may not be necessary' in the first example script I used when trying out the MT version. I removed it now!

I tried removing the old 2.5 version to see if I could get any more speed out of 2.6, so the versions I've been using are:
AviSynth: 32bit 2.6.0 Alpha 4 [130114]
SEt's AviSynth 2.6 MT mod from 20130309
QTGMC 3.33 (because I had problems using 3.32, I tried 3.33)
QTGMC 32-bit Plugins [Vit-Mod].zip - Note: I tried using QTGMC 32-bit Plugins [Vit-2.6] as well, but I got an error with MT_Masktools (access violation in mt_masktools-26.dll), so I tried this package

MediaInfo:
General
Format : AVI
Format/Info : Audio Video Interleave
Format profile : OpenDML
File size : 131 GiB
Duration : 1h 29mn
Overall bit rate : 210 Mbps
TCOD : 0
TCDO : 53547200000

Video
ID : 0
Format : Lagarith
Codec ID : LAGS
Duration : 1h 29mn
Bit rate : 210 Mbps
Width : 1 920 pixels
Height : 1 080 pixels
Display aspect ratio : 16:9
Frame rate : 25.000 fps
Color space : YUV
Chroma subsampling : 4:2:0
Bit depth : 8 bits
Bits/(Pixel*Frame) : 4.051
Stream size : 131 GiB (100%)

I tried modifying the script a bit, just removing the distributor line and reducing maxmem, but that didn't seem to help much. When I checked in after ~5 hours or so, it was down to around 0,76fps. I didn't see neither much swap file usage, nor a lot of evidence of excess threading - at least not from what I could see in Process Explorer.

Separating the qtgmc and the x264 process seems like a good idea, guess I'll do some research on how to do that I guess. I've been using MeGui, and I'm not very familiar with virtualdub, but I guess now is a good a time to learn as any.

edit: oh right, should also give ffvideosource a go.

Groucho2004
29th April 2013, 22:14
I tried modifying the script a bit, just removing the distributor line and reducing maxmem, but that didn't seem to help much. When I checked in after ~5 hours or so, it was down to around 0,76fps. I didn't see neither much swap file usage, nor a lot of evidence of excess threading - at least not from what I could see in Process Explorer.
You could test the speed, memory and CPU usage of just the script (without encoder) with AVSMeter (http://forum.doom9.org/showthread.php?t=165528).
What's your x264 command line?

Johnnyas
30th April 2013, 07:29
Tried AVSMeter (neat program), and after close to 7,5 hours I got this:

FPS (min | max | average): 1.15 | 1.93 | 1.58
CPU usage (current | average): 25% | 25%
Thread count: 7
Physical Memory usage: 1497 MB
Virtual Memory usage: 2053 MB
Time (elapsed | estimated): 07:29:46.906 | 47:12:12.648

Though not exactly blazing, it seems to keep stable at least. CPU usage indicates it's only using one core though, even if Thread count says 7. Have no idea what that is about.
I've been running this on one pc. It's pretty similar to the other one, and performs just about the same.

The X264 command line (autogenerated by MeGui):
program --preset veryslow --crf 20 --qpmin 10 --qpmax 51 --output "output" "input"

On the other pc, I've been trying to get rendering working with Vit's 2.6 modded plugins, but I've been unable to. I think it's only producing errors on Very Slow, not Slower, but it didn't do that a few days ago.

The problem I got was an access violation connected to mt_masktools-26.dll
Tried using mt_masktools-26-for-2.6alpha4.7z (based on vit 2.6), which fixed the access violation with mt_masktools, but then I got an access violation with RemoveGrainSSE2.dll I think. Still trying to get it back to a working state.

LigH
30th April 2013, 07:51
You are certainly using AviSynth 32-bit. If its calling application is not "Large Address Aware", then both together will only be able to address at most 2 GB of virtual memory; fortunately, a current x264 (or avs4x264mod.exe in case you want to run the 64-bit x264 via this pipe bridge) should be compiled with LAA flag, providing access to 4 GB at most. But I am not sure if AviSynth plugin DLLs compiled without this compiler mode may cause issues... It may be advisable to limit threads in SetMTMode and in functions which fork on their own (see parameter EDIThreads in QTGMC).

Your AVSMeter call (which ignores the video it receives) already surpassed this 2 GB limit (2053 MB) for the script alone; x264 will need even more RAM for its encoding algorithms, including a look-ahead buffer for frame type decisions. The slower the preset, the more frames it looks ahead and needs to store in memory.

Johnnyas
30th April 2013, 09:52
Yes, I'm using 32bit AviSynth. There were too many plugins and filters that didn't work with the 64bit version the last time I set up AviSynth/QTGMC

EDIThreads is at 1 already, so reducing that would be difficult
QTGMC( Preset="Very Slow", EdiThreads=1 )

The last script I tried, which I reused for AVSMeter, had SetMemoryMax(1200) I think. I reduced this to 1024 and tried again, and got:
Physical Memory usage: 1320 MB
Virtual Memory usage: 1876

Better at least. Will see if I can get a compression job started with this. I tried 1024 earlier, but I'm unsure of which of the plugin packs I was testing it with at the time.

Boulder
30th April 2013, 09:58
You can easily go down to SetMemoryMax(512) for testing, I'm quite sure it won't affect performance in any way.

Johnnyas
30th April 2013, 10:41
I might be having problems because of MeGui, and that it's not using the correct components or something like that..
BUT that shouldn't cause problems for VirtualDub, right! I've tried for a while to get VirtualDub to produce a lossless deinterlaced file with QTGMC set on Very Slow, but it crashes with a Kernel Base error (this was also with the SetMemoryMax at 1024). It seems to work on Slower, but not Very Slow. Don't really know how to fix it at this point, have tried reinstalling quite a few times :/

Boulder
30th April 2013, 10:59
One other thing to try with the lossless intermediate is to forget the multithreading in Avisynth but split the encoding in multiple parts. I have a quad-core i5 so I split the video in three parts using Trim in the scripts. That is, create three scripts that handle three different parts of the video and encode in three VDub sessions simultaneously. Then join the intermediate files in the script that is fed to x264. I have found out that this is often the only way to make it work because the memory usage for HD sources is huge.

Johnnyas
30th April 2013, 11:40
I'm not able to test lowering SetMemoryMax further right now, as I started a new attempt earlier (which is running still of course). Splitting up into several parts is probably a good idea. Should the splitting be done on 'black' (as in transitions in the video), or would a split just between two frames wherever be unnoticeable?

Boulder
30th April 2013, 11:47
It should be unnoticable despite the point where you split it. I always divide the number of frames by three and create the Trim commands according to that. I don't know if you should place the Trim command before or after QTGMC to have a bit-identical output compared to just one script (Avisynth parses the script kind of backwards) - just remember that after QTGMC, the number of frames is doubled.

Johnnyas
30th April 2013, 14:43
Tried SetMemoryMax(512) - but that didn't go too well. I got up to 0.3-0.4 fps, and after a couple of hours it crashed.
Trying SetMemoryMax(800) on that pc now, and it's currently at 0.85 fps. That is QTGMC + X264 compression.

On the other pc, I'm using normal AviSynth (non multitasking), I've divided into four Avisynth scripts with trim, and have four VirtualDub sessions running at the same time. Combined, the four sessions run at around 4 fps. Looking at the Resource monitor, it's at ~100% usage across all cores (though it's very responsive, I'm typing this on the same pc), disk IO has been between 3 and 9 MB/sec, and I'm using about a third of my available ram.

The scripts I'm running now are like this:
1:
AVISource("F:\render\video.avi", audio=false).AssumeFPS(25,1)
trim(0, 35000)
QTGMC( Preset="Very Slow" )

2:
AVISource("F:\render\video.avi", audio=false).AssumeFPS(25,1)
trim(35001, 70000)
QTGMC( Preset="Very Slow" )
etc.

Unless this fails spectacularly, I think we have a solution I'm happy with.
Thanks for the input pals!

ChibiBoi
1st May 2013, 10:01
I'm trying to use QTGMC in progressive mode because AnimeIVTC is giving me this really bad shimmering on the video footage when set to mode=2, and it works great at removing the shimmering! But QTGMC seems to be adding little blended fields from previous frames back into the footage, even though AnimeIVTC has gotten rid of them. I have two comparison shots, notice the extra horizontal lines coming from the previous frame when QTGMC is incorporated:
AnimeIVTC (http://i39.tinypic.com/63r70o.jpg) vs. AnimeIVTC + QTGMC (http://i44.tinypic.com/2w7ogo8.jpg)

I've tried adjusting the parameters for QTGMC, such as setting sourcematch=1 or srchclippp=0 individually, and they help, but there is still blending occurring.

setmtmode(2)
AVISource("C:\Users\Public\Recorded TV\sms test 2.avi", audio=false).AssumeFPS(30000,1001)
assumetff()
converttoyv12(interlaced=true)
animeivtc(mode=2)
qtgmc(inputtype=1)
lanczos4resize(640,480)

kolak
1st May 2013, 15:17
I'm not able to test lowering SetMemoryMax further right now, as I started a new attempt earlier (which is running still of course). Splitting up into several parts is probably a good idea. Should the splitting be done on 'black' (as in transitions in the video), or would a split just between two frames wherever be unnoticeable?

Scene change would be a good place for splitting.

SamKook
1st May 2013, 15:37
Since a couple frames are used before and after for analysis, it would be better to overlap the split by something like 50 frames on both side(when applicable) with a temporary lossless encode and then remove the overlap for the final encode. That way it's as if you never splitted it.

kolak
1st May 2013, 15:54
At the scene change motion vectors are reset no?

SamKook
1st May 2013, 16:23
Most likely now that you mention it(but I'm no expert so I don't know for sure).

So my method would be for lazy people who won't bother to take the time to split it in the right places.

Boulder
1st May 2013, 17:07
I wouldn't be surprised if Avisynth was smart enough to use the frames that are not in the actual output range. I think the logic is that it requests frames as needed and not as the Trim statement says.

ChibiBoi
1st May 2013, 17:52
I wouldn't be surprised if Avisynth was smart enough to use the frames that are not in the actual output range. I think the logic is that it requests frames as needed and not as the Trim statement says.

I think this might be right. I just tried the splitting method for multithreading last night and simply divided the number of frames in each segment by the number of threads and it worked like a charm, I appended the segments together using mkvmerge and the transitions between threads was flawless as if I encoded everything as one segment.

Johnnyas
1st May 2013, 21:58
The clip(s) are getting the x264 treatment right now. Will check the transition points to see if the trimpoints are noticeable. If they are, I'll try it with the +/- 50 frames first I guess - would take the work out of finding a good spot to do it :)

Right now, it looks like the combined time to process both operations will be around 43 hours. Thats much faster than any of my attempts with MT would have finished on (by at least a day actually) :cool:

kolak
1st May 2013, 22:18
For QTGMC deinterlacing on many core CPU you can try MP_Pipeline with branching option. It's slower than splitting into many processes, but all in one go and piece :)
Also- anything above fast for HD is overkill, very fast is enough in most cases.

Groucho2004
1st May 2013, 22:31
Also- anything above fast for HD is overkill, very fast is enough in most cases.
That's a very good point. I only noticed now that Johnnyas is using "very slow" which is painful even with the fastest CPUs for HD resolutions. I also have seen very good results with "Medium" and "Fast" presets. Not to mention that the memory requirements will most likely be lower.

SamKook
2nd May 2013, 01:07
Also- anything above fast for HD is overkill, very fast is enough in most cases.

That is far from true if you care about the size of the resulting file. Slower presets will make a noticeably smaller file if using CRF with x264.

For HD, I usually use very slow paired with the source match and lossless settings in qtgmc and veryslow with x264. I also use setmemorymax(1200) which I found was the most stable on my pc with those settings and split the encode in 4 with setmtmode set to 2 threads each. I also use avs2pipemod to pipe the avs to 64bit x264, mostly for the added stability piping provides since it doesn't seem faster than using the 32bit version.

It usually take a little less than a day to make the lossless encode to FFV1 and a bit over a day for the final 10bit x264 one(so 8bit would be close to half the time) for a 2 hour movie.

Groucho2004
2nd May 2013, 02:23
That is far from true if you care about the size of the resulting file. Slower presets will make a noticeably smaller file if using CRF with x264.
Hm, I was under the impression that we were talking about QTGMC presets...

SamKook
2nd May 2013, 02:47
Hm, I was under the impression that we were talking about QTGMC presets...

I was, I simply mentioned CRF x264 because it doesn't produce a fixed file size. My statement would have made no sense with a fixed bitrate.

Either way, both slower QTGMC and x264 settings affect file size(or quality at fixed bitrate) by a lot. I wish I would have kept my result from the last time I tested this.

kolak
2nd May 2013, 12:07
That is far from true if you care about the size of the resulting file. Slower presets will make a noticeably smaller file if using CRF with x264.

For HD, I usually use very slow paired with the source match and lossless settings in qtgmc and veryslow with x264. I also use setmemorymax(1200) which I found was the most stable on my pc with those settings and split the encode in 4 with setmtmode set to 2 threads each. I also use avs2pipemod to pipe the avs to 64bit x264, mostly for the added stability piping provides since it doesn't seem faster than using the 32bit version.

It usually take a little less than a day to make the lossless encode to FFV1 and a bit over a day for the final 10bit x264 one(so 8bit would be close to half the time) for a 2 hour movie.

Well- it's your workflow.
I would not waste 3x more time for even 25% smaller file size. I assume it's not close to 25% is it?
If it works for you than fine :)

SamKook
2nd May 2013, 14:19
It indeed depends on your priorities. If I were encoding a lot of them, then I might reconsider how much time I'm willing to spend on it.
I don't care at all how long it takes as long as I can get all I can out of it. Everything is automated anyway once I've tweaked my settings for a particular video and it doesn't affect anything else I do on the computer at the same time so it doesn't bother me.
I've even tried to encode a bluray without splitting it with crazy(and not so good) settings and 21 days later, it finished. I won't do that ever again, but it was a fun experiment.

And I also doubt it's as much as 25%, but I remember being surprised by how much it was. I'll have to try it again when I have the time.

Johnnyas
2nd May 2013, 14:54
The files I'm encoding are our home movies, and I encode them to keep like this. Since these will be my archive files, I definately want to do it on the best quality possible (within reason). I know there isn't too much difference between the slower presets on HD (well, at least from medium and slower), but a I'm encoding to keep so, it's not a one-time watch thing. Also, as SamKook, I've seen files get smaller when I've had both QTGMC AND the x264 encoder set at Very Slow, as opposed to Slower on QTGMC/Very Slow on the x264 encoder.

Johnnyas
5th May 2013, 13:14
Just an update here. Have done some testing, and the final renders on this movie at least - and I can't see the points where I join the movies at all, and that was with trimming from the exact frames (as opposed to doing some frames before/after). Very happy with the final results of this, so once again - thanks all!

Chainmax
14th May 2013, 06:33
I am trying to use QTGMC with the plugin pack that uses the updated Avisynth 2.6 interface, and these filters from it:

mt_masktools-26

removegrainsse2

mvtools2

fft3dfilter

Gave out an access violation error at an address and attempted to read from 0x00000000. Also, I got an error with nnedi3 that said arg0 needed to be a clip. Replacing these five DLLs with the ones from the original Modded Plugins Package seems to have solved the issues.

What could be the cause of these error messages?

Selur
14th May 2013, 06:42
What could be the cause of these error messages?
you replaced the five dlls with the ones from the modded plugins package :)
(read this thread and you will see that a bunch of people, me included, have problems with the modded plugins)

LigH
14th May 2013, 07:14
And if you are using MT 2.60a4:

Therefore the "latest" version is a patch for mt_masktools26.dll by 06_taro (http://forum.doom9.org/showthread.php?p=1619023#post1619023) for AviSynth MT 2.60 alpha 4, not 3.

The frame cache interface changed between 3 and 4.

aegisofrime
27th May 2013, 17:10
Hi. Rather a noobish question here.

I have a video that MeGUI detects as being of varying field order. How do I handle this with QTGMC? :thanks:

LigH
28th May 2013, 06:09
Serious answer:

Never trust an automatical detection. There is always a chance that the samples catch frames with too little changes to detect field changes reliably.

If there is a doubt about the structure, check the video manually by stepping frame-by-frame through a bobbed result (bobbing interpolates fields to whole frames for a convenient display), preceded with both AssumeTFF and AssumeBFF successively, counting how many fields are mostly equal or different over at least 30 fields in a row.

QTGMC is usually only recommendable if you are certain that the material is plain interlaced. For telecined material, use an IVTC plugin instead. And special standard conversions (PAL/NTSC/Film; censorship cover-up) might require custom solutions even...

GMJCZP
29th May 2013, 05:15
After calling the following function:

# Anti-aliasing with contra-sharpening by Didée (thanks to Didée, modded for this case with nnedi3)
# Is required VerticalCleaner
function DAAMod(clip c)
{
nn = c.nnedi3(field=-2)
dbl = mt_average(selecteven(nn),selectodd(nn),U=3,V=3)
dblD = mt_makediff(c,dbl,U=3,V=3)
shrpD = mt_makediff(dbl,dbl.removegrain((width(c)>1100) ? 20 : 14),U=3,V=3).verticalcleaner(mode=2)
DD = shrpD.repair(dblD,9)
return dbl.mt_adddiff(DD,U=3,V=3)
}

I get the following error message:

Avisynth open failure:
nnedi3: arg 0 must be a clip!

The nnedi3 calling is in red.
I was using version 2.6-Vit-nnedi3 (part of plugin pack for testing) and I had to return to the tritical's original version to run the script. I'm using the latest version of Avisynth 2.6.0 MT of SEt 2013.03.09.

LigH
29th May 2013, 09:28
The problem might be outside this function, you may be calling DAAMod() with something that isn't a clip (e.g. in a context where the clip is not 'last', but a specific variable), and its parameter is passed on to NNEDI3().

Gavino
29th May 2013, 09:57
The problem might be outside this function, you may be calling DAAMod() with something that isn't a clip
But in that case you would expect to get the error "Invalid arguments to function DAAMod" and it would never get as far as calling nnedi3.

GMJCZP
29th May 2013, 20:24
The problem might be outside this function, you may be calling DAAMod() with something that isn't a clip (e.g. in a context where the clip is not 'last', but a specific variable), and its parameter is passed on to NNEDI3().

As I said before, the script works with the old version of nnedi3. I downloaded again the -Vit- modded plugin package of QTGMC (not 2.6 version), but I have not tested the nnedi3 version modded.

-0-
On the other hand, I did something funny. I hung up the VirtualDub is processing a script more than once when appear 5 minutes (I have so configured in my PC) the screen saver. I had the idea of not carrying on the script the old version of nnedi3 (not was calling him!, only put #Load... nnedi3.dll) and incredibly the problem was solved. Coincidence?

pila13
3rd June 2013, 11:05
Hello, i need small help with qtgmc + JDL_ApplyRange

I need use this filter only on xxxx of frames, and recive error -

"expected a, or ) "

JDL_ApplyRangeOld(6428, 6466, "QTGMC(Preset="placebo").selecteven()") This is example of how i try to use this plugin. Can any one help me ? thnak you.

Boulder
3rd June 2013, 11:13
Have you tried triple quotes: JDL_ApplyRangeOld(6428, 6466, """QTGMC(Preset="placebo").selecteven()""") ?

LigH
3rd June 2013, 11:43
You cannot embed a string with "single double-quotes" in a string with "single double-quotes"; to circumvent this limitation, there are also strings with """triple double-quotes""".

JDL_ApplyRangeOld(6428, 6466, """QTGMC(Preset="placebo").selecteven()""")
__

Apart from that: A preset named "placebo" uses this name for a specific purpose ... to make you feel bad using it, because it is rather a waste of time than "the optimum".

pila13
3rd June 2013, 14:19
that one current moment, need placebo. this is hwy i don't want use it on a whole title, rest i will sue with medium.

thank you for help !

I tyr "" "", but didn't thoguht about """ """. (*´ー`*)

LigH
3rd June 2013, 14:45
Everything is documented, in the internet (http://avisynth.org/mediawiki/Script_variables) as well as in your local installation.

tormento
8th June 2013, 08:27
I want to convert 1080i50 to 1080p25. Is there a way to have no noise reduction thus making it possible for me to use SMDegrain later?

fvisagie
10th June 2013, 16:07
I haven't used this mode, but your best bet is probably the "Noise Bypass / Denoising" section in the documentation. The following seems to be key for your objective:
Important: You must use a non-zero value in one of EZDenoise, EZKeepGrain or NoiseProcess or no noise processing will occur

Cheers,
Francois

aldix
11th June 2013, 22:27
set tr1 and tr2 to 0

Trademark
25th June 2013, 14:19
The original post seriously needs example scripts so it can help newer people like me..

I'm trying to use QTGMC with AVSProxy for AVIDemux. I took all the right steps to install my plugins for the deinterlacer, but I'm stuck on the scripting part of it, what am I doing wrong?



AviSource(C:\Users\Owen\Desktop\deinterlacetest.avi)
QTGMC(Preset="slower")

LigH
25th June 2013, 14:29
The name of the AVI file is a string literal and belongs between double quotes.

I would assume that the error message would have given a hint.

manono
25th June 2013, 19:36
The original post seriously needs example scripts so it can help newer people like me.
No it doesn't, as your problem has nothing to do with QTGMC. This filter is among the best documented of all AviSynth filters and there are examples galore in the included doc. As LigH wondered, didn't you get an error message? Next time open a script in VDub to test and it'll tell you something helpful if there's something wrong with the script.

Anyway, as LigH also suggested, add quotation marks:

AviSource("C:\Users\Owen\Desktop\deinterlacetest.avi")
QTGMC(Preset="slower")

And maybe it's OK, but I never do anything at all from the desktop.

Trademark
25th June 2013, 21:44
I never said my problem had anything to do with QTGMC? I've been around the block before with using temgaussmc, and I got an error to the point of 'unexpected something something'' which I knew meant something was wrong with my script. I don't think I ever said anything was wrong with the QTGMC filter. Anyways, the quotations around my file address worked! Thanks LigH.

The original post and provided documentation with the file gave no real examples of how to set the first line, I was literally left looking for half an hour before I wound up asking. I was lucky enough even to remember that I had to write the whole path, because I remember talking with an avidemux admin about it long ago.

The result seems to have worked, but now I get a flickering artifact on the encoded video. One of the very first frames of the video is constantly flickered against the video itself. I can't seem to find a solution or workaround in the documentation either.

I don't use vdub to write scripts, I just notepad documents in which I give an .avs to their names.

manono
25th June 2013, 22:33
I never said my problem had anything to do with QTGMC?
Yes you did. You implied QTGMC was at fault when it wasn't. Your problem was writing the AviSource line correctly, something very basic to AviSynth and nothing to do with QTGMC.
The original post seriously needs example scripts so it can help newer people like me.
And therefore the original post needs nothing of the sort. And as I said, the included doc is full of good examples. But none of those examples show the line needed to open the video in the first place as it's assumed you would have learned that by now.
The original post and provided documentation with the file gave no real examples of how to set the first line.
And there's no reason in the world it should as it's about using the filter and not about opening a video. That kind of basic information is found on the AviSynth website on pages such as this one:

http://avisynth.nl/index.php/First_script

...and I got an error to the point of 'unexpected something something''...
And it pointed to the AviSource line in the script, and not the QTGMC line?
I don't use vdub to write scripts, I just notepad documents in which I give an .avs to their names.
So do most people, including me. I mentioned VDub as a way to test out your script, not to write it.

...but now I get a flickering artifact on the encoded video.
Please make available a sample from the source, before the QTGMC step. Ten seconds with steady movement will be plenty, a section you think gets 'flickery' after the use of QTGMC.

LigH
26th June 2013, 07:43
For more convenience than Notepad, there is also the old VirtualDubMod with integrated AVS editor (Ctrl+E), or the more modern AvsPmod suite.

Still ... "RTFM", know the basics before advancing. :)

Trademark
26th June 2013, 13:09
Actually it seems as though avidemux is causing issues with the AVI files I created from the TS files to use with avisynth in the first place-- the audio and video do weird things.

I'll relearn how to load up TS files through directshow. This issue has nothing to do with QTGMC so I'll ask it elsewhere.

wonkey_monkey
1st July 2013, 17:38
Does anyone know why, when I try to QTGMC a clip with audio (provided by nicac3source) I get this error:

Avisynth open failure
Cache: Filter returned invalid response to
CACHE_GETCHILD_CACHE_MODE.93484280

But if I leave out the audio, there's no problem. Is this by design, i.e., QTGMC is just not meant to be run on clips with audio?

David

IanB
1st July 2013, 23:11
It means you are using a plugin compiled as API version 5 but it is not a full API version 5 plugin.

Typically a 2.6 plugin compiled with an old or modified avisynth.h

If you use early release 2.6 plugins you must make sure they are compatible with the build of Avisynth 2.6 you are using.

wonkey_monkey
1st July 2013, 23:37
Ah, thanks!

David

Trademark
11th July 2013, 14:32
Ok, I have gotten my .ts files loaded thanks to other members of the forum. Now then, it seems as though I'm in need of some additional filters on my script with qtgmc, or perhaps might need something entirely else to get maximum quality out of the type of video I'm processing. Below are 4 pictures, each of yadif and qtgmc preset slower.

qtgmc 1 (http://i.imgur.com/lknnOcu.jpg)
yadif 1 (http://i.imgur.com/RAKTpaO.jpg)

qtgmc 2 (http://i.imgur.com/MTEKLkT.jpg)
yadif 2 (http://i.imgur.com/DmgSGTt.jpg)

qtgmc 3 (http://i.imgur.com/iR0K1rI.jpg)
yadif 3 (http://i.imgur.com/IJT8KKl.jpg)

qtgmc 4 (http://i.imgur.com/1PC9tE1.jpg)
yadif 4 (http://i.imgur.com/R9zRnLK.jpg)


With only 'qtgmc(preset=slower), I notice more ghosting/ringing effects on qtgmc compared to yadif, and some of the jaggies around diagonal edges aren't as smoothed as I would liked them to have been. Basically it's not quite the jump in quality I'm looking for.

Also, I've tried searching the thread for 'slow motion' but couldn't find any answers as to why qtgmc slows the resulted video down, even though I made it output in the same 30fps as my previous files.

Any thanks would be appreciated.

manono
11th July 2013, 22:38
couldn't find any answers as to why qtgmc slows the resulted video down, even though I made it output in the same 30fps as my previous files.
That's probably due to the way you made it output in the same 30fps as my previous files. QTGMC is a bobber. It will natively give you back twice the number of frames at twice the framerate (60fps in your case). If you simply add in 'AssumeFPS(30)' to your script, then of course it slows it down. If you add in ConvertFPS(30), then you get that blended crap you're blaming on QTGMC. If you add in 'SelectEven()' instead, then it halves the frame count and you get back your 30fps at the original speed. And no blending.

Anyway, as already requested, please post a short sample. And also your full script.

Trademark
11th July 2013, 23:44
http://www.mediafire.com/?ixpab7ksiz33ukn

Here is a 1 minute sample of the video still interlaced. I had to re-encode it using x264 again with avidemux to get it under 200mb. Original .ts was using h264 as well.

Here is my script:

LWLibavVideoSource("C:\Users\Owen\Desktop\test1.TS")
QTGMC(Preset="slower")
SelectEven()

Guest
11th July 2013, 23:56
Only an unprocessed source sample is interesting. Use DGSplit to cut a small piece. Do not re-encode it.

Trademark
12th July 2013, 00:23
http://www.mediafire.com/download/xtg119u3tj3ur4a/test2_0.TS

there you go

Guest
12th July 2013, 03:12
For that game footage this works fine and is much faster than QTGMC:

dgsource("test2_0.dgi")
separatefields()
eedi2()
selecteven()

manono
12th July 2013, 03:26
I'm seeing that same ghost image stuff even in the separated fields, as well as in the Yadif and QTGMC results. It's in the source, I think:

Guest
12th July 2013, 03:29
I'm seeing that same ghost image stuff even in the separated fields, as well as in the Yadif and QTGMC results. It's in the source, I think: Yes, I agree. I see it in the source too.

Trademark
12th July 2013, 06:11
It isn't the ghosting so much that bothers me, because it's like the game's attempt at motion blurring, but it's the jaggedness of some of the lines that I thought eedi would correct more than just a raw yadif filter, and the numbers and other hud graphics staying solid with as little blurring as possible. I didn't see much of an improvement in those aspects with qtgmc. Even decomb with yadif using handbrake does a good job at that, because it just uses lowpass filter on frames that have very low amounts of combing.

I'll try that separatefields, eedi script out.

edit: I don't know if it's because I'm still using the lwlibavideosource instead of dgsource to load the file, but that script is giving me horrible bobbing effects.

Guest
12th July 2013, 14:05
edit: I don't know if it's because I'm still using the lwlibavideosource instead of dgsource to load the file, but that script is giving me horrible bobbing effects. Your source filter is not setting the parity correctly. You'll have to set it manually. Add assumetff() before the separatefields().

Trademark
12th July 2013, 14:36
Ok, thanks.

Unfortunately that outputs into something that's far from ideal. It looks noticeably interpolated-- kind of like the effect one would get from a line doubler.

Is there a way for qtgmc to output something as clean looking as yadif without the ringing artifacts? Specifically image4 of my comparison pictures that show qtgmc to still have ringing artifacts around the robot and the detail within the building in front of it being scrambled together vs smoothly fitted together on yadif.

poisondeathray
12th July 2013, 15:38
Ok, thanks.

Unfortunately that outputs into something that's far from ideal. It looks noticeably interpolated-- kind of like the effect one would get from a line doubler.

Is there a way for qtgmc to output something as clean looking as yadif without the ringing artifacts? Specifically image4 of my comparison pictures that show qtgmc to still have ringing artifacts around the robot and the detail within the building in front of it being scrambled together vs smoothly fitted together on yadif.



This blending looks like the result is from using a non frame accurate source filter

QTGMC looks at fields before and after. If you have a non frame accurate source filter, the frames can get "mixed up" and give you these types results

An alternative workflow if you don't use nvidia card or have dgnvtools, is to encode to a lossless intermedate using ffmbc, then run your scripts on that

e.g.

ffmbc -i input.ts -vcodec ffv1 -an output.avi

poisondeathray
12th July 2013, 16:03
yadif(mode=0, order=1)
http://i42.tinypic.com/2ngwv1i.png

assumetff.qtgmc.selecteven
http://i42.tinypic.com/nyfeps.png

tdeint + edeint qtgmc + tmm mask
http://i41.tinypic.com/qwwvsy.png


Notice QTGMC doesn't exhibit the "ghosting" that your screenshot showed. This is because of frame accuracy (but yes, there is ghosting in parts of the original as shown by manono, but your screenshot was a different type of "ghosting" caused by the interaction of non frame accurate source filter)

Also, these are still images. You have to preview it in motion to get a sense of how well it's doing temporally in order to adjust the settings and tweak your scripts

There are pros/cons to each deinterlacer. QTGMC will produce more temporally stable results (less twittering and line buzzing), but things like the HUD and text will be less legible and blurred. yadif will produce less stable results, with more aliasing. You might use TDeint with a TMM mask. I would probably use a combination with masking (a separate overlay over some of the middle HUD region so the text is more legible using the TDeint + TMM method, but use yadif or another deinterlacer for the lower left km/h text, because the km/h numbers will often be blended by temporal deinterlacers)

HolyWu
12th July 2013, 16:21
Nicely spot, poisondeathray.

Trademark, you needs to put a SelectEven() after LWLibavVideoSource("C:\Users\Owen\Desktop\test1.TS"), otherwise the frames will display twice.

Trademark
12th July 2013, 19:33
yadif(mode=0, order=1)
http://i42.tinypic.com/2ngwv1i.png

assumetff.qtgmc.selecteven
http://i42.tinypic.com/nyfeps.png

tdeint + edeint qtgmc + tmm mask
http://i41.tinypic.com/qwwvsy.png


Notice QTGMC doesn't exhibit the "ghosting" that your screenshot showed. This is because of frame accuracy (but yes, there is ghosting in parts of the original as shown by manono, but your screenshot was a different type of "ghosting" caused by the interaction of non frame accurate source filter)

Also, these are still images. You have to preview it in motion to get a sense of how well it's doing temporally in order to adjust the settings and tweak your scripts

There are pros/cons to each deinterlacer. QTGMC will produce more temporally stable results (less twittering and line buzzing), but things like the HUD and text will be less legible and blurred. yadif will produce less stable results, with more aliasing. You might use TDeint with a TMM mask. I would probably use a combination with masking (a separate overlay over some of the middle HUD region so the text is more legible using the TDeint + TMM method, but use yadif or another deinterlacer for the lower left km/h text, because the km/h numbers will often be blended by temporal deinterlacers)

Much thanks for the explanation and images! Tdeint+TMM seems to be what I'm going after the most. Of the 3, it has the crispest and most legible text and numbers, making yadif almost obsolete, but it seems as though QTGMC has the smoothest and most well blended information with the buildings and other environmental objects.

Is there some kind of way to use qtgmc with tdeint+tmm over the hud areas to get the best of both worlds? I'm not too experienced at scripting.

Also, I heard of yadif mod that uses eedi2 or something like that? Are there any possibilities with that?

I will try to get a proper render with qtgmc to see how it compares in motion to yadif.

poisondeathray
12th July 2013, 19:45
Much thanks for the explanation and images! Tdeint+TMM seems to be what I'm going after the most. Of the 3, it has the crispest and most legible text and numbers, making yadif almost obsolete, but it seems as though QTGMC has the smoothest and most well blended information with the buildings and other environmental objects.

Is there some kind of way to use qtgmc with tdeint+tmm over the hud areas to get the best of both worlds? I'm not too experienced at scripting.



Yes, this was what I was trying to say. You might use overlay() or mt_merge() with masktools to combine different parts using a mask (e.g. you might use QTGMC overall, but the Tdeint/QTGMC/TMM over most of the HUD parts, and something like yadif over the km/h numbers part) . I'll try to post an example script if I have time later today


Also, I heard of yadif mod that uses eedi2 or something like that? Are there any possibilities with that?



Yes, of course there are many options for deinterlacers, and many settings, some work better for different material than others. Try them out and play with the settings

eg. for yadifmod with nnedi3 for edeint
yadifmod(order=1, mode=0, edeint=nnedi3(field=1))


I will try to get a proper render with qtgmc to see how it compares in motion to yadif.

I think the take home message is use a frame accurate source filter, especially with temporal filters

poisondeathray
12th July 2013, 20:46
If you wanted to use tdeint/edeint qtgmc/tmm on the whole thing, this is what i used in the earlier example (play with the settings to tweak results, e.g. maybe you want to tweak the combing threshold)



WhateverSource() #make sure this is frame accurate
AssumeTFF()
A2 = last
A2 = A2.QTGMC(Preset="slower").SelectEven()
TDeint(order=1, field=1, edeint=A2,emask=TMM(mode=0, order=1, field=1),slow=2,chroma=true,MI=80,full=false,cthresh=9)



Maybe you're happy with it, maybe it's good enough for your goals (it defintely looks better on the text and L.Arm, R.Arm weapons parts of the HUD)

But notice it makes mistakes on certain parts, notably the km/h reading. Every few frames, it gets a blend of the adacent field, same with QTGMC

yadif vs. qtgmc vs. tdeint + edeint qtgmc + tmm mask
http://i44.tinypic.com/21enw4w.png



A mask uses the luminance to convey transparency info. Areas in white are 100% transparent, black is 100% opaque, and shades in between are intermediate

So make a mask in an image editor (e.g. photoshop, gimp, paint), that covers the area in white
http://i41.tinypic.com/2prbdao.png

In this example, I want to use tdeint + edeint qtgmc + tmm for everything except the km/h numbers , which yadif is used for :



main = WhateverSource() #make sure this is frame accurate

### this is for tdeint/qtgmc edeint/ tmm
main
AssumeTFF()
A2 = last
A2 = A2.QTGMC(Preset="slower").SelectEven()
TDeint(order=1, field=1, edeint=A2,emask=TMM(mode=0, order=1, field=1),slow=2,chroma=true,MI=80,full=false,cthresh=9)
b=last

### this is for yadif
main
yadif(mode=0, order=1)
c=last

### this is the mask, make start and end the same number of frames as the main video
ImageSource("2prbdao.png", start=0, end=2240 )
AssumeFPS(30000,1001)
ConvertToYV12()
mymask=last

Overlay(b, c, mask=mymask)




One way you can think of it as the yadif version "covering up" that small section of white in the mask (ie. the numbers in the km/h part)

You can combine other masks, e.g. lets say you wanted filter QTGMC over everything, but TDeint/edeint QTGMC/TMM with only the HUD except the km/h numbers. You would do basically the same thing, just make a different mask and overlay. Note there are other ways to do this as well e.g. with mt_merge and masktools

creaothceann
12th July 2013, 22:01
Isn't it possible to dynamically detect the areas where interlacing occurs and create a mask from that?

(Btw. I have no idea why the game wouldn't look terribly interlaced on a TV either - I can understand old consoles using the "240p" trick to create a progressive picture and the capture card failing to capture that correctly, but this seems to be truly interlaced...)

Trademark
12th July 2013, 23:30
Ok so now I'm working on getting the ts to load frame accurately, and I don't have an nvidia card. You mention ffmbc? I downloaded something called ffmbc that was hosted by google, but that doesn't seem to be it.

Guest
13th July 2013, 01:04
DGAVCDecDI + DiAVC is an option. It is all CPU-based. I believe you already have a DG tools license, so it would cost you only $10 for the DiAVC license.

Also, the legacy unsupported DGAVCDec also seems to work fine with your sample.

Trademark
13th July 2013, 04:09
Thank you for bringing DGAVCDecode to my attention. Now I got a frame-accurate feed for qtgmc to tear through. I compared yadif to qtgmc slower and I like what qtgmc does a lot to the environment, solving a lot of the jagged-liquid looking edges around the buildings I didn't like-- makes it look a lot smoother looking (still at 30fps).

The hud text isn't that huge of an improvement so I'll try the tdeint + edeint qtgmc + tmm thing next and then go on to using masks if I can get the scripting right.

Edit: After using the script provided by poisondeathray, I'm fairly certain the qtgmc+tdeint script is very much what I'm looking for, the results are very clean!

yadif (http://i.imgur.com/dF9FjzE.png)
qtgmc (http://i.imgur.com/FhdqhNu.png)
qtgmc+tdeintTMM (http://i.imgur.com/qhQ291o.png)

poisondeathray
13th July 2013, 05:36
You mention ffmbc? I downloaded something called ffmbc that was hosted by google, but that doesn't seem to be it.

Yes that's it
http://code.google.com/p/ffmbc/

It's a command line application like ffmpeg. It handles interlaced AVC streams much better than ffmpeg derivatives seem to choke on or have problems with

Sometimes you have to use something else - because DGAVCDec has issues with some AVC PAFF streams

qwerty1983
27th July 2013, 11:37
Hello.
I want to edit some small clips (2-3 minutes, dvb-t, h264/interlaced, 720x576)

I'm using this script but it's extremely slow (even though i only care about quality)
.......
QTGMC(MatchPreset="slower",SourceMatch=3,Lossless=2)
MCTemporalDenoise(settings="medium",twopass=true,chroma=true,strength=0)
......

1) What if i create a script using only QTGMC to create an intermediate file (lossless-HuffYUV) and then create a second script to edit this intermediate file using MCTemporalDenoise?
Is it the same as using both filters in one script?

2) Does it make any sense to raise subpel to 4 (1/4 pixel) and change nnsize to 3 (48x6)? Will i gain in quality?

Thanks in advance.

Stereodude
27th July 2013, 18:17
Hello.
I want to edit some small clips (2-3 minutes, dvb-t, h264/interlaced, 720x576)

I'm using this script but it's extremely slow (even though i only care about quality)
.......
QTGMC(MatchPreset="slower",SourceMatch=3,Lossless=2)
MCTemporalDenoise(settings="medium",twopass=true,chroma=true,strength=0)
......

1) What if i create a script using only QTGMC to create an intermediate file (lossless-HuffYUV) and then create a second script to edit this intermediate file using MCTemporalDenoise?
Is it the same as using both filters in one script?Should be, but not sure that you'd gain anything in terms of speed. If anything I'd expect it to be a little slower since you have the extra steps of compressing / decompressing HuffYUV in there now.

qwerty1983
27th July 2013, 20:27
Should be, but not sure that you'd gain anything in terms of speed. If anything I'd expect it to be a little slower since you have the extra steps of compressing / decompressing HuffYUV in there now.

It's much faster. Look at the picture (20 hours vs 30 minutes !!?). Do both methods give me the same file in terms of quality?

http://img182.imagevenue.com/loc459/th_495290865_00000test_122_459lo.jpg (http://img182.imagevenue.com/img.php?image=495290865_00000test_122_459lo.jpg)

Stereodude
27th July 2013, 21:50
It's much faster. Look at the picture (20 hours vs 30 minutes !!?). Do both methods give me the same file in terms of quality?

http://img182.imagevenue.com/loc459/th_495290865_00000test_122_459lo.jpg (http://img182.imagevenue.com/img.php?image=495290865_00000test_122_459lo.jpg)Yes, they should give about the same quality. The crop before MCTD could change the output at the very edge of the video frame very slightly between the two. I would probably use Lagarith as the intermediate codec instead of HuffYUV since it supports YV12 directly (since I believe that's the output you're getting from the filter chain). Are you using fast recompress in VirtualDub?

I see that you're showing a big performance increase. My guess is that MCTD is requesting frames that are outside of the AVIsynth cache of the output from QTGMC. So QTGMC has to process the input video over again to feed it to MCTD. You can probably get the same speed without the intermediate file by using MP_Pipeline (http://forum.doom9.org/showthread.php?t=163281) and setting the prefetch parameter appropriately (Note, I'm not sure what that appropriate value is).

qwerty1983
27th July 2013, 22:13
...Are you using fast recompress in VirtualDub?
.... You can probably get the same speed without the intermediate file by using MP_Pipeline (http://forum.doom9.org/showthread.php?t=163281) and setting the prefetch parameter appropriately (Note, I'm not sure what that appropriate value is).
My original videos are YV12 so i'm using fast recompress in VDub and then using HuffYUV (FFmpeg variant).
I'll take a look at MP_Pipeline in the next days.
Thanks for the answers.

kypec
28th July 2013, 06:53
Although I know about MCTD's superior qualities, did you try to tinker with EZDenoise parameter and denoising functions that QTGMC offers? That might give you nice boost in speed with almost no quality loss, at least it did for me.

Morte66
31st July 2013, 21:22
Hi

I haven't done much with Avisynth in the last couple of years, and never much with true interlaced sources, but recently found myself with an interlaced dance DVD to watch. I stuck some filters together (DG_Decode, McBob/NEEDI2, crop, levels, BlindDeHalo3, MAnalyse/MDegrain3, SeeSaw) and let it grind away single threaded. It worked nicely enough, but could not be accused of speed (about 1.5fps)

Now I'm thinking of doing more of this, and found I can get equally satisfactory results at about 3x the speed with your script. So I was wondering about a couple of things…

1. I normally process/encode/view in PC levels. I’ll usually clip the black a little when levelling. I’ve had trouble in the past with levelling before deinterlacing, in particular TDeint() never seemed to like it. So I’m in the habit of deinterlacing the original then changing levels. I wonder if you have any experience/advice about this with your script?

2. I notice that you default chroma denosing to off. Chroma is the noise that bothers me most. So I wonder, do default to off just because you've no particular reason to default to on, or are there circumstances where you think chroma denoise might be a bad idea?

wonkey_monkey
31st July 2013, 21:54
Wasn't expecting there to be so many replies after qwerty's original question...

MCTemporalDenoise can accept an interlaced input (with interlaced=true), so would it make more sense to do that first, then QTGMC?

David

foxyshadis
31st July 2013, 22:08
Wasn't expecting there to be so many replies after qwerty's original question...

MCTemporalDenoise can accept an interlaced input (with interlaced=true), so would it make more sense to do that first, then QTGMC?

David

The interlaced support of MCTemporalDenoise is a hack; it doesn't do any kind of field realignment to fix the motion compensation and thus can cause artifacts or shifting objects. It just separates before filtering and weaves after, nothing else.

Mystery Keeper
2nd August 2013, 11:23
The interlaced support of MCTemporalDenoise is a hack; it doesn't do any kind of field realignment to fix the motion compensation and thus can cause artifacts or shifting objects. It just separates before filtering and weaves after, nothing else.

I do the same by hand with my denoising script. Can you give an example how it should be done properly?

foxyshadis
2nd August 2013, 22:40
I do the same by hand with my denoising script. Can you give an example how it should be done properly?

You bob the script first, which eliminates the half-line shift. If you don't notice the difference, it might not be worthwhile.

Mystery Keeper
5th August 2013, 12:05
You bob the script first, which eliminates the half-line shift. If you don't notice the difference, it might not be worthwhile.

Ah, actually, that's what I do. Since I figured motion compensation on the frames with missing lines might be quite erroneous.

Morte66
12th August 2013, 09:25
Hi

1. I normally process/encode/view in PC levels. I’ll usually clip the black a little when levelling. I’ve had trouble in the past with levelling before deinterlacing, in particular TDeint() never seemed to like it. So I’m in the habit of deinterlacing the original then changing levels. I wonder if you have any experience/advice about this with your script?

2. I notice that you default chroma denosing to off. Chroma is the noise that bothers me most. So I wonder, do default to off just because you've no particular reason to default to on, or are there circumstances where you think chroma denoise might be a bad idea?

Answering my own questions after a fortnight of fiddling:

QTGMC seems entirely happy working in PC levels, better than the original TV levels, even if you clip at 16..235 on a DVD with outlying data spanning 11..240. I get better blocking, banding, motion, shadow detail, general detail, much better x264... ...all the usual benefits, no obvious drawbacks.

It seems Chroma denoise is fine. The reason I'd turn it off is to use a heavyweight external denoiser after QTGMC instead. So far I've preferred BlindDehalo3 + MDegrainN (reusing vectors) + Seesaw for DVD, and TTempSmoothF for HD video.


As you say, stability and threading is a bit of a black art. AvisynthMT 2.6 alpha 4 and your latest plugins weren't stable at all, the furthest I got was 236 frames. But alpha 3 with the previous plugins is very solid.

I've used MT with 8 threads for QTGMC on my core 2 quad. That works fine with MDegrain in the same script for DVD, but it really doesn't like TTempSmoothF. So for HD I level and deinterlace into HuffYUV, then use a second script to denoise into x264 at crf 16.


Speaking of HD... so impressed was I with QTGMC on my Mayerling DVD, that I bought a BluRay drive and four 1080i dance discs. The first piece has come off the queue and looks great. So thanks for your lovely script. Now I'll see if I can melt the CPU.

Jeroi
15th August 2013, 21:15
I am trying this but MPC says Removegrain: invalid mode type 20?

this is with basic slow settings.

manono
15th August 2013, 22:35
I am trying this but MPC says Removegrain: invalid mode type 20?
You're using the wrong version of RemoveGrain. Be sure to use the versions of everything found in the Plugins Package (or the Modded Plugins Package) linked on the first page.

Jeroi
15th August 2013, 22:49
You're using the wrong version of RemoveGrain. Be sure to use the versions of everything found in the Plugins Package (or the Modded Plugins Package) linked on the first page.

Thanks I downloaded lates 1.0 and it worked. Finally I got good quality deinterlace for my little pony without blurring effect. Thanks a lot.

koopa
16th August 2013, 02:17
I have always loved this deinterlacer, but I am now working with 10bit footage, and want to create 10bit outputs so I can colour correct after. Is it possible to do that, and if not, can anyone recommend a deinterlacer that works anywhere near as well but with 10bit (otherwise perhaps RedGiant's 'Frames' / 'MagicBullet')?

Jeroi
16th August 2013, 06:41
hmm I have q9300 4 core intel. At the moment with 8 threads and 700 memory setting and suggested 1 handling and I use the plugin in slow mode with basic multithreading I get only 9.5FPS on 720*576px material which makes one pass 3.5hours. Is this normal?

SetMemoryMax(800)
SetMTMode(3, 8)
Video = MPEG2source("Vuosijuhla.d2v").ConvertTorgb32().Crop(7, 1, -7, -1).Lanczos4Resize(720,576)
Audio = directshowsource("vuosijuhla DELAY 32ms.ac3")
audiodub(Video,Audio)

ConvertToyv12()
SetMTMode(2)
QTGMC( Preset="Slow", EdiThreads=1 )
SelectEven()
Distributor()

DeBlock()
Sharpen(0.1)

manono
16th August 2013, 06:48
If you want faster encoding use a faster preset. The differences are slight until you get to the really fast ones.

And since your video is already in YV12, you don't need that line.

Boulder
16th August 2013, 07:19
He's converting to RGB32 for cropping, but I would not do that. Crop eight pixels off the sides, four from top and bottom, use QTGMC and then resize. Resizing interlaced material is a serious no-no.

Jeroi
16th August 2013, 07:24
If you want faster encoding use a faster preset. The differences are slight until you get to the really fast ones.

And since your video is already in YV12, you don't need that line.

For some reason, crop did not work without converttoRGB32 and same lanczos4resize. altho in avisynth page are said that they support yv12 but did not work.

manono
16th August 2013, 07:59
He's converting to RGB32 for cropping...
Oh yeah, you're right. Thanks for the correction as I hadn't even noticed the RGB conversion and then the crops.
For some reason, crop did not work without converttoRGB32...
Because you can't crop in odd numbers in YV12:

AviSynth's Crop Page (http://avisynth.nl/index.php/Crop)

Anyway, as Boulder points out, cropping interlaced material properly is difficult. I'd suggest waiting until after you make it progressive and then crop in even numbers.

Jeroi
16th August 2013, 11:37
Oh yeah, you're right. Thanks for the correction as I hadn't even noticed the RGB conversion and then the crops.

Because you can't crop in odd numbers in YV12:

AviSynth's Crop Page (http://avisynth.nl/index.php/Crop)

Anyway, as Boulder points out, cropping interlaced material properly is difficult. I'd suggest waiting until after you make it progressive and then crop in even numbers.

Yes I discovered this when I viewed my 2 samples, it seams resize blends interlaced video and thus makes poorer image out of it. So I switched cropping to lanczos4resize filter only because it supports YV12 cropping and it is after deinterlacing and now I can get better image out of it.

cedricm
17th August 2013, 08:34
So after 5 days of waiting after registering on this forum, I finally am able to post something...

I've been using the QTGMC script quite a while now. Two weeks ago I bought a new PC with a Core i7 4770 CPU and damn, a HUGE difference in encoding times compared to my old P4 desktop...

Now, I've been playing around with Avisynth MT since I'm using this new setup but I can't seem to get it encoding without crashing. I've been trying out different combinations of avisynth versions and plugins from this topic but it just keeps crashing...

I figured out the crashing starts happening whenever I add the "Distributor()" line in the script. If I put this line in comment, the encoding process finishes without any problems. HOWEVER: Not adding this command results in half the framerate of encoding. (Without Distributor() => 45FPS, With Distributor() => 90FPS) (I've read on previous pages in this topic the Distributor command should not be used, but can anyone explain why it drops framerate by half then?).
Also, if I don't add the Distributor command only 20% of the CPU is in use so I think the multithreading capabilities of the CPU aren't even used without this command
I've played with different SetMemoryMax values ranging from 400 to 1200 but still no go. I also played with the EdiThread value

I am using Avidemux + AVS Proxy to route the avisynth scripts to avidemux. My encoding settings are x264 video with MP3 audio in an MP4 container.
The source files are lossless DTV captures with Lagarith and uncompressed WAV audio.

This is my current Avisynth script:

SetMTMode(3, 6)
AVISource("E:\capture.avi", true)
SetMTMode(2)
AssumeTFF()
QTGMC(Preset="Very Fast", EdiThreads=1)
LanczosResize(720,540)
Crop(0, 2, 0, -2)
AddBorders(0, 2, 0, 2, color=$000000)
# Distributor()

Oh and, the crashes occur some point at random in the encoding process. Sometimes it crashes after 4 seconds, sometimes when it hits 90%, sometimes it doesn't even crash at all but then I get an output file with audio or video glitches

creaothceann
17th August 2013, 08:43
Maybe it's Avidemux? Try using only x264.exe from the command line.

Groucho2004
17th August 2013, 11:18
I've been trying out different combinations of avisynth versions and plugins from this topic but it just keeps crashing...
You should use the latest Avisynth MT DLL from Set.
Also, define crashing. What crashes? Is there an error message?


I am using Avidemux + AVS Proxy to route the avisynth scripts to avidemux.
Start testing the script without any Gui or encoder. Use AVSMeter (http://forum.doom9.org/showthread.php?t=165528) to check CPU and memory usage and if this already crashes.

I've read on previous pages in this topic the Distributor command should not be used
This very much depends on the application you serve the frames to. I'm only aware of two scenarios where you need the Distributor() call in the script - serving frames to ffdshow and some piping tools like the original avs2yuv which don't call this function.

cedricm
17th August 2013, 17:13
You should use the latest Avisynth MT DLL from Set.
Also, define crashing. What crashes? Is there an error message?

I am using the latest DLLs. Made sure of that. The QTGMC DLLs also match the correct ones for the avisynth version I am using.

It's the avsproxy executable which crashes while encoding.
http://i44.tinypic.com/2j3l0lx.png


Start testing the script without any Gui or encoder. Use AVSMeter (http://forum.doom9.org/showthread.php?t=165528) to check CPU and memory usage and if this already crashes.

http://i39.tinypic.com/mm4med.png
It didn't crash


This very much depends on the application you serve the frames to. I'm only aware of two scenarios where you need the Distributor() call in the script - serving frames to ffdshow and some piping tools like the original avs2yuv which don't call this function.
Is there any good alternative to Avidemux I could use (which has a nice GUI and built in encoders for example)? I haven't worked with encoders from commandline yet but I will try it.

Groucho2004
17th August 2013, 18:42
It's the avsproxy executable which crashes while encoding.
http://i44.tinypic.com/2j3l0lx.png

http://i39.tinypic.com/mm4med.png
It didn't crash

Is there any good alternative to Avidemux I could use (which has a nice GUI and built in encoders for example)? I haven't worked with encoders from commandline yet but I will try it.
Looks like you found the culprit. The CPU usage and speed in the AVSMeter screen shot look pretty good to me. You could easily go for a slower (and visually better) preset. You could also allocate a bit more memory if that improves performance.
No idea about gui options. Many people here seem to use Megui.

cedricm
17th August 2013, 19:12
Looks like you found the culprit. The CPU usage and speed in the AVSMeter screen shot look pretty good to me. You could easily go for a slower (and visually better) preset. You could also allocate a bit more memory if that improves performance.
No idea about gui options. Many people here seem to use Megui.

I have taken a look at MeGUI. It is not as intuitive as Avidemux but it perfectly fits my needs after playing around with it! Also, MeGUI doesn't seem to have the same crashing issues (so far) or audio/video glitches when multithreading like Avidemux.

I will contact the creator of Avidemux about this issue.

Thanks alot for the help & hints!

koopa
19th August 2013, 06:38
Is there a way to get this deinterlacer to work with 10bit input/outputs?

Bloax
24th August 2013, 13:45
I seem to be having some.. "Funny" issues with the plugins. Both the "normal" modded plugins and the "updated to the new 2.6 interface" modded plugins return an error that looks somewhat like this:
https://dl.dropboxusercontent.com/u/63152810/Screenies/dumb/masktoolsmodded.png
(Don't mind the "..\AviSynth 2.5\.." location, I do use the latest of 2.6 MT (http://forum.doom9.org/showthread.php?t=148782))

The real issue comes when most of them work just fine unmodded, except masktools2 - which instead returns an error like this:
https://dl.dropboxusercontent.com/u/63152810/Screenies/dumb/masktoolsunmodded.png

Any ideas?

Reel.Deel
24th August 2013, 13:51
MaskTools2 for 2.6 no longer works with the latest AviSynth alpha 4. Try this updated MaskTools (http://forum.doom9.org/showpost.php?p=1619023&postcount=649).

byme
2nd September 2013, 14:21
I have a question

the QTGMC, Placebo mode, I noticed that "sharpen" the image so decided
I want to know if it's all due to the sharpening, or if it depends on something else

What kind of sharpening using the QTGMC?
is possible extract the sharpening (or other filters that are used to improve the image) from QTGMC?.. for use with video already deinterlaced

thanks

(sorry for my english)

help me please :o

if it was not possible to extract sharpen, at least you know how to disable everything else, including the deinterlace?

:thanks:

qwerty1983
2nd September 2013, 15:58
help me please :o

if it was not possible to extract sharpen, at least you know how to disable everything else, including the deinterlace?

:thanks:

I'm not an expert but if you want to use QTGMC with progressive material try this:
QTGMC(InputType=1)

byme
2nd September 2013, 17:26
I'm not an expert but if you want to use QTGMC with progressive material try this:
QTGMC(InputType=1)

:eek:

many thanks!

Bloax
4th September 2013, 15:56
MaskTools2 for 2.6 no longer works with the latest AviSynth alpha 4. Try this updated MaskTools (http://forum.doom9.org/showpost.php?p=1619023&postcount=649).
Late as sin on this, but thanks - that works.

Xoemab
10th September 2013, 07:06
Hello guys.. I tried to use this Script and here my result Screenshot Comparison (http://screenshotcomparison.com/comparison/40393)

I used this settings.. Can I do something else to increase quality?

QTGMC(Preset="placebo", NoisePreset="slower")
SelectEven()
MSharpen(threshold=0, strength=255, highq=true)

LigH
10th September 2013, 07:33
You may increase sharpness. But you can never "increase quality". What is not recorded is lost.

And regarding sharpness and artifical detailling, I believe you already exaggerated. Half as slow presets may have provided just as much change. Possibly too much anyway.

Xoemab
10th September 2013, 08:08
Yeah I didn't mean literally increase quality (you understood), ok I will play more with the settings, what I wanted to ask is do I need anything more except QTGMC script and MSharper to make image look better?

Edit: I played with settings and ```QTGMC(Preset="Faster", NoisePreset="Faster")``` gave better result from all (actually NosiePreset didnt do any change so i left faster)

Hacker?pcs
16th September 2013, 09:07
Hi. I started using QTGMC recently and I like it very much, it's way better than yadif I was using before. I have a problem with the result though.
Source:
http://oi41.tinypic.com/242x1fn.jpg
QTGMC:
http://oi41.tinypic.com/2vbodhf.jpg
Yadif:
http://oi42.tinypic.com/2nun2go.jpg

Another frame with QTGMC:
http://oi43.tinypic.com/2ngwpyr.jpg

As you can see there is a problem with court lines, they are blurred. Is there any setting so I can fix that? I encode mostly football and basketball matches so it is very important to me.
I am using QTGMC 3.33 (from here (http://www.spirton.com/uploads/QTGMC/QTGMC-3.33.avsi)), Avisynth 2.6 alpha 4 with 2013.03.09 SEt's MT version and modded plugins package. My avisynth script is this (using StaxRip):
LoadPlugin("---\StaxRip_1.1.9.0\Applications\AviSynth plugins\FluxSmooth\FluxSmooth.dll")
SetMemoryMax(1200)
SetMTMode(3, 4)
DirectShowSource("---\test.ts", audio=false, convertfps=true, fps=25)
Crop(0,0, -Width % 8,-Height % 8)
ConvertToYV12()
SetMTMode(2)
QTGMC( Preset="Slow", EdiThreads=3 )
SelectEven()
FluxSmoothT(4)

Mole
16th September 2013, 09:31
I recommend you index your ts for example with DGIndexNV instead of using DirectShowSource+convertfps.

Depending on your ts splitter and video codec, convertfps may change your video in order to keep it at 25fps. This is not a good thing for interlaced video.

Also, there's no need to put that ConvertToYV12() since the .ts is already YV12.

Hacker?pcs
16th September 2013, 16:51
Thanks a lot, that was the problem:
http://i43.tinypic.com/155rz2f.jpg
Great deinterlacer :D

About the ConvertToYV12() StaxRip automatically adds it. Does it affect anything if the source file is Huffyuv YUY2 one? Because most work I want to do is with these files.

Mole
16th September 2013, 17:09
For avisource Huffyuv files, you will need to have ConvertToYV12().

For .vob and .ts, there's no need.

Hacker?pcs
16th September 2013, 17:27
Loud and clear, thank you for your support.

Hacker?pcs
16th September 2013, 20:52
For avisource Huffyuv files, you will need to have ConvertToYV12().

For .vob and .ts, there's no need.
If it is applied though on vob/ts, is there any harm?

EDIT
Found my anwser
http://avisynth.org/mediawiki/Convert[/url]"]AviSynth prior to v2.5 can deal internally with two color formats, RGB and YUY2. Starting from v2.50 AviSynth can also deal with a third color format, YV12. These six filters convert between them. If the video is already in the specified format, it will be passed through unchanged.

LigH
17th September 2013, 07:51
There may only be harm if ConvertToYV12 actually does a conversion down from a finer chroma subsampling (e.g. from YUY2). For a good reason, it has the boolean parameter "interlaced".

But if the source is already YV12, ConvertToYV12 does nothing. Therefore it will do nothing wrong.

Hacker?pcs
17th September 2013, 14:33
There may only be harm if ConvertToYV12 actually does a conversion down from a finer chroma subsampling (e.g. from YUY2). For a good reason, it has the boolean parameter "interlaced".
So if the source is interlaced, "interlaced" flag must be set at true? And if yes, what impact does it have if it is called like "ConvertToYV12()" (leaving "interlaced" to default false)?

Also about colorspaces:
Does converting from HuffYUV YUY2 4:2:2 source to h264 YV12 4:2:0 make any quality difference? And if yes, can I encode with x264 to YUY2 without converting to YV12 first?

Sorry for the offtopic questions :)

LigH
17th September 2013, 14:47
I hope the images in this post in the German doom9/Gleitz board (http://forum.gleitz.info/showthread.php?45902&p=434610#post434610) will explain the risk of underestimating the meaning of the "interlaced" parameter while converting to a chroma subsampling format which calculates averages between two lines, and the result depends on the choice whether the next or the next-but-one line is taken account of.

poisondeathray
17th September 2013, 14:57
Also about colorspaces:
Does converting from HuffYUV YUY2 4:2:2 source to h264 YV12 4:2:0 make any quality difference? And if yes, can I encode with x264 to YUY2 without converting to YV12 first?


It also depends what the "real" source was before huffyuv

You can get QTGMC to work in YUY2 mode

(see the 1st post for YUY2 instructions)


Plugin Notes
For YUY2 input you must use mt_masktools-25.dll. Although not strictly 'correct' mt_masktools-25.dll can be used with SEt's Avisynth 2.6MT for mulithreaded usage.
If you get this error: "There is no function named RemoveGrain" then replace your RemoveGrainSSE2.dll with the version in this zip file
If you use EEDI3 you may need the Visual C++ 2010 Redistributable



So you can encode with x264 in "YUY2" with --input-csp i422 --output-csp i422 , but most devices won't play it (usually only meant for computer playback)

Hacker?pcs
17th September 2013, 15:12
I hope the images in this post in the German doom9/Gleitz board (http://forum.gleitz.info/showthread.php?45902&p=434610#post434610) will explain the risk of underestimating the meaning of the "interlaced" parameter while converting to a chroma subsampling format which calculates averages between two lines, and the result depends on the choice whether the next or the next-but-one line is taken account of.
Thanks, very informative.

It also depends what the "real" source was before huffyuv
Source is VHS cassettes ranging from late 80s to early 00s using JVC HR-S7600 (S-video connection). VirtualDub capture format is 720x576 YUY2 4:2:2.


EDIT
One question more, for SD sports events is "Slow" preset enough? Or should I use even slower preset?

BruceBanna
24th September 2013, 13:02
Great thanks to -Vit- for this script! I had a VHS-rip which was driving me insane. Not only with NTSC-PAL troubles, but the field order would switch intermittently, completely destroying any hope of automating a reconstruction. I've tried this and that script and plugin and software - nothing creating a 100% result. And then QTGMC comes along and just sweeps through it with default settings. I'm so grateful. Thank you.

szabi
20th October 2013, 14:42
Hi

I use Avisynth 2.6 MT (http://forum.doom9.org/showthread.php?t=148782) and QTGMC v3.32 with QTGMC 32-bit Plugins [Vit-2.6] (http://forum.doom9.org/showpost.php?p=1568142&postcount=1126)

Script is the following:
SetMemoryMax(512)
SetMTMode(5, 4)
DirectShowSource("D:\direc\mymovie.mkv", fps=23.976, audio=false, convertfps=true).AssumeFPS(24000,1001)
SetMTMode(2)
QTGMC ( NoisePreset="Slow" )
crop(0, 140, 0, -140)

The following problem occured:
http://abload.de/img/qtgmc_failureoudle.png

What should be done to solve?

bye
szabi

Reel.Deel
20th October 2013, 14:48
What should be done to solve?

MaskTools2 for 2.6 no longer works with the latest AviSynth alpha 4. Try this updated MaskTools (http://forum.doom9.org/showpost.php?p=1619023&postcount=649).

That should fix the problem.

szabi
20th October 2013, 15:00
Failure message has been changed:
http://abload.de/img/qtgmc_failure2dirhs.png

I use the plugins which were collected by -Vit- (http://forum.doom9.org/showpost.php?p=1568142&postcount=1126) specially for Avisynth 2.6.
Even this seems nothing wants to work.

Reel.Deel
20th October 2013, 15:28
I use the plugins which were collected by -Vit- (http://forum.doom9.org/showpost.php?p=1568142&postcount=1126) specially for Avisynth 2.6.
Even this seems nothing wants to work.

Those plugins included in that package are no longer compatible with AviSynth 2.6 alpha4/5. Read here (http://forum.doom9.org/showthread.php?p=1628096#post1628096) for more details.

I had the same problems some time ago, use the 2.5 plugins and everything will be ok. :)
Currently, I'm using -Vit-'s modded 2.5 plugins package (http://forum.doom9.org/showpost.php?p=1503034&postcount=691) and the updated MaskTools (http://forum.doom9.org/showpost.php?p=1619023&postcount=649) with Avisynth 2.6 Alpha5 MT (http://forum.doom9.org/showthread.php?t=148782) [2013.09.28] and everything is running well so far.

szabi
20th October 2013, 16:10
I went back to Avisynth 2.5.8 MT (http://forum.doom9.org/showthread.php?p=1301410#post1301410).
Now qtgmc is working.
Thanks. :)
This avisynth is not maintained any more.
Seems 2.6 is not good instead, however that was the reccomendation of the developer.

Unforunately "QTGMC ( NoisePreset="Slow" )" setting did not produce that i wanted. :(

bye
szabi

StainlessS
20th October 2013, 16:37
Seems 2.6 is not good instead, however that was the reccomendation of the developer.


Read again what Reel.Deel wrote:

Those plugins included in that package are no longer compatible with AviSynth alpha4/5. Read here for more details.

Use the 2.5 versions and everything will be ok.

It was the v2.5 plugin's that were advised, not Avisynth v2.58 MT

Reel.Deel
20th October 2013, 17:18
It was the v2.5 plugin's that were advised, not Avisynth v2.58 MT

Correct. Thanks for taking note. I've updated my post above for (hopefully) better clarity.

szabi
20th October 2013, 18:13
OK, now it is more understandable.
I copy back the Avisynth 2.6MT.

bye
szabi

qwerty1983
21st October 2013, 11:03
Unforunately "QTGMC ( NoisePreset="Slow" )" setting did not produce that i wanted. :(

If i'm not wrong there's something missing here.
You chose a NoisePreset but you didn't choose a denoiser (for example EZDenoise)

Perhaps you should try something like QTGMC(EZDenoise=2.5,NoisePreset="Slow")

cedricm
24th October 2013, 10:12
Hi everyone. Sorry as I might be hijacking this topic, but I think it has to do something with QTGMC.

I am in the process of digitizing old VHS tapes (PAL).

The source files are captured using VirtualDub (25fps PAL interlaced, 720x576)
I deinterlace these files by using QTGMC with this script:
AVISource("E:\capture.avi", true)
AssumeTFF()
QTGMC(Preset="Slower", TR0=2, TR1=2, TR2=2, NoiseProcess=1, NoiseRestore=0.0, Denoiser="dfttest", DenoiseMC=true, NoiseTR=2, Sigma=4.0)
LanczosResize(720, 540)
Crop(4, 2, -10, -8)
AddBorders(4, 2, 10, 8, color=$000000)

The resulting video files are 50fps deinterlaced (720x540).

This looks very smooth when played back on PC. But now I want to convert these output files for DVD playback.
I have tried both ConvertXToDVD and Freemake Video Converter but both programs result in a non-smooth dvd.

Anyone has an idea how this can be fixed? Do I have to interlace/resize the video's again before converting? And if yes, what is the best way to do it?

Boulder
24th October 2013, 10:14
If you want smooth playback, do not deinterlace and encode as interlaced (make sure you set the correct field order).

yup
24th October 2013, 10:19
cedricm!

Add one parameter
FPSDivisor=2 and gep 25 fps video compatible with DVD.

yup.

Sharc
24th October 2013, 10:47
... but you will loose temporal resolution, right?
If temporal resolution (=temporal smoothness of 50 pictures per second) shall be kept in DVD format you would have to leave it interlaced (and trust in a good deinterlacer for your progressive playback device).

yup
24th October 2013, 13:50
Other way reinterlace
For 50Hz video after QTGMC

AVISource("file.avi")
AssumeTFF()
QTGMC()
SeparateFields().SelectEvery(4,0,3).Weave().AssumeTFF()
You get compliant for DVD video, which need encoding as interlaced.
yup.

cedricm
24th October 2013, 17:53
Excellent, thank you all for the help. Very appreciated !
I will report which method gives me the best result :cool:

qwerty1983
25th October 2013, 10:31
I have a question.

I've read that qtgmc is based on TempGaussMC_beta2. Should i always prefer gtgmc over TempGaussMC_beta2 ? If not in which cases should i prefer the latter over the former? Is there a general rule of thumb?

LigH
25th October 2013, 13:33
The general rule is: Prefer QTGMC.

The original TGMC has a different set of options, they are not interchangeable. The QTGMC options are more intuitive and user-friendly, managing a subset of related detail options with presets.

Also there is a reason for the "Q" ~ "quick": It has several tweaks which speed up the filtering noticably, with only little sacrifice in quality.

Octo-puss
26th October 2013, 08:30
Does anyone have any idea why is my encoding process (using MeGui) crashing if I use as little as SetMemoryMax(1024)? It's quite unfortunate, because I believe I do get _some_ speed improvements if I go higher. I always get "avs4x264mod.exe" to crash, but that process definitely is large address aware, so I don't see any reason why should 1GB of memory cause it problems.

yup
26th October 2013, 10:08
Octo-pus!
Try increase SetMemoryMax with 128MB step and see behavior.
I am sometime use 2048 for SD source on 8 core CPU.
yup.

Octo-puss
26th October 2013, 10:56
I went down to 800 and it still crashed :( This makes no sense.

yup
26th October 2013, 14:01
Octo-puss!
Try sequentially 1024, 1152,1280 and more and waiting no crash.
I am sure You find Your magic value.
Type Your script also.
yup.

Octo-puss
26th October 2013, 14:10
So far I am not getting crashes with 768, but I know 800 crashed before.

This is my script:
SetMemoryMax(768)
SetMTMode(3, 8)
LoadPlugin("F:\Programy\Audio & video\MeGUI\tools\dgavcindex\DGAVCDecode.dll")
AVCSource("D:\Black Symphony\F1_T2_Video - .dga")
SetMTMode(2)
QTGMC(Preset="Slow", EdiThreads=1)


I am also having really difficult time figuring out how to set the threads. For some weird reason I am getting the most CPU usage (or at least it seems so) with 3,8, but one of my previous experiments showed about 25% faster encode time with 3,4.

Octo-puss
26th October 2013, 17:19
Is it normal to get 0,5 FPS with very slow preset? With slower I get around 5.
My CPU is overclocked 3770K.

Also, when loading the script in MeGui, I get an error if I use SetMTMode(3, 8). It just gives some error on line 524 (possibly some other in other cases). If I switch to SetMTMode(3, 6), it finally works. Any explanation for this?

LigH
28th October 2013, 10:01
From one preset to another, QTGMC may use a whole different plugin for specific internal steps. So a huge difference is indeed possible.

BeNooL
31st October 2013, 08:06
Using MeGUI as well, I'm getting good results with scripts like the following:

SetMemoryMax(1200)
SetMTMode(5, 6)
<input>
SetMTMode(2)
QTGMC(preset="medium", EdiThreads=2,FPSDivisor=2)
<crop>
<resize>

Bumping to 8 threads slows things down actually (too many threads when encoding) and 4 is not enough. 6 really seems to be the sweet spot.

With x264 encoding running along, I get around 10fps on a i7 3770 (non K but still running at 3.7Ghz)

Octo-puss
2nd November 2013, 15:31
Try with slower and tell me what result you get, I am interested. With 3770K@4,4GHz I get under 2FPS :D

BeNooL
3rd November 2013, 12:02
Here you go. I tried with a DVB recording, so 1080i to 720p. This was avs file's content:

LoadPlugin("C:\megui\tools\ffms\ffms2.dll")
SetMemoryMax(1200)
SetMTMode(5, 6)
FFVideoSource("myvideo-1440x1080i.mkv", threads=1)
SetMTMode(2)
QTGMC(preset="slower", EdiThreads=2,FPSDivisor=2)
LanczosResize(1280,720)

Running a video analysis pass in VirtualDub it goes at about 5.50 fps. Using arount 70-75% CPU due to limiting to 6 main threads.

Using MeGui to perform encoding with X264 64bits (limited to 3 threads) it runs just a little under 5 fps.

Music Fan
4th November 2013, 16:14
Hi,
I need to de-interlace a video and I made tests on another video containing some little characters to compare tdeint(mode=1), qtgmc() and nnedi3(field=-2).
The original video is in 1080i @ 29.97 fps and I de-interlaced it in 1080p @ 59.94 fps. I cropped a lot of lines to keep a little part of the video.
Here is the result not resized, I gathered the 6 pictures with Photoshop.
On top, they are 2 consecutive images de-interlaced with tdeint ; in the midst, the same images de-interlaced with qtgmc ; at the bottom, the same images de-interlaced with nnedi3, it's the quality order (to my eyes) ;

http://nsa34.casimages.com/img/2013/11/04/131104040727928212.jpg

The same picture resized with Photoshop to see better ;

http://nsa34.casimages.com/img/2013/11/04/131104041125643209.jpg

I'm astonished by this result because I often read that qtgmc was the best de-interlacer.
But my script is very simple, just qtgmc().
With nnedi3, the characters shake a lot ; they are too big on a picture and too small on the next, as you can see.

I used TDeint 1.1, QTGMC 3.32 and nnedi3 0.9.4.

Is there a way to increase qtgmc's result quality with any settings ?

Guest
4th November 2013, 16:28
Can you please post a link to the unprocessed source so we can experiment with it?

Music Fan
4th November 2013, 16:46
It's a 56MB video I found a few months ago on another forum but it has been erased.
I can upload it if needed.
Anyway, do you know where does this difference between TDeint and QTGMC come from ? Is QTGMC more suitable with other types of videos ?

Guest
4th November 2013, 17:00
Post the video! That's what will enable us to best answer your questions.

Music Fan
4th November 2013, 17:36
Ok ;
http://www21.zippyshare.com/v/41644375/file.html

Guest
4th November 2013, 17:40
Thank you. Downloading now for some experimentation/analysis...

Music Fan
4th November 2013, 18:24
Great.
Here is the crop I used ;
crop(500,50,-1290,-950)

poisondeathray
4th November 2013, 18:27
BTW, your crop is "illegal" , vertical interlaced YV12 crop must be mod4
http://avisynth.nl/index.php/Crop

You need to specify AssumeTFF() before QTGMC and TDeint or use order=1 for TDeint

Guest
4th November 2013, 18:33
Good points, poisondeathray.

Music Fan, can you repeat your testing with correct cropping and specifying the field order? Meanwhile, my encoding is in progress with no cropping and I know that DGSource() is setting the field order correctly. I will report the results of that shortly.

kalehrl
5th November 2013, 08:58
I've recently discovered QTGMC and use it to deinterlace SD MPEG2 material and remove noise.
The usual line I use is:
QTGMC(Preset="Super Fast", EZDenoise=2.5)
I like the quality of noise removal using EZDenoise and I wonder what plugin is it using to accomplish that?
Sometimes I process progressive material and I'd like to use only the noise removal part of QTGMC.
So, I would like to know what denoising plugin to use to get the results I get with EZDenoise=2.5.
Thank you

Music Fan
5th November 2013, 09:42
Music Fan, can you repeat your testing with correct cropping
BTW, your crop is "illegal" , vertical interlaced YV12 crop must be mod4
http://avisynth.nl/index.php/Crop
I made this crop after de-interlacing, so I guess it has no effect on de-interlacing quality. And before to crop, I had seen the same results.

and specifying the field order?
You need to specify AssumeTFF() before QTGMC and TDeint
I had done this, here is the complete script I used ;
LWLibavVideoSource("H:\video.MP4")
AssumeFPS(30000, 1001)
assumetff()
tdeint(mode=1)#or qtgmc() or nnedi3(field=-2)
crop(500,50,-1290,-950)

LWLibavVideoSource works with LSMASHSource.dll (I used rev693).

HolyWu
5th November 2013, 10:11
@kalehrl
The denoiser used is FFT3DFilter by default since you leave NoisePreset at its default("Fast"). The sigma value equals to the EZDenoise value if you don't specify it explicitly.

kalehrl
5th November 2013, 14:25
Thank you. I read the FFT3DFilter documentation and got it working.
Now I know what to use when I have a progressive source.
AvsPmod reports valid numbers for sigma from 0.1-10 whereas for QTGMC EZDenoise it is from 0.0-5.

poisondeathray
5th November 2013, 17:21
...

I'm astonished by this result because I often read that qtgmc was the best de-interlacer.
But my script is very simple, just qtgmc().
With nnedi3, the characters shake a lot ; they are too big on a picture and too small on the next, as you can see.

I used TDeint 1.1, QTGMC 3.32 and nnedi3 0.9.4.

Is there a way to increase qtgmc's result quality with any settings ?


All deinterlacers have pros/cons . There is no "perfect" deinterlacer. Some are good for some situations but poor at others

NNEDI3 used alone as an intrafield deinterlacer will result in up/down motion because of the odd/even field offset. Use it with yadifmod to address that
eg. yadifmod(order=1, mode=1, edeint=nnedi3(field=3))

The section you're looking at is ~bobbed frame 1300. The sample section you chose was a static section . Have a look at something in motion and you will see terrible flickery aliasing with tdeint

e.g in motion , bobbed frames 1260-1261

TDeint
http://i44.tinypic.com/25ptgu1.gif

QTGMC
http://i42.tinypic.com/aw4005.gif

The original TGMC was known for it's calming of bob flicker and aliasing, but the processing and antialising tended to smooth out fine details . Pros and cons. You can't have your cake and eat it too :devil: . There is no "perfect" deinterlacer for everything.

If you want to improve those static sections with QTGMC, you can set sourcematch and adjust TR to get cleaner static sections - but other types of content, other sections might not look as "calm"
e.g
QTGMC( Preset="slow", SourceMatch=2, Sharpness=0.2, TR2=1 )

tdeint/qtgmc with the above settings on bobbed frame 1300
http://i44.tinypic.com/se4lf7.png

There are other options too ; have a look at the doucmentation. There are other apporaches too: for example you can combine TDeint with a motion mask (TMM) and QTGMC .

The bottom line is all approaches have pros/cons and you have to adjust for whatever works for your source and your goals

Guest
5th November 2013, 17:42
@Music Fan

My results from qtgmc, and those just shown by poisondeathray, are nowhere near as blurry as the screenshot you posted. I would suggest that you try to find the cause of this discrepancy, because I don't think it is fully accounted for by the factors discussed by poisondeathray.

Music Fan
8th November 2013, 12:10
I can't explain why we don't get the same results. Did you use the same script than mine, I mean tdeint(mode=1) and not just tdeint() ?

Music Fan
8th November 2013, 12:15
All deinterlacers have pros/cons . There is no "perfect" deinterlacer. Some are good for some situations but poor at others

NNEDI3 used alone as an intrafield deinterlacer will result in up/down motion because of the odd/even field offset. Use it with yadifmod to address that
eg. yadifmod(order=1, mode=1, edeint=nnedi3(field=3))

The section you're looking at is ~bobbed frame 1300. The sample section you chose was a static section . Have a look at something in motion and you will see terrible flickery aliasing with tdeint

e.g in motion , bobbed frames 1260-1261

TDeint
http://i44.tinypic.com/25ptgu1.gif

QTGMC
http://i42.tinypic.com/aw4005.gif

The original TGMC was known for it's calming of bob flicker and aliasing, but the processing and antialising tended to smooth out fine details . Pros and cons. You can't have your cake and eat it too :devil: . There is no "perfect" deinterlacer for everything.

If you want to improve those static sections with QTGMC, you can set sourcematch and adjust TR to get cleaner static sections - but other types of content, other sections might not look as "calm"
e.g
QTGMC( Preset="slow", SourceMatch=2, Sharpness=0.2, TR2=1 )

tdeint/qtgmc with the above settings on bobbed frame 1300
http://i44.tinypic.com/se4lf7.png

There are other options too ; have a look at the doucmentation. There are other apporaches too: for example you can combine TDeint with a motion mask (TMM) and QTGMC .

The bottom line is all approaches have pros/cons and you have to adjust for whatever works for your source and your goals
Thanks, very interesting ! :)
I'm testing your script but this is very slow : 0.02 fps :eek:
With tdeint(mode=1), I'm around 26 fps, 1300 times faster ! :eek:
It would need weeks to encode long videos.:scared:

Music Fan
8th November 2013, 12:31
Other question : to avoid a so slow de-interlacing, couldn't we use this kind of script when we need to remove noise on interlaced material (with filters working only on progressive videos) that we wanna keep interlaced ?
interlaced source
assumetff()#or bff
separatefields()
noise removing
weave()

And could it also work for resize ? I guess the answer is no because we can't resize an image including only a line on two.
interlaced source
assumetff()#or bff
separatefields()
resize
weave()

Guest
8th November 2013, 13:56
I can't explain why we don't get the same results. Did you use the same script than mine, I mean tdeint(mode=1) and not just tdeint() ? I used qtgmc and compared to your shots of qtgmc.

StainlessS
8th November 2013, 15:26
with filters working only on progressive videos) that we wanna keep interlaced
....
And could it also work for resize ? I guess the answer is no because we can't resize an image

You might like to take a peek at StickBoy script functions,
jdl-interlace.avsi,
JDL_UnfoldFieldsVertical, JDL_FoldFieldsVertical
and JDL_InterlacedResize.

Here:- http://www.avisynth.nl/users/stickboy/

Music Fan
8th November 2013, 19:52
Thank you, I tested both, JDL_InterlacedResize is great !
It seems a very good alternative to QTGMC (followed by a re-interlacing) when the main goal is to resize interlaced videos.
About UnfoldFieldsVertical() followed by FoldFieldsVertical(), do you believe it brings anything for noise removal filters compared to separatefields() with weave() ?
I see the difference of course, but both separate the fields whose lines are attached, thus I wonder if it wouldn't be the same stuff for filters.
The difference being that fields are processed together with UnfoldFieldsVertical() and one after the other with separatefields().

StainlessS
8th November 2013, 20:06
If you just separate fields then each field will be vertically offset from those either side
and will not produce good results if processing temporally. The unfold/fold duo align top and bottom
fields with those of it's neighbour frames. Flip is advised if doing spacial processing so the bottom scanlines
of each field are adjacent to each other (bottom before the flip).
To do temporal processing when only separating fields, you would want to process separately even and
odd field sets, before putting them back together. (EDIT: Which is essentially what the unfold/fold with
flip thing does, but does it simultaneously rather than separate even/odd processing).

Music Fan
8th November 2013, 21:20
Thanks for this clear explanation ;)
As a lot of filters work spatially (with or without temporal processing but rarely only temporal), I guess flip=true should be the default setting (instead of false), especially because treating a flipped field is not problematic for temporal filters.

StainlessS
8th November 2013, 22:54
Yep, thats what I would choose.

Octo-puss
13th November 2013, 22:09
Goddamnit, after like 28 hours of encoding it bugged out on me without any errors, but the process just stopped doing anything. Just sitting there.
Is there any way to troubleshoot this? I am pretty sure it's the deinterlacing that went nuts, but I have no way to prove it. MeGui works fine, I could abort the job without problems...

This is my script

SetMemoryMax(768)
SetMTMode(3,6)
LoadPlugin("F:\Programy\Audio & video\MeGUI\tools\dgavcindex\DGAVCDecode.dll")
AVCSource("D:\Black Symphony\F1_T2_Video - .dga")
SetMTMode(2)
QTGMC(Preset="Slower", EdiThreads=1)
SelectEven()

What can I possibly change?

Octo-puss
13th November 2013, 22:21
Also, what's up with various speed settings giving me nonsense error messages?
For example if I set "Ultra Fast", MeGui produces error saying there is no function called Yadif and sending me to two different lines of the main QTGMC script. If I use some other setting, it works fine. If I try to use the Very Slow, I get error saying something about FFT3D-something.dll.
Just what the heck is going on?

Groucho2004
13th November 2013, 22:34
Also, what's up with various speed settings giving me nonsense error messages?
For example if I set "Ultra Fast", MeGui produces error saying there is no function called Yadif and sending me to two different lines of the main QTGMC script. If I use some other setting, it works fine. If I try to use the Very Slow, I get error saying something about FFT3D-something.dll.
Just what the heck is going on?
The messages are not nonsense but indicate that you need to familiarize yourself with the term RTFM.
Hint: Have look at the notes in the first post of this thread, section "Full Plugin List".

Groucho2004
13th November 2013, 22:40
Goddamnit, after like 28 hours of encoding it bugged out on me without any errors, but the process just stopped doing anything. Just sitting there.
Are you overclocking your processor by any chance?

Octo-puss
13th November 2013, 22:57
The messages are not nonsense but indicate that you need to familiarize yourself with the term RTFM.
Hint: Have look at the notes in the first post of this thread, section "Full Plugin List".
All of the required plugins are in the Avisynth folder. But thank you for trying to make an idiot out of me.

poisondeathray
13th November 2013, 23:01
All of the required plugins are in the Avisynth folder. But thank you for trying to make an idiot out of me.

It doesn't go in the plugins folder . Please read the 1st post
http://forum.doom9.org/showpost.php?p=1423459&postcount=1



** For FFT3DFilter and ddftest you also need the FFTW3 library (main page / windows zips). On Windows the file needed for both is libfftw3f-3.dll. However for FFT3DFilter, it needs to be called FFTW3.dll, so you will need two copies and rename one. On Windows put the files in your System32 or SysWow64 folder (which depends on your OS and the version of AviSynth that you're running)

Octo-puss
13th November 2013, 23:01
Yes I have that as well, just didn't feel like it was needed to mention, because otherwise the whole thing wouldn't even start, as far as I know.

poisondeathray
13th November 2013, 23:03
Then post the full error message. Verbatim .

When you say something is in the plugins folder, do you mean the megui avisynth plugins folder or the default avisynth install plugins folder ?

Octo-puss
13th November 2013, 23:06
You know what? I solved it myself.
Apparently the new (newest) plugin package is completely bugged and just messes everything up.
I downloaded the normal one (still with MT enhancements though) and ALL errors disappeared. Someone should remove that from the first post.

johnmeyer
14th November 2013, 00:16
SetMTMode(3,6)
LoadPlugin("F:\Programy\Audio & video\MeGUI\tools\dgavcindex\DGAVCDecode.dll")
AVCSource("D:\Black Symphony\F1_T2_Video - .dga")
SetMTMode(2)Glad you have solved it, at least for now. I was a little puzzled by the SetMTMode(3,6) line prior to opening the video. Most scripts I've seen use SetMTMode(5,6). Mode 5 is, apparently, more compatible with frame requests and less likely to cause a problem. Perhaps your problem was indeed entirely due to the plugins you were using, but it also may be true that using the more usual mode for SetMTMode prior to reading the video frames might have solved the problem.

Octo-puss
14th November 2013, 08:36
I took the mode from the first post. It says 3... Checking help file from the package shows 5. I think I took what I thought was more recent info. This is confusing as hell.

Taurus
14th November 2013, 08:42
@Octo-puss
Which plugin package gave you headache?
The experimental for avisynth 2.6 or the modded MT optimized one?
Just had bad luck with the experimental version....

Octo-puss
14th November 2013, 12:42
Yup the experimental, which if I understand it correctly are the updated MT ones. I got couple more crashes but eventually found out I forgot to replace those in syswow64 folder as well. Trying again now, hopefully it will work.
I hope all of this will get an update soon.

Octo-puss
14th November 2013, 13:05
No way, avs4x264mod crashed anyway.

Also,
Useful MT modes:
1 - one filter instance per call in script, no guarding from Avisynth, only for filters that are designed for this mode, like distributor().
3 - one filter instance per call in script, Avisynth guards requests for output. The mode to use with source filters. (Mode 5 will do for them too, but is overkill and should be avoided.)
2 - each call in script produces N (number of threads) instances of filter. Use for the rest.

Taken from AVS MT thread. I guess this is why I picked mode 3 after all.

I think the other problem causing crashes is SetMemoryMax. I can't seem to find value that doesn't crash. I tried almost everything from 512 (they say that's default) to 1024 in 128MB increments.

LigH
14th November 2013, 13:25
Since I assumed the same (that Mode 3 is generally preferable), I discussed this already in the MT thread and learned that I was wrong believing that Mode 3 works equally well for all kinds of source filters. No, there is a difference. There are source filters which may require Mode 5 or even 6 or else might randomly fail (e.g. return bad frames), like DGDecNV (due to the required special handling of decoder hardware access).

After all, knowing which mode might be "best" (both reliable and not too slow) for a specific source filter may be a matter of experience. Even the version of the plugin might be an important factor, as you never can exclude "bugs" (or design flaws) which only appear in rare multi-threading situations. In case of AviSource, it may even be related to the specifically used VfW codec implementation (e.g. Microsoft or ffdshow decoder for ancient formats like Video1 or Cinepak).

In addition, there are functions which can reduce concurrent frame requests at the expense of some frame buffer RAM, like RequestLinear() in TIVTC.dll or Prefetch() in the MT kernel.

Octo-puss
14th November 2013, 13:49
What's the purpose of SetMTMode(2) after that though. I never really understood that. I thought commands are executed in the order they appear in script, so the first calling doesn't matter and the crashes happen after the second, when the deinterlacing is being done.

LigH
14th November 2013, 14:04
Using an MT mode >= 3 for source filters is recommended to avoid them running in several threads and one thread of the decoder receiving a request for frame B while another thread of the decoder is decoding the source for a previous request for frame A. Many decoders are not made to survive that.

Following filters, instead, should "in general" be able to apply filters to different parallel subsets of frames delivered by the source filter respectively any possibly existing previous filters in the filter chain. So after the source filter, MT Mode 2 should be safely useable (except for filters which are programmed in a bad style, e.g. use global variables, which may lead to data corruption in multi-threaded use).

Issues may arise when filters have a large temporal radius (need many frames before and after the current), and the stream of source frames is not contiguous (e.g. due to the use of Trims and Splices), here one thread may be ahead of the other and access frames distant to the current frame of other threads. Here the source filter may receive requests which lead to seeking forth and back in the video source file. Not all decoders are reliable under such circumstances, and many will be slow (because they have to decode again from the previous GOP start).

Octo-puss
14th November 2013, 14:09
I might as well wait a few months for something more stable to come out, really. I don't feel like experimenting with stuff that takes way over 24 hours to encode :D
But the problem really seem to be AVS.

BeNooL
15th November 2013, 07:44
Pro-tip: you can remux the partial output before a crash occurred.

- remux partial output with mkvmerge and cutoff 5-10Mb to get a clean cut
- get the number of frames
- trim original avs script of the same amount
- resume encoding of remainder part of video
(- repeat if new crash occurs)

Once you have all your parts, append them to each other in mkmerge. Voila.

That's how I dealt with some problematic video streams.

Groucho2004
15th November 2013, 10:14
Pro-tip: you can remux the partial output before a crash occurred.

- remux partial output with mkvmerge and cutoff 5-10Mb to get a clean cut
- get the number of frames
- trim original avs script of the same amount
- resume encoding of remainder part of video
(- repeat if new crash occurs)

Once you have all your parts, append them to each other in mkmerge. Voila.

That's how I dealt with some problematic video streams.
That's the most bizarre approach to dealing with the problems that Avisynth MT with QTGMC present.
I'm puzzled that someone would go through this ordeal instead of running the process single-threaded which would overall probably amount to the same time spent.

Boulder
15th November 2013, 10:26
What I usually do with QTGMC-related things is that I either 1) run the script with one thread and use cretindesalpes's MVTools build (in the Dither package) which includes internal multithreading or 2) run multiple one-thread encodes simultaneously and combine them later. SD sources seem to cope better with multithreaded QTGMC scripts than HD ones, probably due to memory usage issues.

kypec
15th November 2013, 13:33
That's the most bizarre approach to dealing with the problems that Avisynth MT with QTGMC present.
I'm puzzled that someone would go through this ordeal instead of running the process single-threaded which would overall probably amount to the same time spent.

My thoughts exactly. I still wonder why anyone dedicates so much time and effort to make MT mode usable with certain scripts when they could most likely had the encode finished in single-threaded rock-solid Avisynth in that equal time. I gave up on MT in AVS long ago and never had urge to cope with its instabilities again. Instead, I start my single-threaded script and let it run overnight or even two if necessary.

BeNooL
15th November 2013, 16:28
That's the most bizarre approach to dealing with the problems that Avisynth MT with QTGMC present.
I'm puzzled that someone would go through this ordeal instead of running the process single-threaded which would overall probably amount to the same time spent.

My thoughts exactly. I still wonder why anyone dedicates so much time and effort to make MT mode usable with certain scripts when they could most likely had the encode finished in single-threaded rock-solid Avisynth in that equal time. I gave up on MT in AVS long ago and never had urge to cope with its instabilities again. Instead, I start my single-threaded script and let it run overnight or even two if necessary.

I'm equally surprised seeing these answers.

How is remuxing partial output to a new file lengthy ? It takes a matter of seconds/maybe couple of minutes if you are going for bluray sizes.
Getting frame number is a matter of reading a value (think mediainfo)
How hard is it to add Trim(0,x) at the end of an avs ?
Putting it back together is again a matter of 1 additional click in mkvmerge (select previous part, append instead of add)


Going single threaded on the other hand could easily slow things down by a factor of 3-5 times. Something like going from 4 hour encode to something in the range of 12-20 hours. I seriously believe you can do the above steps in less than 6-16 hours.
This is also only for dealing with the one problematic video stream out there that you only encounter maybe once a year. Not worth messing your plugins directory if it works fine 99% of the time.

Anyway this was a reply to Octo-Puss. I hope you are going to give
SetMTMode(5,6) a go. it has been suggested to you twice.

Octo-puss
15th November 2013, 18:44
I did. And I said it kept crashing like Windows ME. I gave up, will see what happens in few months when AVS is hopefully out of alpha stage.

Boulder
15th November 2013, 18:47
The stability won't change a bit. The instability is due to the nature of the whole multithreading thingie, and that is out of the Avisynth developers scope. If you want to, you could try the SVP team's Avisynth build which does memory handling in a different way.

Asmodian
15th November 2013, 23:26
I'm equally surprised seeing these answers.

I also always use non-MT Avisynth for QTGMC, it isn't that the cut+mux step takes a long time but that you do not know when it will need to be done without constantly checking it.

I like being able to set an encode up and when I come back in ~24h it is done, not crashed 2h into the encode and sitting idle for 22h.

Avisynth MT has been unstable, similar to the stability is has now, for years now. ;)

Groucho2004
16th November 2013, 00:05
I'm equally surprised seeing these answers.

How is remuxing partial output to a new file lengthy ? It takes a matter of seconds/maybe couple of minutes if you are going for bluray sizes.
Getting frame number is a matter of reading a value (think mediainfo)
How hard is it to add Trim(0,x) at the end of an avs ?
Putting it back together is again a matter of 1 additional click in mkvmerge (select previous part, append instead of add)
So, how do you know when it will crash? Are you sitting in front of the screen and wait for it? Do you have a crash alarm clock?

I'm just baffled thinking about what kind of mind set one must have to use a software setup that will inevitably crash at random and that needs wacky workarounds to produce results.

Octo-puss
16th November 2013, 11:50
I am quite afraid that what (theoretically, due to the crashes :P) would take say 30 hours to encode with MT version of AVS could take a week with the original. I need to use the PC at times you know :D

BeNooL
16th November 2013, 22:16
So, how do you know when it will crash? Are you sitting in front of the screen and wait for it? Do you have a crash alarm clock?

I'm just baffled thinking about what kind of mind set one must have to use a software setup that will inevitably crash at random and that needs wacky workarounds to produce results.

It's more a matter of being sure you're getting somewhere than it is a matter of time.
Random crashes are per definition not reproductable. You could run an encode 10th of times, fiddle with settings and still not be sure you're going to get the full video encoded without a crash.

I'll reiterate as well: this is only for the one odd video stream encountered once in a while. QTGMC is stable 99% of the time on my system.

Groucho2004
16th November 2013, 23:35
It's more a matter of being sure you're getting somewhere than it is a matter of time.
Now you're not only contradicting what you wrote in your last post (that time is very important to you), you're also proving my point - that it is more important to get results.

SamKook
18th November 2013, 18:30
Once you've found the setmemorymax settings that works with your type of source video and the number of thread to use with them, you won't get any crash with avisynth MT and QTGMC.

For HD sources and high settings, it might not be worth it though. I have to lower it to 2 threads for it to not crash when using the placebo or veryslow preset and I usually split it in 4 to fill my CPU so it might be faster to simply split it in 7-8 and run it single threaded instead.
For SD, I've never had it crash ever since I found the right settings to use with my pc and it's much faster.

Music Fan
18th November 2013, 19:20
I usually split it in 4 to fill my CPU
What encoder do you use ?
I know that Virtual Dub can be opened several times at the same time (allowing simultaneous encodings) but it does not encode in AVC and I wonder if there are AVC encoders that can be opened several times at the same time.

SamKook
18th November 2013, 20:06
What encoder do you use ?
I know that Virtual Dub can be opened several times at the same time (allowing simultaneous encodings) but it does not encode in AVC and I wonder if there are AVC encoders that can be opened several times at the same time.

I use mencoder to encode all parts(+ 50 frames on each side to make sure it has everything it needs to analyze for the last frame I'll actually use) to a lossless codec and then encode the full thing(minus the overlap) after with x264(I have a batch script that does it all for me automatically).

I was worried that simply encoding straight to the final result and merging the different parts together would hurt quality a bit, but mencoder is able to encode to AVC from what I read(it might require something extra though, I never tried it so I'm not sure) so you should be able to use it directly.

Music Fan
18th November 2013, 21:02
Thanks, but for the x264 part of the process, do you make simultaneous encodings or you do it only for the lossless part (which uses QTGMC) ?

Octo-puss
18th November 2013, 21:03
I tried to encode the same thing with single threaded version of AVS and it seems it would "only" take about one day longer than with MT version, which is... acceptable I guess. That's with very slow preset.

SamKook
18th November 2013, 22:22
Thanks, but for the x264 part of the process, do you make simultaneous encodings or you do it only for the lossless part (which uses QTGMC) ?

I only make one encode for the x264 part. Once the QTGMC part is done for the lossless sections, it's plenty fast to feed the encoder without even needing to use mt.



I encoded once a bluray using single threaded avisynth, QTGMC @ placebo and x264 also @ placebo and it took 21 days to finish. With avisynth mt you can cut the time to about half and with the process I explained above it's done in about 3 days.

I since changed both settings to veryslow since x264 doesn't really benefit from placebo and veryslow give a smaller output and QTGMC actually produce better result with it when using the Source Match and Lossless options from what -Vit- once told me. It now takes me about a day for a 2h bluray.

Asmodian
19th November 2013, 10:19
I guess it is all about your mindset when encoding. When busy I will gladly trade 24h of CPU time for 1h of my time.

When not busy fiddling with Avisynth MT has provided hours of fun. :)

WorBry
26th November 2013, 18:52
Aw, come on guys, don’t burst my bubble. I’ve only recently upgraded to a six-core AMD FX PC, making MT processing, that was once an ethereal mystery, into which even angels long to gaze, now a tangible reality.

For 10 years, yes 10 years, I struggled with de-interlacing SD video on an ancient single core machine. Starting, way back, with TDeint and TomsMoComp. Then being enthralled with Scharfis_Brain’s ground-breaking mo-comped MVBob routines and exhilarated by Didee’s detail-squeezing McBob. Could bob-deinterlaced video look any better than this? It was a joy to set a 5 minute home video running over night, and in the morning I would excitedly rush to see the fruits of my labour…..only to find it had not completed.

I was there, right there, at the moment Didee pulled a fledgling TGMC out of his magical hat as a solution for interline shimmer/twitter, and I was hungry for more. But then as the years wore on, the long hours spent pouring over fine tunings and stiching together re-processed video segments began to take their toll. I reached a crisis point. Maybe it was family, maybe it was work, but I could go on no longer. De-interlacing video is a young mans sport and an utter foolishness, I had to conclude for sanity’s sake. So, with a dejected, heavy heart I resigned myself to the hum drum world of stuttery single progressive video, glancing only with painful regret as TGMC grew into the adorned, multi-threaded QTGMC we know today.

So, dear friend, you see, I’ve paid my dues, I still bare the scars…..I deserve multi-threaded QTGMC de-interlacing. And it is with a sense of long lost joy, that I find myself fiddling with MT settings and gazing with intense concern at the Task Manager. I have arrived…..I am home.

OK, so that’s story time over. Just a couple of questions for you thread-worn QTGMC-ers:

1. So, I’m now sitting with the MT AVISynth dll in my System 32 folder and Vit’s set of MT optimized filters in my QTGMC avs folder (for direct plug-in loading). Say now, if the excitement proves too much, and I want to resort to normal (Non-MT) QTGMC processing, and simply omit the MT-defining script entries (SetMemoryMax, SetMTMode etc), is it certain that the MT-optimized filters will function as they should, or would it be better to revert to the regular filter set?

2. Contemplating Boulder’s earlier comment:

What I usually do with QTGMC-related things is that I either 1) run the script with one thread and use cretindesalpes's MVTools build (in the Dither package) which includes internal multithreading or 2) run multiple one-thread encodes simultaneously and combine them later. SD sources seem to cope better with multithreaded QTGMC scripts than HD ones, probably due to memory usage issues.

Regarding the MVTools mod that includes hyper-threading; is there a modified QTGMC version available that allows this to be set in the function parameters, or would I need to work that in myself? And then, how best to balance MVTools hyper-threading against the Edithreads setting? Which has the greater impact on performance?

And, sorry for my ignorance (I've been out of the game for a good while), but how does one run multiple one-thread encodes simultaneously on a single PC?

Just want to examine the available MT options.

Cheers,

Boulder
26th November 2013, 19:06
I think the multithreaded MVTools uses the number of logical cores by default. If you want to set a different value, use avstp_set_threads(x) in which x is the number of threads. I have a file named avstp_set_threads.avsi in my plugins folder and it sets threads to 1 by default since I use SetMTMode successfully about 99% of the time. I'd expect that the MVTools functions get a better boost from multithreading, but I've usually left edithreads to default since I've not noticed any harm there.

WorBry
26th November 2013, 19:27
Thanks Boulder. I'll look at that.

I think I might have edited-in my last question after you posted:


And, sorry for my ignorance (I've been out of the game for a good while), but how does one run multiple one-thread encodes simultaneously on a single PC?


And my query about the modded vs regular filter set? Just want to be sure.

Boulder
26th November 2013, 19:59
I run 4 VirtualDub instances with each of them processing their own part of the video (using Trim to set the parts). I encode all parts to intermediate files with a lossless codec (FFV1 found in ffdshow) for easy joining and no quality loss. Of course, it requires a substantial amount of hard disk space especially with HD video.

Personally I use the regular filter set apart from the MaskTools build which is the one that was adapted to the latest API.

WorBry
26th November 2013, 20:38
OK, thanks. I wondered if you were maybe farming out to multiple PC's. Obviously a bit tedious, marking the trim set points and re-splicing, but probably quite efficient from the encoding perspective. On my new PC, MT-AVISynth processing speeds up QTGMC about 3-fold. It would be interesting to see how 4 simultaneous instances of non-MT encoding compares.

SamKook
26th November 2013, 21:17
It would be interesting to see how 4 simultaneous instances of non-MT encoding compares.

That's exactly what I plan to test very soon since an earlier conversation here made me realize that it might be better for HD movies.

I just have to finish reinstalling everything I need since I changed my OS drive and make sure everything in my batch file still work fine with the newly installed everything.

Instead of virtualdub, I personally use mencoder to encode to a temporary FFV1 file, but both work fine in a batch script so you only have to write one once and splitting everything will be easy as pie next time.

Boulder
26th November 2013, 21:21
For some reason, I didn't think of mencoder (ffmpeg). It would definitely be easier to use after the script is setup once. In 64-bit OS, it's also possible to pipe the Avisynth script output into a 64-bit build of ffmpeg for slightly increased performance, similar to the x264 way.

kolak
26th November 2013, 21:47
OK, thanks. I wondered if you were maybe farming out to multiple PC's. Obviously a bit tedious, marking the trim set points and re-splicing, but probably quite efficient from the encoding perspective. On my new PC, MT-AVISynth processing speeds up QTGMC about 3-fold. It would be interesting to see how 4 simultaneous instances of non-MT encoding compares.

Another way is to use mp_pipeline- there is big overhead but it runs stable even on 12 cores systems (assuming you have 12GB+ RAM)

WorBry
26th November 2013, 22:03
Me no, just 8GB RAM....for now.

Octo-puss
26th November 2013, 22:07
Avisynth+ is apparently getting MT support before end of the year.

SamKook
28th November 2013, 15:03
It would seem that MT is still faster, but it might be due to the encoders difficulty to balance themselves the more instances are running at the same time since there's always a couple that are much slower than the rest. Maybe others would be better at it.
And they don't always manage to catch up speed when other close which explain the time for the 6 instances single threaded.

The format is: Instances x number of threads(1=no mt calls)
It's not quite a fair comparison since the more instance there are, the more frames need to be encoded since I add 50 on each side and the sample was only 3997 frames, but it's a real world test for my usage.

Test mencoder_4x2: 0:18:37.37
Test mencoder_8x1: 0:21:53.60
Test mencoder_4x1: 0:24:43.94
Test mencoder_6x1: 0:56:35.42
Test mencoder_3x2: 0:18:38.59

horrormaster34
8th December 2013, 18:23
Getting the following error: "Cache: Filter returned invalid response to CACHE_GETCHILD_CACHE_MODE. 136310928
(QTGMC-3.32.avsi, line 776)
(QTGMC-3.32.avsi, line 386)

I'm using AviSynth 2.6 MT with the Modded Plugins Package

LigH
8th December 2013, 18:28
Every once in a while, the same question with the same error message, just in different threads: mt_masktools-26.dll had to be updated even once more (http://forum.doom9.org/showthread.php?p=1619023#post1619023).

horrormaster34
8th December 2013, 23:46
That fixed that, but now I get an error about nnedi3: arg 0 must be a clip!
(QTGMC-3.32.avsi, line 721)
(QTGMC-3.32.avsi, line 510)

Also end up with an error on another filter for something else not QTGMC related.

WorBry
9th December 2013, 01:11
I'm considering the implications for processing of YUY2 video sources in AVISynth - specifically files in the Cineform HD format, which (as AVISource) output only to YUY2.

The consideration then is whether it would be better to convert to YV12 from the start of processing, or to (try and) stay in YUY2 color-space throughout, before finally converting to YV12 for rendering to target format.

'Better' in this context would imply avoidance of unnecessary internal color space inter-conversions, yet taking into consideration the relative re-sampling efficiencies of YUY2 and YV12 color-space when it comes to processes such as rescaling.

As regards QTGMC; following the script through, it appears that for YUY2 input the only conversions that take place are between interleaved YUY2 and a planar 4:2:2 variant (is that technically YV16 or another variant?). I was wondering – is this inter-conversion completely lossless or are there potential sampling inefficiencies involved? And if there are, would these be anymore or less significant than converting the source to YV12 prior to processing? Relative processing speed is less of a consideration – assuming both inputs receive the benefit of MT support?

Thanks

LigH
9th December 2013, 10:03
nnedi3: arg 0 must be a clip!

Then please provide more details, details, details ... I suspect here an issue with the script sequence before calling QTGMC, which probably keeps assigning the video outputs to variables and thus leaves "last" unassigned, and then a call of QTGMC() follows without refering to any explicit clip variable.

DarkSpace
9th December 2013, 12:14
now I get an error about nnedi3: arg 0 must be a clip!
I had that once. As it turned out, my nnedi3 file had somehow become corrupted or otherwise unusable, and replacing it with this one (http://web.missouri.edu/~kes25c/nnedi3.zip) completely solved the issue.

By the way, my test back then was only BlankClip(pixel_type="YV12").nnedi3(), so I don't think this error is related to QTGMC itself.

trevorjharris
14th December 2013, 12:12
QTGMC runs fine with avisynthmt 2.6 dated 15-5-2012. but removegrainsse2 crashes with versions dated 9-3-2013 and 28-9-2013. Is the there a version of removegrainsse2 which works with lastes avisynthmt?

Thanks

LigH
14th December 2013, 12:24
Did you already try to set a specific MT mode (4..6 instead of 2) for this plugin only? Or does it already crash while loading the script, and if, with which kind of error message or dialog?

trevorjharris
15th December 2013, 13:55
Did you already try to set a specific MT mode (4..6 instead of 2) for this plugin only? Or does it already crash while loading the script, and if, with which kind of error message or dialog?

I am using qtgmc version 3.3
The error message is

Avisynth open failure
Avisynth: access violation at 0x00001433 in C:\Program Files (X86)\Avisynth 2.5\plugins\RemoveGrainSSE2.dll, attempting to read from 0x00000000
(qtgmc.avsi line 764)
(qtgmc.avsi line 790)
(qtgmc.avsi line 387)
(E:\3D Bluray\tenerife\qtgmc.avs, line 13)

The script is

SetMemoryMax(4000) # Optional line. Leave it out at first. See below for value M
#SetMemoryMax(400) # Optional line. Leave it out at first. See below for value M
SetMTMode(5, 6) # See below for value X
#SetMTMode(5, 3) # See below for value X
avisource("tenerife2fs.avi", audio=false)
SetMTMode(2)

assumetff()
#separatefields()
#info
#converttoyv12(interlaced=true)
#converttoyuy2()
QTGMC( Preset="slow", fpsdivisor=2, EdiThreads=3 ) # Choose preset based on overall speed/quality you want. See below for value Y
#selecteven()
#Distributor() # This line may or may not be necessary, try removing it and see if you get more speed

The crash occures on opening. As I said earlier version of avisynthmt 2.6 worked.

LigH
15th December 2013, 14:12
SetMemoryMax(4000)

You are kidding, right? :scared: Even for an LAA process, allowing almost 4 GB for a 32 bit process is ... optimistic.

SetMTMode(5, 6)
...
QTGMC( Preset="slow", fpsdivisor=2, EdiThreads=3 )

6 QTGMC threads multiplied with 3 EDI threads are 18 threads, each using RAM for its own copy of the EDI plugin, and if it is NNEDI, it needs quite a lot. Try to be more modest...

Reel.Deel
15th December 2013, 14:27
I am using qtgmc version 3.3
The error message is

Avisynth open failure
Avisynth: access violation at 0x00001433 in C:\Program Files (X86)\Avisynth 2.5\plugins\RemoveGrainSSE2.dll, attempting to read from 0x00000000....
...The crash occures on opening. As I said earlier version of avisynthmt 2.6 worked.

Let me guess. Are you using the "2.6 plugin package provided in the first post"? If so those plugins are no longer compatible with the latest AviSynth 2.6 Alpha5 MT [2013.09.28].

Here's some on my older posts on that very subject.

All of -Vit-'s 2.6 plugins seems to work with AviSynth 2.6 Alpha3 MT (http://forum.doom9.org/showthread.php?t=148782) [2012.05.16].
With newer builds I get access violations and similar errors...


Those plugins included in that package are no longer compatible with AviSynth 2.6 alpha4/5. Read here (http://forum.doom9.org/showthread.php?p=1628096#post1628096) for more details.

I had the same problems some time ago, use the 2.5 plugins and everything will be ok. :)
Currently, I'm using -Vit-'s modded 2.5 plugins package (http://forum.doom9.org/showpost.php?p=1503034&postcount=691) and the updated MaskTools (http://forum.doom9.org/showpost.php?p=1619023&postcount=649) with Avisynth 2.6 Alpha5 MT (http://forum.doom9.org/showthread.php?t=148782) [2013.09.28] and everything is running well so far.

--------
The first post seriously needs an update with the correct information.
It baffles me how many people are having this problem. Sometimes the answer is just a few pages back. :/

trevorjharris
15th December 2013, 17:53
Thankyou reel.deel that looks to be the problem. Is there any advantage in upgrading as you have done. Is vit likely to update his package?

I have a dual xeons with 6 cores each and 48gb of memory. With hyperthreading that gives 24 threads so I thought my settings would be ok. I use videodub and I have set the Large Address Aware Bit on Virtual dub which made it far more stable.

yanlizadam
28th December 2013, 19:33
Hi,

I'm dealing with badly quantized blocks and don't like my result.I lost most of good detail.Tried Didée's vinverse and more. QTGMC have any magic for this ? Thanks.


http://t.imgbox.com/adzNb2i7.jpg (http://imgbox.com/adzNb2i7) http://t.imgbox.com/aczkEP75.jpg (http://imgbox.com/aczkEP75) http://t.imgbox.com/adbwoBdw.jpg (http://imgbox.com/adbwoBdw) http://t.imgbox.com/acyLlK00.jpg (http://imgbox.com/acyLlK00) http://t.imgbox.com/abqJ4paY.jpg (http://imgbox.com/abqJ4paY)

Stereodude
30th December 2013, 01:37
You need to post more information. Like what the source is (MPEG-2, MPEG-4, etc). What have you tried? Are those frames you posted source frames or after post processing or what?

yanlizadam
30th December 2013, 03:04
Yeah they're source frames and taken from MPEG-2.

My best shot:

source(blabla)

vinverse()
fft3dfilter(sigma=6,sigma2=2.51,sigma3=1.51,sigma4=1,bw=16,bh=16,ow=8,oh=8,bt=1)

Guest
30th December 2013, 03:51
Yeah they're source frames and taken from MPEG-2. Your best bet is to post an unprocessed source stream sample that we can use to analyze your issue.

Stereodude
30th December 2013, 17:34
Yeah they're source frames and taken from MPEG-2.FWIW, I like to kill off blocking in the source filter using the deblocking capabilities of DGMPGDec. However, that can be a tightrope to walk. If you get to aggressive you can lose fine detail.

yanlizadam
30th December 2013, 17:53
Thanks for response guys.

sample:
http://www.multiupload.nl/0LSBVM2VW8

Guest
30th December 2013, 18:44
That video has progressive content. Probably it was already deinterlaced before authoring. Why are you posting about it in a thread about a deinterlacer? And what DVD is this from?

As Stereodude suggested, use a deblocker.

yanlizadam
30th December 2013, 20:44
QTGMC has progressive future that's why I posted here. It's retail DVD from some movie.

Anyway can you recommend me a any deblocker filter for this ?

Guest
30th December 2013, 22:05
It's retail DVD from some movie. Which retail DVD is that please? I ask due to your previous thread which was closed for rule 6.

yanlizadam
30th December 2013, 22:31
Nah, I can show you a DVD.

Guest
30th December 2013, 22:34
Nah, I can show you a DVD. Please follow up with details in PM. Thank you for your understanding.

killmoms
5th January 2014, 22:22
Anyone have good suggestions for solving mixed-cadence telecined material that's been also mixed with 29.97 interlaced stuff? QTGMC with default settings is still yielding some frames that just look like they're blended. Is there some other process I should try to run first, or a generic process to yield 120fps video (rather than 60fps) that might be better? I remember seeing anime raws (back in the old days of digi-subbing) derived from SD broadcast TV, back when 12-frame (24fps) animation was mixed on top of 30fps panned backgrounds, and I'm wondering if a workflow similar to one that was used to handle that would be more applicable here.

manono
5th January 2014, 22:34
QTGMC doesn't unblend. Perhaps run it before SRestore. Questions such as yours should usually be accompanied by a sample.

killmoms
5th January 2014, 23:00
Sorry if I wasn't clear; the source has some blended frames (from, I presume, the original editor dealing with the 24fps original material at 29.97fps via a telecine) during effects shots, which I know can't be fixed. But I feel like I was seeing blended frames appear during regular (pure telecine) footage too on output from QTGMC, which was surprising me; I was assuming QTGMC would recognize this and just IVTC, despite the (very) mixed cadence.

I'm also still very much a QTGMC newb, so it's just set to Preset="slower" right now, no other settings. Not sure if anything else might help.

The source is a retail DVD (VOB being directly decoded by FFMS2); what would be the best way to provide a sample? Should this go to PM?

Guest
5th January 2014, 23:20
The source is a retail DVD (VOB being directly decoded by FFMS2); what would be the best way to provide a sample? Fair use applies for small samples. Cut a part of the VOB with DGSplit, upload it to (e.g.) mediafire.com, and post the link here. 50MB should enough.

killmoms
5th January 2014, 23:41
Hopefully this will do: http://www.mediafire.com/watch/i09jd6a3l99mt7z/VTS_01_1_6.VOB

poisondeathray
5th January 2014, 23:54
Hopefully this will do: http://www.mediafire.com/watch/i09jd6a3l99mt7z/VTS_01_1_6.VOB


This is progressive "24p" material. So you wouldn't deinterlace it

Mpeg2Source()
AssumeTFF()
TFM()
TDecimate()

Guest
6th January 2014, 00:06
poisondeathray is correct as usual. I would just add that the video has what is called hard 3:2 pulldown, or hard telecine. You can google that if you want to know what it is all about. To remove hard telecine you apply IVTC using (e.g.) tfm/tdecimate or telecide/decimate. It's possible that the entire DVD is not like that but you will know when you try it, and then we can help further if needed. Good luck.

killmoms
6th January 2014, 00:16
It's not though, there are added effects on top of the (originally 24p) material that are not part of the telecine cadence (and sometimes blend over top of it) that run at 29.97i, so a simple IVTC winds up with combing artifacts from those. There are also effects (the screen split/duplication thing) that are not 24p. I don't know WHAT they are, there's a lot of duplicate frames that seem to follow no particular cadence. It looks like they were simply line-doubled, but sometimes there's blending in them… no idea what happened there. I'm guessing whatever plugin(s) was used to create that effect had a simple "deinterlace" checkbox w/ no options that someone flipped and it did it very poorly.

You are correct that the simple, unaltered shots of the girls dancing ARE from simple telecined 24p footage originally. But it's clear that this piece was edited at 29.97 from telecined original footage, resulting in cadence breaks (lots of them, often shot-to-shot) and the mixing of 29.97 (progressive, it looks like?) content/effects, sometimes over top of the original material, in the same frame.

poisondeathray
6th January 2014, 00:29
I doubt you want to change cadence in the main clip (the dancing girls) or do anything to adversely affect the "normal 24p" sections which is most of the content

You can specify extra post processing, e.g. clip2=nnedi3 , or vinverse . Or apply antialiasing (e.g. santiag or other AA filters) to those few FX sections thru trims() or applyrange() or replaceframessimple() - (you don't want to degrade the rest of the "normal" sections)

You can try retiming the sections that have duplicates and/or blends, perhaps even interpolating some frames that have jumps (mvtools2, optical flow), and maybe even making VFR encode to keep sync but it's a fair bit of manual work

killmoms
6th January 2014, 00:37
My point is even the dancing girls weren't edited at 24fps. Check out the transition from the first shot in that VOB to the second one. The first shot has all clean cadence up to the cut, so the last four frames of the first shot are:

clean-combed-combed-clean

Then the video cuts to:

combed-combed-clean-clean-clean

Obviously a cadence break. This happens for almost every shot, before you even get to the additional 29.97 effects added on top. So they telecined the material from the original shoot during layoff to tape (probably DigiBeta, if I had to guess), and then the editor ingested it all at 29.97 and edited that way with no regard for cadence. Is that something that an AVISynth-based IVTC can handle?

poisondeathray
6th January 2014, 00:47
What time are you talking about, which transition exactly ? Are you referring to the jump cut ~ 1.5sec , or the colored squares after 3sec ?

Cadence breaks can be handled, so can orphaned fields. You can set thresholds for comb detection Post processing with TFM field matching. The PP normally does a simple bob (hence combing), you can specify something better like NNEDI3 or QTGMC to take care of the combing . That way you don't damage the "good" frames

manono
6th January 2014, 01:03
But it's clear that this piece was edited at 29.97 from telecined original footage, resulting in cadence breaks (lots of them, often shot-to-shot) and the mixing of 29.97 (progressive, it looks like?) content/effects, sometimes over top of the original material, in the same frame.
That's what music videos do - edit as video. They don't care about keeping the cadence. They don't care that someone might come along later and want to IVTC it back to film. It's meant to be played as interlaced 29.97fps. If you like you can make it progressive 59.94fps with QTGMC, if putting up with the imperfections of progressive 23.976fps doesn't satisfy you. You can even run it through QTGMC first, before decimating it back to 23.976fps one way or another. No combing doing it that way.

Music videos are made so sloppily that I wouldn't break my back trying to 'fix' them perfectly. The edits are made so often and the action is so frenetic that one usually can't tell anyway if the work you did on it didn't entirely fix it.

killmoms
6th January 2014, 01:27
True. It's just frustrating that people in 2006 were editing like interlaced SDTV was gonna be around forever when the writing was on the wall. :P

Guest
6th January 2014, 01:58
Ever heard of 1080i? It's all over the place.

killmoms
6th January 2014, 02:13
Don't remind me. I curse its existence every day. (Thankfully, in my field, progressive video is a given. I just wish that was true everywhere.)

Thanks for all the help. I think I've decided how I'm going to handle this DVD (first clip is mostly 30p with a few interlaced effects, so QTGMC alone; 2nd and 3rd clips are primarily 24fps original material, so TFM/TDecimate followed by QTGMC to fix the few other visual artifacts and SelectEven to go back down to 24fps; 4th clip is 30p dancing + 24fps animation, so TFM by itself w/ no decimation). As an aside, the piece I uploaded was from the 2nd clip.

hydra3333
18th January 2014, 02:11
Hello. I have a number of old home videos captured VHS-C to DVD using a comby vhs/DVD unit (no other way of doing it).

They're quite blocky (DVD writer's fault) and very noisy (old vhs-c tapes).

I thought I'd start afresh, so I downloaded the latest plugins (Vit's) etc and created a simple script (below).

The SMDEGRAIN does a nice job, however when I add the QTGMC, I receive a pop-up message Oops VirtualDub has crashed
an out-of-bounds memory access (access violation) occurred in 'nnedi3'...
... reading address 0000----.

Any ideas on what do do next ?
Thanks
(Win7/64, TSPs MT avisynth 2.57.)


edit:
- downloaded tcritical's nnedix plugins and used those, however no change
- downloaded qtgmc v3.33, however no change
- downloaded dogway's qtgmc v3.33d, however error using mdegrain1 (something like 'lsb' not defined)
- downloaded the latest fftw3 dlls and copied them to syswow64, however same result
- checked c++ 2010 redistributable installed

#SetMTmode(mode=5,threads=4) # start with mode=5 forAVIsource http://forum.doom9.org/showthread.php?p=1067216#post1067216
SetMemoryMax(1024)
LoadPlugin("C:\SOFTWARE\DGindex\DGDecodeNV.dll")
LoadPlugin("C:\SOFTWARE\DGindex\DGDecode.dll")
LoadPlugin("C:\Program Files (x86)\AviSynth 2.5\plugins-qtgmc-smdegrain\AddGrainC.dll")
LoadPlugin("C:\Program Files (x86)\AviSynth 2.5\plugins-qtgmc-smdegrain\avstp.dll")
LoadPlugin("C:\Program Files (x86)\AviSynth 2.5\plugins-qtgmc-smdegrain\dfttest.dll")
LoadPlugin("C:\Program Files (x86)\AviSynth 2.5\plugins-qtgmc-smdegrain\dither.dll")
LoadPlugin("C:\Program Files (x86)\AviSynth 2.5\plugins-qtgmc-smdegrain\EEDI2.dll")
LoadPlugin("C:\Program Files (x86)\AviSynth 2.5\plugins-qtgmc-smdegrain\eedi3.dll")
LoadPlugin("C:\Program Files (x86)\AviSynth 2.5\plugins-qtgmc-smdegrain\FFT3DFilter.dll")
LoadPlugin("C:\Program Files (x86)\AviSynth 2.5\plugins-qtgmc-smdegrain\mt_masktools-25.dll")
LoadPlugin("C:\Program Files (x86)\AviSynth 2.5\plugins-qtgmc-smdegrain\mvtools2.dll")
LoadPlugin("C:\Program Files (x86)\AviSynth 2.5\plugins-qtgmc-smdegrain\nnedi.dll")
LoadPlugin("C:\Program Files (x86)\AviSynth 2.5\plugins-qtgmc-smdegrain\nnedi2.dll")
LoadPlugin("C:\Program Files (x86)\AviSynth 2.5\plugins-qtgmc-smdegrain\nnedi3.dll")
LoadPlugin("C:\Program Files (x86)\AviSynth 2.5\plugins-qtgmc-smdegrain\RemoveGrainSSE2.dll")
LoadPlugin("C:\Program Files (x86)\AviSynth 2.5\plugins-qtgmc-smdegrain\RepairSSE2.dll")
LoadPlugin("C:\Program Files (x86)\AviSynth 2.5\plugins-qtgmc-smdegrain\SSE2Tools.dll")
LoadPlugin("C:\Program Files (x86)\AviSynth 2.5\plugins-qtgmc-smdegrain\TDeint.dll")
#LoadPlugin("C:\Program Files (x86)\AviSynth 2.5\plugins-qtgmc-smdegrain\VerticalCleanerSSE2.dll")
LoadPlugin("C:\Program Files (x86)\AviSynth 2.5\plugins-zzz\VerticalCleanerSSE3.dll")
LoadPlugin("C:\Program Files (x86)\AviSynth 2.5\plugins-qtgmc-smdegrain\VariableBlur.dll")
LoadCPlugin("C:\Program Files (x86)\AviSynth 2.5\plugins-qtgmc-smdegrain\yadif.dll")
LoadPlugin("C:\Program Files (x86)\AviSynth 2.5\plugins-zzz\AGC.dll")
LoadPlugin("C:\Program Files (x86)\AviSynth 2.5\plugins-zzz\fft3dfilter.dll")
LoadPlugin("C:\Program Files (x86)\AviSynth 2.5\plugins-zzz\dctfilter.dll")
LoadPlugin("C:\Program Files (x86)\AviSynth 2.5\plugins-zzz\degrainmedian.dll")
LoadPlugin("C:\Program Files (x86)\AviSynth 2.5\plugins-zzz\Convolution3d.dll")
LoadPlugin("C:\Program Files (x86)\AviSynth 2.5\plugins-zzz\DePan.dll")
LoadPlugin("C:\Program Files (x86)\AviSynth 2.5\plugins-zzz\despot.dll")
LoadPlugin("C:\Program Files (x86)\AviSynth 2.5\plugins-zzz\WarpSharp.dll")
LoadPlugin("C:\Program Files (x86)\AviSynth 2.5\plugins-zzz\FFTQuiver.dll")
LoadPlugin("C:\Program Files (x86)\AviSynth 2.5\plugins-zzz\aWarpSharp.dll")
LoadPlugin("C:\Program Files (x86)\AviSynth 2.5\plugins-zzz\Unfilter.dll")
LoadPlugin("C:\Program Files (x86)\AviSynth 2.5\plugins-zzz\RemoveDirtSSE2.dll")
Import("C:\Program Files (x86)\AviSynth 2.5\plugins-qtgmc-smdegrain\dither.avs")
Import("C:\Program Files (x86)\AviSynth 2.5\plugins-qtgmc-smdegrain\mt_xxpand_multi.avs")
Import("C:\Program Files (x86)\AviSynth 2.5\plugins-qtgmc-smdegrain\QTGMC-3.32.avs")
Import("C:\Program Files (x86)\AviSynth 2.5\plugins-qtgmc-smdegrain\SMDegrain-v.2.2d.avs")
Import("C:\Program Files (x86)\AviSynth 2.5\plugins-qtgmc-smdegrain\LSFmod.v1.9.avs")
Import("C:\Program Files (x86)\AviSynth 2.5\Deblock_QED_MT2.avs")
#
MPEG2Source("G:\TV\new\VTS_01_1.d2v",info=0,ipp=true,cpu=0) # home movie captured by VHS-to-DVD hardware recorder
AssumeFPS(25)
AssumeTFF()
#
TRIM(8000,-1000)
changefps(last,last,true) # http://forum.doom9.org/showthread.php?p=1473445#post1473445
#SetMTmode(mode=2,threads=4)
#
ii = last
SeparateFields()
Spline36resize(ii.width,ii.height)
AssumeFrameBased()
deblock_QED(quant1=48)
AssumeTFF()
SeparateFields().SelectEvery(4,0,3).Weave()
#
SMDegrain(tr=3, Contrasharp=true, RefineMotion=false, plane=4, Interlaced=true, pel=2, prefilter=3, blksize=8, overlap=4, Chroma=false)
#
QTGMC(Preset="Slow",EdiThreads=2,Sharpness=1.2,SLMode=1) # result is double framerate progressive, so re-interlace it later
# do other things here eg LSFmod
AssumeTFF()
Blur(0,0.25).SeparateFields().SelectEvery(4,0,3).Weave() #reinterlace - ASSUMED TFF HERE # BLUR(0,1) per http://forum.doom9.org/showthread.php?p=1488308#post1488308
#
AssumeTFF()
AssumeFPS(25)
SetPlanarLegacyAlignment(True)
#Distributor()

aegisofrime
18th January 2014, 08:36
Hi guys. I have a video that MeGUI's source detector detects as being varying field order interlaced. What arguments do I pass to QTGMC to deal with this? Thanks!

kalehrl
18th January 2014, 09:31
I've recently had the same reported by MeGUI but it was wrong.
The video was actually BFF interlaced so the script was this:
AssumeBFF()
SetMTMode(2)
QTGMC(Preset="Super Fast")
SelectEven()
When in doubt, try to determine the nature of your source manually:
http://neuron2.net/faq.html#analysis

hydra3333
19th January 2014, 14:57
... when I add the QTGMC, I receive a pop-up message (that NNEDI3 crashes) ...

Removing "SetPlanarLegacyAlignment(True)" from the end of the script caused NNEDI3 to stop crashing. Great !

rhaz
31st January 2014, 14:43
Hi. New to QTGMC here. Can someone help me write a correct script. It works what I use now, but looks like it's missing something because I do not achieve anything close to 100% CPU, I get less than 50% of CPU usage when trying to encode with mt avisynth.dll version.

There's my CPU (it's only i3 +8GB RAM):
http://i.imgur.com/CCmzp4b.jpg

There's my .avs:
LoadPlugin("C:\Program Files (x86)\MeGUI\tools\dgindex\DGDecode.dll")
LoadPlugin("C:\Program Files (x86)\AviSynth 2.6\plugins\TIVTC\TIVTC.dll")
LoadPlugin("C:\Program Files (x86)\AviSynth 2.6\plugins\mt_masktools-26.dll")
LoadPlugin("C:\Program Files (x86)\AviSynth 2.6\plugins\mvtools2.dll")
LoadPlugin("C:\Program Files (x86)\AviSynth 2.6\plugins\nnedi3.dll")
LoadPlugin("C:\Program Files (x86)\AviSynth 2.6\plugins\RemoveGrainSSE2.dll")
LoadPlugin("C:\Program Files (x86)\AviSynth 2.6\plugins\RepairSSE2.dll")
LoadPlugin("C:\Program Files (x86)\AviSynth 2.6\plugins\RSharpenSSE2.dll")
LoadPlugin("C:\Program Files (x86)\AviSynth 2.6\plugins\SSE2Tools.dll")
Import("C:\Program Files (x86)\AviSynth 2.6\plugins\QTGMC-3.32.avsi")
SetMTMode(3, 4)
DGDecode_mpeg2source("test.d2v")
SetMTMode(2)
AssumeTFF()
QTGMC(preset="very fast", EdiThreads=1)
Tdecimate(mode=2, rate=23.976, m2PA=true)
crop(10, 72, -10, -72)
Spline36Resize(700,394)


Also rate=23.976 gives 24.000 fps output when encoding finished. Why doesn't it stay same as 23.976? I am using this, because this 25FPS source I have has lots of duplicate frames and is interlaced and applying that current script doesn't really solve anything. So any help would help about using multiple CPU's correctly and maybe ideas how to solve this bad source problem.

Cheers

SamKook
31st January 2014, 20:26
Tdecimate can't be multithreaded if I'm not mistaken so you can't reach 100% CPU with it in the script. You'd have to split the encode in multiple parts, encode at the same time and join them together.
Or deinterlace first to a lossless file and make a second script to decimate in a second pass.
This has nothing to do with QTGMC though so it doesn't really belong here.

manono
31st January 2014, 21:33
...maybe ideas how to solve this bad source problem.
Then you should post a sample. Maybe a field matcher is called for, instead of a double-rate deinterlacer. You'll get faster encoding, too.

alexx7777
7th February 2014, 15:41
I really like QTGMC. But miscalculation is sometimes very slow. You can use resources GPU? For example for QTGMC(Preset="Slower", EdiMode="EEDI3+NNEDI3").

trevorjharris
12th February 2014, 11:32
I have been looking into using shutterblur but I have a problem. I shoot with the Sony TD10 in 50i but when I look at the metadata I see that the shutter speed varies between 1/450 to 1/50 of a second in my video. I want to increase shutterblur when the shutter speed drops below 1/100 is there any way of doing the without just spliting the video, processing and recombining. I can get the shutter speeds into a file. Thanks

Guest
12th February 2014, 14:25
I have been looking into using shutterblur but I have a problem. I shoot with the Sony TD10 in 50i but when I look at the metadata I see that the shutter speed varies between 1/450 to 1/50 of a second in my video. I want to increase shutterblur when the shutter speed drops below 1/100 is there any way of doing the without just spliting the video, processing and recombining. I can get the shutter speeds into a file. Thanks What is the relevance to QTGMC?

trevorjharris
12th February 2014, 14:58
I use QTGMC for deinterlacing and also add shutter blur.

LigH
12th February 2014, 16:06
So you want to script the value of the ShutterBlur parameters per frame number in a QTGMC call? :scared: Well ... if there is a way to read a one-number-per-line text file and use these values in ScriptClip/Animate, it may be possible. But I don't know details about that, sorry.

Gavino
12th February 2014, 17:10
if there is a way to read a one-number-per-line text file and use these values in ScriptClip/Animate, it may be possible.
See ConditionalReader (http://avisynth.nl/index.php/ConditionalReader)().

trevorjharris
17th February 2014, 11:41
Thanks for the heads up on ConditionalReader. I found it works well single threaded but crashes multithreaded. I tried seperating deinterlacing and the shutterblur in the same script using SetMTMode(0)

SetMemoryMax(4000) # Optional line. Leave it out at first. See below for value M
SetMTMode(5, 4) # See below for value X
avisource("e:\3d bluray\dubrovnic\dubrovnic-l.avi", audio=false)
trim(0,1000)
SetMTMode(2)
assumetff()
QTGMC( Preset="slow", EdiThreads=1 ) # Choose preset based on overall speed/quality you want. See below for value Y
SetMTMode(0)
ScriptClip("""subtitle("frame = " + string(current_frame) + " angle = " + string(angle))""")
scriptclip( """QTGMC( Preset="faster",fpsdivisor=1, ShutterBlur=1, ShutterAngleSrc=angle, ShutterAngleOut=360, SBlurLimit=4, EdiThreads=1,InputType=1, TR0=0, TR1=0, TR2=0, Rep0=0, Rep2=0, SMode=0, SLMode=0, Sbb=0, NoiseProcess=0 )""")
conditionalreader("blur.txt", "angle", false)

This did not work.

Running in single thread mode was very slow 0.29fps.

So I then performed the deinterlace to a 50fps video in MT mode and then applied shutterblur as a seperate script in ST mode. That worked but if I use fpsdivisor=2 in the shutterblur script it produces a 50fps video with the second half of the video a continuous repeat of the last frame. In the end I had to use selecteven on the deinterlaced file with fpsdivisor=1.

hello_hello
2nd July 2014, 15:04
Could someone please tell me which is the current official version of QTGMC? And/or if there's an advantage/disadvatage to using other versions?

The title of this thread indicates the current version is 3.32, but I found a link to version 3.33 buried in this thread, and there's a link to a mod version labelled 3.33d here (http://doom10.org/index.php?topic=2927.0).

I understand the mod version requires the 16 bit flavours of mvtools and dfttest, but does anyone have any experience with the modded QTGMC? Does the 16 bit precision of the plugins in question actually make a difference?

Thanks.

hello_hello
5th July 2014, 05:44
Anyone??

Reel.Deel
5th July 2014, 14:14
As the thread title suggest, v3.32 is the "official" version. v3.33 adds few changes:
v3.33
- Increased maximum value for Rep0, Rep1 and Rep2 to 7 (from 5). Higher values help with flicker on static detail, potential for minor motion blur
- Bug fix for the fact that Bob always outputs a BFF clip regardless of field order of input (thanks ajp_anton)
- Improved generation of noise (NoiseDeint="Generate") for noise bypass / EZKeepGrain
- Minor change to denoising
The only reason v3.33 was nos released as an "official" version was because lack of testing as the time of its release. (I've used v3.33 almost exclusively and haven't had any problems)
I didn't really want to release 3.33 because I haven't tested it enough (who likes support queries?) and it doesn't add much. But it suited an earlier problem, so I let it out gently.

v3.33d is a slightly modified version (http://doom10.org/index.php?topic=2202.0) of v3.33. 2 main changes include:

MDegrain and dfttest are able to do 16-bit denoising via the lsb and lsbd parameters (these are set to false by default). Unfortunately only the denoising part is done in 16-bit and is immediately dithered back down to 8-bits for further processing.
QTGMC_inflate and QTGMC_deflate was replaced by mt_inflate and mt_deflate. The other changes are so minor they are not worth mentioning.

Visually the ouput of v3.33 and v3.33d look identical but you can sleep better at night knowing that v3.33d is a tiny bit more accurate. :)
In terms of speed (with default settings) v3.33 is a bit faster than v3.33d (v3.33d is even slower when lsb=true).
A good thing about v3.33d (at least IMO) is that it forces users to use MVTools 2.6.0.5 which is actually recommended by -Vit-.
...you can safely use cretindesalpe's more recent MVTools in dither tools (http://forum.doom9.org/showthread.php?p=1386559#post1386559) as well (good idea in fact)...

hello_hello
6th July 2014, 06:12
Thank you for all the info, Reel.Deel. That clears things up a bit.

sadie
7th July 2014, 11:53
Hi guys. It’s been a while since my last visit. Your little program has served me well on my numerous DV conversions. Recently, however, I’ve become stumped over my first ever encounter with a BR disc I’ve tried to resize and compress. My symptoms/actions are the following: Original movie Japanese (NTSC land) with Blu ray authored in Spain (Pal land) Specs indicate 1080 25i. In addition media info spits out scan type: MBAFF. I’ve read up a bit on it and sort of follow it’s modus operandi. Yet, frame-by-frame playback of the m2ts shows a strange pattern: a dozen frames that alternate between progressive and interlaced followed by a dozen consecutive frames that are all interlaced. Same pattern throughout entire film. MPlayer deinterlacing clears up the former but simply blurs the latter leaving dramatic ghost images. When compressed to 720p whether with –no-interlace or –fake-interlace in x264 vfw the ghosting is simply spread throughout the 1st and 2nd half seconds. To be precise, this degradation only takes place in areas of horizontal movement, panning.

I’ve tried deinterlacing tests with Yadif (order=1) and QTGMC v3.31 (simple fast preset). Yadif just smooths the whole picture a bit more, whereas QTGMC while retaining sharpness severely judders during the pure interlaced phase of the video. Someone walking across the video right to left would appear to take a half step back for every step forward every half second on the second. Now I've seen such a judder on the occasional microscene in my DV renders, but on an entire feature film, presumably authored by professionals? In addition, the estimated encode which normally would be measured in hours on my comp, predicts an encode of nearly two days! Not an option.

What’s happening here, and is there any solution? Or is this film to be chucked into the perma-blend bin? Thanks

foxyshadis
7th July 2014, 14:24
Good news! That's not really interlaced at all, it's telecine (https://en.wikipedia.org/wiki/Telecine#2:2_pulldown) that's hard-coded. You can easily remove it with TIVTC (http://avisynth.nl/index.php/TIVTC) with a combination of TFM and TDecimate(cycle=25) and restore perfect quality.

sadie
7th July 2014, 19:06
Hello foxy. Thanks for pitching in. Yeah, i tried your solution using the following script:

loadplugin ("c:\program files (x86)\dgavcindex\dgavcdecode.dll")
avcsource ("d:\00004honor.dga")
tfm ()
tdecimate (cycle=25)
Lanczos4resize (1280,740)
Crop (0,10,0,-10)

I did a couple of tests once honoring pulldowns the other forced film. Identical results. That is, it took care of half the problem (the 'prog>laced>prog>laced' phenomenon). Like a yadif deinterlacing yet with better quality, and roughly the same quality as qtgmc deinterlace but with a 5 times gain in speed. However, the other half of my problem remains unaffected. 12 consecutive frames of inconsistent interlacing still produces severe ghosting with a slight judder. Further I don't see how my supposed telecide disc can actually have had any use in the real world. I means it's not even close to a 3:2 pulldown. Could this finally just be an amateurish Spaniard encoder who was paid a lowly eurocrisis wage and thus lacked the motivation to produce a quality BD? Would some of those other parameters in Tdecimate improve matters? Or should I just give up and live with it? Would still love to know how this error (if it is one) could possibly have been committed. Thanks, and regards to Vit.

foxyshadis
7th July 2014, 19:21
I think you'll need to chop a piece off and upload it (dropbox, yousendit, etc.) so we can take a look then, 100-200 frames. With DGAVCIndex, use the [ and ] to make a small clip and choose "Save project and demux video". Set "Honor pulldown flags". Alternately, you can just cut the first 20 MB or from the full file with DGSplit (http://rationalqm.us/dgsplit/dgsplit12.zip), but that would include audio and other junk.

manono
7th July 2014, 20:24
Further I don't see how my supposed telecide disc can actually have had any use in the real world. I means it's not even close to a 3:2 pulldown.
It's called 2:2:2:2:2:2:2:2:2:2:2:3 pulldown. It a fairly rare way to convert film to PAL 25fps. There shouldn't be any need to do that for a Blu-Ray so the people that did it either received a master like that already (maybe upscaled from Standard-Def) or are incompetent fools.

If it's as you say, the script provided by foxyshadis will work. So, as she requested, please provide a sample, one with steady motion.

sadie
7th July 2014, 21:12
Ok, here's a little 8 second clip from the m2ts remuxed into mkv. You should be able to make out the 'rhythm' of the thing.

https://www.dropbox.com/s/ck04ikt21bb1pxd/Sample-001.mkv

foxyshadis
7th July 2014, 21:43
the people that did it ... are incompetent fools.

Ding ding ding! We have a winner!

It's field-blended AND missing some matching fields. Maybe it was field-blended up to 60i, and then decimated straight down to 50i? But even that doesn't quite fit the off-kilter pattern. Whatever it is, it's ugly as hell and likely unfixable in full. SRestore might help remove some of the field-blending, but I can't see enough of a pattern to believe that it could, either. The quality is pretty lousy, to boot.

QTGMC is a waste for this. Unless you can pull some good fields out of your hat, you'll have to pummel this with a fieldmatcher with strong deinterlacer (like SmoothDeinterlace or TDeint with most of its protection minimized) for match-fixing, plus likely Vinverse and some cleansers to hide the remaining artifacts. See the docs on how to use a deinterlacer with TFM.

sadie
7th July 2014, 22:13
Here's a second excerpt, perhaps shows more clearly the 12/12 punch.

https://www.dropbox.com/s/758w9p013rllej2/Sample-002.mkv

Thanks Foxy for feedback, and Manono. A lot of extra widgets you've given me to play with but probably in vain at the end. Tough call. As it's a rare even unique HD effort for one of my favorite Japanese films and as the vast majority of the film is comprised of static shots maybe I'll just go for a 50% correction with TFM and Tdecimate. And maybe blink at the bad spots. The irony is that fixing every half second only highlights the disaster of the other half second. So why bother with even that. The bad sections are BFF by the way, which is why I got those back forth judders using QtGmc (when TFFed).

So thanks for the interest and keep in touch if you come across any miracle cures. All the best. And hope the drought's not getting too critical down there in Fresno. I'm originally out of Marin County myself. Later....

manono
8th July 2014, 04:42
Yadif(Mode=1)#or the better QTGMC
Srestore()

does a reasonable job with the second sample. I didn't look at the first one.

sadie
8th July 2014, 10:39
Ah Ma Nono, my magic genie. It certainly seems to have done the trick. And I was all ready to put that disc on eBay. Ok, since, I've done a bit more final testing using variations of your tools that I'd like to share. A few surprises (to me at least) that I'd appreciate comment on. The core issue is less on the relative effectiveness of the tools than the impact they have on the encoder. I've summarized them in the following tableau (media info, vdub estimates & my subjective resolution rating), all using film, slow, 25crf presets:

No delace/no ivtc + x264 > 25p + 1100kbps 2.5 hr encode > decent spatial, mediocre temporal
Yadif + x264 > 50p + 1200kpbs 5.5 hr encode > mediocre spatial, fair temporal
Yadif + srestore + x264 >24p + 1500kpbs 5.5 hr encode > very decent spatial, good temporal
QTGMC (sel even) + x264 > 25p + 1450kbps 30 hr encode > good spatial > uneven temporal judder (field order?)
QTGMC (sel even) + restore + x264 > 12p + 2700kpbs 6 day encode > v. good spatial > temporal ?
QTGMC + restore + x264 > 25p (12p real) + 2500kps 15 day encode > v. good spatial > temporal ?
TFM + TDecimate + restore > 12p + 2000kpbs 6.5 hr encode > v. good spatial > temporal judder

You can see that QTGMC causes the encoder to nearly bail (vdub listed average encoding speed as 0.0 fps!!) Two weeks for a 2 hr film? Obviously, all of the solutions except Yadif are untenable unless you want that vintage Charlie Chaplin bebop effect). The beauty of Yadif in this situation is that for the same crf value the encoder can put out much better quality since it only has half as many frames to deal with. It really narrows the gap with QTGMC here. I wonder how TDeint would handle this? And yes why that 12p?

manono
8th July 2014, 20:38
And yes why that 12p?
Because you're not doing it right. You first bob the video and then use SRestore at default settings. No SelectEven after QTGMC, Yadif as Yadif(Mode=1).

Yes, it'll be very slow at default QTGMC settings. A quick read of the very good included doc will tell you there are other presets that will speed it up (with a slight quality hit), one such as:

QTGMC(Preset="Faster")
Srestore()

It'll still be slow, though.

Boulder
8th July 2014, 20:47
If you have a multicore processor, you can make the process slightly faster by using cretindesalpes' version of MVTools + avstp.

Then again, whenever I need to use SRestore on something, I do things in two parts - first QTGMC and then use SRestore on the result. I split the QTGMC encode in multiple parts (usually three as I have a quad core CPU) and encode them simultaneously to some lossless format such as FFV1. Then join the files in the Avisynth script and run the SRestore part on it.

foxyshadis
8th July 2014, 21:48
SRestore pulls frames from all over -- the reason the video slows down to a snail's pace with QTGMC+SRestore is most likely cache misses. You can raise the cache size, but with HD that still might not be enough (and you're more likely to bump into the 2GB limit), so the most reliable method would be to save the QTGMC output to a lossless or near-lossless intermediate file, then run SRestore on that; it'll be fairly fast then. Of course, the time & space taken by making the intermediate is sometimes not worth it, unless you use it more than once.

If only everything was 64-bit capable....

Edit: Whoops, Boulder said the same thing. And that said, I still think QTGMC is a waste of time for a field-blended video.

Music Fan
9th July 2014, 10:25
If you have a multicore processor, you can make the process slightly faster by using cretindesalpes' version of MVTools + avstp.

Then again, whenever I need to use SRestore on something, I do things in two parts - first QTGMC and then use SRestore on the result. I split the QTGMC encode in multiple parts (usually three as I have a quad core CPU) and encode them simultaneously to some lossless format such as FFV1. Then join the files in the Avisynth script and run the SRestore part on it.
I also use that trick, but I chose Lagarith instead of FFV1, it needs less resource and is easier to install and edit.

sadie
9th July 2014, 14:33
So just to do a final followup before laying my subject to rest.

@Manono - the 12p rate I was getting was not due to a problem with a bob setting. yadif has it's own built in variety and there's no problem. Likewise (correct me?) so does QTGMC and its mostly nnedi3 and why I nominally should have a 50p file. Instead mediainfo read back 23.976, but in reality it played at just under 12. It seems I forget to insert an assumettf. With that setting it plays like the yadif test.

@foxy - I'd have to agree that QTGMC doesn't really cut it with this sort of file. By using its superfast (nnedi3) preset and the x264 encoder in fast mode, I managed to get the est encode down to 15 hours. But...compared to a similar test with yadifmod (+nnedi3) 11.5 hrs and its older brother yadif 5.5 hours, all three seem to have nearly identical spatial quality. There does seem to be some 'shimmering' improvement in the QTGMC sample, but ya really gotta be looking for it. You do see a noticeable difference when going to the fast preset, but the best I could do there was 4 days. So all in all, it seems a no brainer. That is not to say that in a 'normal' interlaced sample all the advantages of QTGMC won't shine, but perhaps not in connection with srestore.

And a final anomaly. When I took my sample to the ultrafast setting which uses the yadif bobber, instead of expecting a 12-13 hr encode, vdub spat back an estimate of 2 days!! Any thoughts?

Voila, the newbie has spoken. See you soon.

simcut
2nd August 2014, 11:56
Hi guys, quick question, with solely interlaced footage, in my avisynth script, do I need to add AssumeTFF() or AssumeBFF() depending on what DGIndex detects as the field order, or does it not matter at all, does QTGMC detect the field order anyway so I dont need those commands in, or do I have to have them in.

Currently I have an avisynth script each set up, one for TFF and another for BFF.

Thanks

Reel.Deel
2nd August 2014, 12:25
I only add AssumeTFF/BFF when the sequence is clearly out of order.

LigH
2nd August 2014, 12:44
QTGMC will rely on the field order AviSynth assumes after loading the source clip.

Not all source filters are able to determine the field order correctly (e.g. AviSource will probably assume BFF because the AVI container does not flag it, each VfW codec may have its own default, and BFF is the most common default for DV in AVI); sometimes even the encoding studio flagged the material wrong. In general, better be safe than sorry (to have wasted hours due to QTGMC creating motion "holes" because the assumed order was wrong).

Furthermore, never use QTGMC if there is no regular interlacing (e.g. don't use it on Telecine with 3:2 or worse pulldowns, or even on norm conversion results with blending).

Boulder
2nd August 2014, 13:03
Furthermore, never use QTGMC if there is no regular interlacing (e.g. don't use it on Telecine with 3:2 or worse pulldowns, or even on norm conversion results with blending).Out of interest, what is a good way to bob when redoing blended crap? I've been using QTGMC since it provides good quality even with non-purely interlaced material. Maybe it's just some of the post-processing stuff there that works well, I don't know.

Sharc
2nd August 2014, 14:00
Out of interest, what is a good way to bob when redoing blended crap? I've been using QTGMC since it provides good quality even with non-purely interlaced material. Maybe it's just some of the post-processing stuff there that works well, I don't know.
Blended crap = blended fields or blended frames?
Dependiong on the root cause for the blending srestore() often helps. It might be a bit tricky (trial and error) to find the original (progressive) framerate if it is not compliant with one of the common (standard) rates.
Blended fields are more difficult or hopeless to fix, I think ....

Boulder
2nd August 2014, 14:05
Oh, I meant preprocessing (=bobbing) the clip to feed to SRestore. SRestore itself works quite well in most cases if the pattern is constant.

Sharc
2nd August 2014, 14:21
I normally use tdeint(mode=1) as a bobber,
or QTGMC(input type=0)
followed by srestore(omode="pp3"), possibly followed by
tdecimate() for removing double-blended fields.

You may already have tried this though ....

DJ-1
4th August 2014, 07:16
Hi, if I want a good analysis of source material I need to have trimmed my source from time to time. I usually use dvd shrink & use its cut feature but have read about programs not doing 'clean-cuts'.
Can someone recommend a 'clean-cutting' cutter?, thanks.

LigH
4th August 2014, 07:23
For MPEG2 sources like on DVD Video: Cuttermaran or MPEG2Schnitt. They will be able to cut GOP-wise, or even frame-accurate with smart re-encoding if you use one of the MPEG2 encoder "provider" modules (e.g. for HC).

Music Fan
4th August 2014, 12:38
Dvd-Shrink cuts correctly on I-frames because it can not re-encode (no smart rendering).

Music Fan
4th August 2014, 12:41
I normally use tdeint(mode=1) as a bobber,
or QTGMC(input type=0)
followed by srestore(omode="pp3"), possibly followed by
tdecimate() for removing double-blended fields.
What does "double-blended fields" mean ?
Does your script work with blended fields from interlaced videos (resized without de-interlacing) ?

Sharc
4th August 2014, 19:33
What does "double-blended fields" mean ?
Both fields of a frame are blended.
Does your script work with blended fields from interlaced videos (resized without de-interlacing) ?
I don't know, but I doubt. You would have to try and see whether you get some improvement. There are probably better scripts for that purpose. Resizing of interlaced content without prior deinterlacing is bad.
Perhaps someone else could chime in ....

simcut
10th August 2014, 19:19
QTGMC will rely on the field order AviSynth assumes after loading the source clip.

Not all source filters are able to determine the field order correctly (e.g. AviSource will probably assume BFF because the AVI container does not flag it, each VfW codec may have its own default, and BFF is the most common default for DV in AVI); sometimes even the encoding studio flagged the material wrong. In general, better be safe than sorry (to have wasted hours due to QTGMC creating motion "holes" because the assumed order was wrong).

Furthermore, never use QTGMC if there is no regular interlacing (e.g. don't use it on Telecine with 3:2 or worse pulldowns, or even on norm conversion results with blending).

Thank you for your advice man, much appreciated! :)

hello_hello
22nd September 2014, 22:11
Would it be normal for QTGMC to be slower when working with non-mod16 video than if it's mod16?

I've been re-encoding some old video which is mostly 720x576 and running QTGMC in progressive mode to clean it up a little.
QTGMC(InputType=1, Ezdenoise=1)

I noticed every so often one of the encodes would take much longer. A little investigating seems to indicate it's due to a mod4 width. If I resize to mod16 in the script before QTGMC the speed goes back to normal, but that's not ideal as I'm also resizing after QTGMC.

It's not the end of the world and something I probably only noticed because the old dual-core I'm using is pretty slow anyway. When the resolution is 720x576 it only manages about 5.5fps, but CPU usage sits on 90%-100%. When the width is mod4 (ie 716x576) it drops to about 2.8fps and CPU usage hovers around 70%. There's a couple of encodes which I think ran even slower and they may have also had a mod4 height. I'd need to go back and do some more testing to confirm that.

I've tried QTGMC 3.32 and 3.33. I've checked to see whether I'm still using the QTGMC recommended versions of the various plugins and went back to the recommended versions where I wasn't but that didn't seem to make any difference. Avisynth 2.6.0.4, Windows XP.

Thanks.

Boulder
23rd September 2014, 07:10
It could be memory alignment playing tricks on you (see Crop in Avisynth's documentation). You could try using Crop with the align=true option to get around it. Or Crop(0,0,-0,-0,true) if you've already cropped the video elsewhere.

hello_hello
23rd September 2014, 08:04
Thanks Boulder.

I ran a test with a source video with a resolution of 716x576.

With this script it runs at about 2.8fps

LoadPlugin("C:\Program Files\MeGUI\tools\ffms\ffms2.dll")
FFVideoSource("E:\video.mkv", cachefile="D:\video.ffindex", fpsnum=25, fpsden=1, threads=1)
crop(0,0,-0,-0,true)
QTGMC(InputType=1, Ezdenoise=1)
crop(4, 4, -4, -6)
Spline36Resize(656,480)

With this script it runs at 5.1fps

LoadPlugin("C:\Program Files\MeGUI\tools\ffms\ffms2.dll")
FFVideoSource("E:\video.mkv", cachefile="D:\video.ffindex", fpsnum=25, fpsden=1, threads=1)
Spline36Resize(720,576)
QTGMC(InputType=1, Ezdenoise=1)
crop(4, 4, -4, -6)
Spline36Resize(656,480)

I even tried a second PC (quadcore). Being slow and running in single threaded mode, I'd normally run two QTGMC encodes at the same time. When I do, the encode of the video with a mod16 resolution runs a fair bit faster (close to 2x) than the one with the mod4 resolution.
I've tested without fpsnum=25, fpsden=1 and threads=1, but they don't seem to be causing it. QTGMC's Ezdenoise doesn't seem to be the culprit either.

LigH
23rd September 2014, 08:24
Uh, scaling twice... I may rather have added a border and cropped as much more.

asarian
23rd September 2014, 08:25
Thanks Boulder.

I ran a test with a source video with a resolution of 716x576.

With this script it runs at about 2.8fps

LoadPlugin("C:\Program Files\MeGUI\tools\ffms\ffms2.dll")
FFVideoSource("E:\video.mkv", cachefile="D:\video.ffindex", fpsnum=25, fpsden=1, threads=1)
crop(0,0,-0,-0,true)
QTGMC(InputType=1, Ezdenoise=1)
crop(4, 4, -4, -6)
Spline36Resize(656,480)

With this script it runs at 5.1fps

LoadPlugin("C:\Program Files\MeGUI\tools\ffms\ffms2.dll")
FFVideoSource("E:\video.mkv", cachefile="D:\video.ffindex", fpsnum=25, fpsden=1, threads=1)
Spline36Resize(720,576)
QTGMC(InputType=1, Ezdenoise=1)
crop(4, 4, -4, -6)
Spline36Resize(656,480)

I even tried a second PC (quadcore). Being slow and running in single threaded mode, I'd normally run two QTGMC encodes at the same time. When I do, the encode of the video with a mod16 resolution runs a fair bit faster (close to 2x) than the one with the mod4 resolution.
I've tested without fpsnum=25, fpsden=1 and threads=1, but they don't seem to be causing it. QTGMC's Ezdenoise doesn't seem to be the culprit either.

Instead of Spline36Resize(720,576), why not just AddBorders (4, 0, 0, 0) or something? The way you do it now, you're losing data.

Several QTGMC options even require mod16; so, always best to pad your source up to mod16 to begin with, I'd say.

hello_hello
23rd September 2014, 08:28
In the end, I've used this script to solve the slowdown problem, while wondering why I didn't just think of it in the first place......

LoadPlugin("C:\Program Files\MeGUI\tools\ffms\ffms2.dll")
FFVideoSource("E:\video.mkv", cachefile="D:\video.ffindex", fpsnum=25, fpsden=1, threads=1)
AddBorders(4,0,0,0)
QTGMC(InputType=1, Ezdenoise=1)
crop(8, 4, -4, -6)
Spline36Resize(656,480)

I use QTGMC for noise reduction quite a bit and I've not paid much attention to the source video dimensions in the past. Next time I'll try something similar if the source isn't mod16 to test whether the speed difference is normal.

Edit: I found the solution while you guys were suggesting it too, but I didn't see your posts until I submitted this one.
Thanks!

-Vit-
4th November 2014, 01:01
Kudos to the VapourSynth guys for getting QTGMC native. Wonder how well it works.

Just passing by to say hello - happy to see the script still being used. My avisynth development fell by the wayside when other things came up. Today I needed to do some video processing for first time in a long time. I found I didn't even have a working avisynth setup, lol. I seem to have lost the latest QTGMC version I had been working on. Probably for the best, it was getting even more complex...

Reel.Deel
4th November 2014, 01:23
-Vit-, nice to see you around. Don't be a stranger :)

-Vit-
4th November 2014, 03:24
Thanks. I posted a little present (http://forum.doom9.org/showthread.php?t=171346), but I don't do much video work these days so...

jriker1
17th November 2014, 17:07
I have some VHS captures and trying to use QTGMC to deinterlace. There have been some other posts here about this issue, but the resolution is always the poster not realizing they didn't fix the problem but changed the colorspace.

I have some YUY2 footage. AVISynth script works fine in Windows XP 32-bit. But on my Windows 7 box 64-bit no joy. Note using AVISynth 2.5.8 32-bit on both and both "work", just not with YUY2 colorspace. If I use a DV footage with YV12 goes thru fine as it's skipping the problem routine. This is where most people end their struggle by adding ConverttoYV12 into their script and thinking the problem was fixed.

I have tried a bunch of DLL changes but rather than get into them all will look for advice on thoughts how to get things working. I keep getting "There is no function named "Interleaved2Planar" ....QTGMC-3.22.avsi, line 350.

So I have


Windows 7 64-bit
AVISynth 2.5.8 32-bit
Appropriate files in the WOW64 folder
Rest files installed as described in the original install packet
mt_masktools-25.dll is in the plugin folder.
Per the first page I already have Visual Studio Redistributable 2010 (newer than linked on main page) installed.


Any thoughts how to get this working? Or a minimum copy of someone's plugin folder with a similar setup that is working?

Thanks.

JR

Reel.Deel
17th November 2014, 17:23
I keep getting "There is no function named "Interleaved2Planar"

You need the SSE Tools plugin from the Remove Grain v0.9 package (http://avisynth.nl/index.php/RemoveGrain_v0.9).

jriker1
17th November 2014, 17:26
You need the SSE Tools plugin from the Remove Grain v0.9 package (http://avisynth.nl/index.php/RemoveGrain_v0.9).

So to confirm, I need SSETools.dll and not SSE2Tools or SSE3Tools? Right now I have SSE2Tools.dll in the plugin folder which believe came from the original QTGMC install pack.

Thanks.

JR

StainlessS
17th November 2014, 17:31
SSE2Tools should be just fine, just a faster version than SSETools and which should be OK on your machine.
I have heard rumblings that SSE3Tools has problems but cannot confirm, I am happy to use SSE2Tools
even though my machine is SSE3 compatible.

EDIT:
SSETools is minimum Pentium III, SSE2Tools min P4.

jriker1
17th November 2014, 17:39
Thanks. One question. Should you be able to do a LoadPlugin on the SSE2Tools.dll file? I tried it for good measure and it says "AVISynth open failure: LoadPlugin unable to load ....SSE2Tools.dll"

EDIT: I tried replacing the SSE2Tools.dll with the one from 0.9 assuming it wasn't the same to begin with and same error. Here are the plugins in my folder. Most don't have version information imbedded otherwise would pull all that:

AddGrainC.dll
AviSynthPluginsDir.avsi
aWarpSharp.dll
colors_rgb.avsi
\ConditionalSmoothBob
ConditionalSmoothBob.avsi
DenoiseSharpen.dll
DePan.dll
DePanEstimate.dll
dfttest.dll
DGDecode.dll
DGIndex.exe
DGIndex.ini
DGPulldown.exe
DirectShowSource.dll
\dv2film
dv2film.avsi
dv2film.txt
EEDI2.dll
eedi3.dll
ffavisynth.avsi
ffavisynth.dll
FFT3DFilter.dll
GetSystemEnv.dll
GetSystemEnv.html
hd2sd.avsi
hd2sd.txt
\hd2sd_sd2hd
masktools2-25.dll
MT.dll
mt_masktools-25.dll
mvtools2.dll
NicAudio.dll
nnedi.dll
nnedi2.dll
nnedi3.dll
QTGMC-3.32.avsi
RemoveDirt.dll
RemoveDirtMC.avs
RemoveDirtS.dll
RemoveDirtSSE2.dll
RemoveGrain.cpp
RemoveGrain.dll
RemoveGrain.htm
RemoveGrainS.dll
RemoveGrainSSE2.dll
RemoveGrainSSE3.dll
Repair.dll
RepairS.dll
RepairSSE2.dll
RepairSSE3.dll
RSharpen.dll
RSharpenS.dll
RSharpenSSE2.dll
RSharpenSSE3.dll
sd2hd.avsi
sd2hd.txt
Srestore.avsi
SSE2Tools.dll
TCPDeliver.dll
TDeint.dll
TIVTC.dll
VerticalCleanerSSE2.dll
Where_to_put_these.txt
yadif.dll


JR

Music Fan
17th November 2014, 17:53
Try to remove the 3 ...SSE3.dll

StainlessS
17th November 2014, 17:56
SSE2Tools.exe requires MSVCR71.dll, see a bit about it here: (from Visual Studio toolkit 2003 / VS DotNet 2003 [I think])

http://forum.doom9.org/showthread.php?p=1696600&highlight=MSVCR71.dll#post1696600

and here:
http://forum.doom9.org/showthread.php?p=1620387#post1620387

or here:
https://www.google.co.uk/?gws_rd=cr&ei=ZE7PUrCTJMrStAa9p4CoAg#q=msvcr71.dll+microsoft

johnmeyer
17th November 2014, 17:57
Why do you want to deinterlace? Remember, deinterlacing always reduces the quality of the video.

Always.

When you re-size the video, you must first deinterlace, so there are times when it must be done. However, if you are simply making a DVD from your VHS tapes, I would recommend against doing any deinterlacing.

LigH
17th November 2014, 17:58
You may have too many competing DLLs (providing functions with the same name) in your plugin folder where AviSynth tries to load automatically from. Especially regarding R*SSE*.dll, I would strongly recommend not to have SSE, SSE2 and SSE3 variants of the same in this directory, but only one kind of each (e.g. only SSE2 of them all).

And StainlessS may be correct, there are many Microsoft Visual C++ Runtime versions out there (2003..2013) you may have to install once for all applications and DLLs which may need any of them.

StainlessS
17th November 2014, 18:04
DGIndex.exe # Should not really be here
DGIndex.ini # ditto
DGPulldown.exe # ditto
RemoveGrain.cpp # ditto
RemoveGrain.htm # ditto

RemoveDirt.dll # Only one of these (SSE2 or SSE3 OR 'S' version meaning 'Static' does not require CPP runtimes)
RemoveDirtS.dll
RemoveDirtSSE2.dll

RemoveGrain.dll # Only one of these (SSE2 or SSE3 OR 'S' version meaning 'Static' does not require CPP runtimes)
RemoveGrainS.dll
RemoveGrainSSE2.dll
RemoveGrainSSE3.dll

Repair.dll # Only one of these (SSE2 or SSE3 OR 'S' version meaning 'Static' does not require CPP runtimes)
RepairS.dll
RepairSSE2.dll
RepairSSE3.dll

RSharpen.dll # Only one of these (SSE2 or SSE3 OR 'S' version meaning 'Static' does not require CPP runtimes)
RSharpenS.dll
RSharpenSSE2.dll
RSharpenSSE3.dll


EDIT:
The 'S' versions are a lot easier as require no runtime but are usually bigger as they include the C libraries instead of loading a dll.

And a Ligh say above, you cannot just install latest version of the runtimes, the avisynth dll's are tied to a particular CPP runtime,
and so you may need to install, from VS 2005, 2008, 2010, 2012, 2013, and 2014, depends what you require,
as I said, the 'S' versions are easier.

And you do not need to LoadPlugin for most dll's if they are in your plugins directory. (although some people like to LoadPlugin for
everything, I have about 270 plugs in my dir at times but not at present).

Reel.Deel
17th November 2014, 18:05
Should you be able to do a LoadPlugin on the SSE2Tools.dll file? I tried it for good measure and it says "AVISynth open failure: LoadPlugin unable to load ....SSE2Tools.dll"


It sounds like like you're missing the MSVCR71.DLL runtime dependency. Download it here: msvcr7071msvcp7071.rar (https://web.archive.org/web/20070706223430/http://home.arcor.de/dhanselmann/_stuff/msvcr7071msvcp7071.rar) and add to your system directory (SysWOW64 on Windows 7); you can also add MSVCR71.DLL to the AviSynth plugin folder, I don't know if this is considered kosher but it does work (I sometimes use it this method for testing).

Edit: too slow, StainlessS beat me to it...

jriker1
17th November 2014, 18:11
Why do you want to deinterlace? Remember, deinterlacing always reduces the quality of the video.

Always.

When you re-size the video, you must first deinterlace, so there are times when it must be done. However, if you are simply making a DVD from your VHS tapes, I would recommend against doing any deinterlacing.

Hi JohnMeyer. I am not creating DVD's. They will end up being some form of media file on my media server so will be MKV or MP4 or WMV or something and played on a plasma or LCD display so figure deinterlacing is the right choice.

Removing the SSE3 files didn't help. Whether they should be there is another story. I'll cleanup per your recommendation StainLessS

However BINGO!!! Adding the MSVCR71.dll did it in the SysWOW64 folder. Thank you StainlessS and Reel.Deel.

jriker1
17th November 2014, 19:10
Now for the next problem to research. VirtualDub hit with out-of-bounds memory access (access violation) occurred in module 'lagarith'...reading address 076A4000.

Think I saw that before and switched to HuffyUV but since HuffyUV is no longer updated and never had a real installer for Windows 7 always found it less usable overall in my various tools.

JR

Boulder
17th November 2014, 19:14
Why not install ffdshow and use ffv1 in VDub, it's a very efficient lossless codec.

Music Fan
17th November 2014, 19:24
They will end up being some form of media file on my media server so will be MKV or MP4 or WMV or something and played on a plasma or LCD display so figure deinterlacing is the right choice.
You media server should be able to play interlaced videos.
Anywyay, if you need to de-interlace, 50p or 60p is better than 25p or 30p, it keeps the fluidity.

When you re-size the video, you must first deinterlace
I found a script that can resize interlaced videos without having to de-interlace and there is no field blending, JDL_InterlacedResize ;
http://www.avisynth.nl/users/stickboy/
It needs jdl-interlace.avsi and jdl-util.avsi.

I also use JDL_UnfoldFieldsVertical to separate fields and gather them one above the other to create a progressive video, which allows to use all filters only working on progressive videos. After filtering, put JDL_FoldFieldsVertical to re-interlace the video.
The option flip=true reverse the bottom field to make the 2 fields touching themselves by their bottom side, this may help spatial filters.

That saves a lot of time and quality when de-interlacing is not absolutely needed.

johnmeyer
17th November 2014, 20:01
I found a script that can resize interlaced videos without having to de-interlace and there is no field blending, JDL_InterlacedResize.Yes, you are correct: you can separatefields (or bob), resize, and then weave, and thereby avoid deinterlacing. This is faster than deinterlacing, but still avoids creating those horrible artifacts which result from resizing interlaced material using both fields at once.

However, there is no free lunch: while this does eliminate deinterlacing artifacts, resizing done this way is not as accurate because spatial information from the even fields is not used when deciding where to put each pixel for the odd fields (and vice versa). Each method has its advantages.

As always, there is no best choice ...

Boulder
17th November 2014, 20:17
If you need to deinterlace either by bobbing or discarding a field, QTGMC is definitely the way to go. The minor details look much better (provided that you don't cheat by choosing a too light a preset). The shutterblur option is very good IMO, even a clip with a discarded field looks very smooth in motion.

Personally I tend to bob-deinterlace to 50p or 60p with QTGMC because none of my playback devices come even close when quality is the main concern.

hello_hello
17th November 2014, 20:42
Why do you want to deinterlace? Remember, deinterlacing always reduces the quality of the video.

Always.

What particular video playing setup today is likely to display interlaced video without de-interlacing it?

Personally, I think QTGMC de-interlacing tends to improve the quality. At least compared to any other de-interlacing method, whether it be when encoding or on playback.

jriker1
17th November 2014, 21:03
I've had other problems with Lagarith before so may be misinterpreting this, however if I take a YV12 clip, and a YUY2 clip, and run them thru an AVISynth script (separately obviously), same script, just the YUY2 clip is AVI so using AVISource and the YV12 clip is MPG so using MPEG2Source, the YV12 one runs thru QTGMC every time, the YUY2 one keeps crashing even using half my cores as part of the SetMTMode command.

JR

jriker1
17th November 2014, 22:34
One curious thing I was wondering. If you are using AVISynth MT and encoding thru VirtualDub should you be checking the multithreading support in Lagarith or does that confuse things? Wasn't sure if AVISynth managed all the multithreading and Lagarith should be left unchecked. Would imagine not else I wouldn't be able to make it thru an hour and a half of encoding a file in YV12 colorspace in the first place.

JR

jriker1
17th November 2014, 23:38
Why not install ffdshow and use ffv1 in VDub, it's a very efficient lossless codec.

I'm not a big fan of installing ffdshow on my encoding box (minimal installs there), as it always seemed to want to take over a lot of stuff. Is there a way to install ffv1 by itself without the full ffdshow?

Getting annoyed right now as I'm running a deinterlace job and it's going to take one day thirteen hours without multi-threading support but with was going to be nine hours. Could switch to HuffyUV but my main system doesn't see it in VirtualDub for some reason.

Thanks.

JR

foxyshadis
18th November 2014, 00:12
Skip Lagarith in favor of UT video, or MagicYUV. Too many bugs in Lagarith if you use anything but YV12, it's slow, and the compression isn't that much better than UT or MagicYUV. ffv1 on the other hand is smaller and slower. The trade-off's up to you though. To get ffv1, install latest ffdshow (http://sourceforge.net/projects/ffdshow-tryout/files/latest/download?source=files) and select only the VFW part, not the DirectShow stuff. (DirectShow will still get extracted, but won't actually be functional.)

You should probably replace RemoveGrain everything with RGTools (http://avisynth.nl/index.php/RgTools). That fixes all of kassandro's SSE bugs, and it's faster, to boot.

LigH
18th November 2014, 00:19
Download it here:

In general, I would discourage people from downloading DLLs from any arbitrary archive.

The problem here is: MSVC?71.DLL are part of Microsoft Visual C++ .NET 2003 with the Microsoft .NET Framework 1.1. Windows 7/8 won't support .NET 1.1 anymore, it won't install. There is no Redistributable for these DLLs only. So in this case ... well ... downloading them or copying them from another PC may be your only options. Meh.

KB326922 (http://support2.microsoft.com/kb/326922/)
__

P.S.: Thank you for linking the RgTools, that was new to me, interesting project. If it is compatible enough for QTGMC, it will probably be useful for many people who prefer an up-to-date AviSynth.

Music Fan
18th November 2014, 00:34
Skip Lagarith in favor of UT video, or MagicYUV. Too many bugs in Lagarith if you use anything but YV12, it's slow, and the compression isn't that much better than UT or MagicYUV. ffv1 on the other hand is smaller and slower.
Slower and not as easy to use as Lagarith, I never had problem with Lagarith (yuy2, yv12, rgb) which is for me the best lossless codec. I don't really see the utility to use UT video or anything else.

jriker1
18th November 2014, 00:37
Skip Lagarith in favor of UT video, or MagicYUV. Too many bugs in Lagarith if you use anything but YV12, it's slow, and the compression isn't that much better than UT or MagicYUV. ffv1 on the other hand is smaller and slower. The trade-off's up to you though. To get ffv1, install latest ffdshow (http://sourceforge.net/projects/ffdshow-tryout/files/latest/download?source=files) and select only the VFW part, not the DirectShow stuff. (DirectShow will still get extracted, but won't actually be functional.)

You should probably replace RemoveGrain everything with RGTools (http://avisynth.nl/index.php/RgTools). That fixes all of kassandro's SSE bugs, and it's faster, to boot.

Thanks for the thoughts I was just looking at UT and MagicYUV. Compression isn't critical for me, just that it maintains its colorspace and is lossless. This is an intermediate file and have loads of space. With MagicYUV it has a checkbox for interlaced. Do I actually have to check and uncheck this if the footage is interlaced or not each time? Assume I would leave unchecked considering the output is progressive deinterlaced footage that im working on now

EDIT: Will updating to RGTools help if with QTGMC I'm doing QTGMC(preset="Very Slow"). Still good to know and update of course.

Guess MagicYUV didn't help five minutes in crashed with a best guess at the cause KERNELBASE. Any vslue in trying the latest 2.6 of Avisynth and the 64-bit version?
JR

foxyshadis
18th November 2014, 00:43
thanks for the thoughts I was just looking at UT and MagicYUV. Compression isn't critical for me, just that it maintains its colorspace and is lossless. This is an intermediate file and have loads of space. with MagicYUV it has a checkbox for interlaced. do I actually have to check and hncheck this if the footage is interlaced or not each time? assume I would leave unchecked considering the output is progressive deinterlaced footage that im working on now

JR

Only if you do a mode conversion from RGB or YUY2 to 4:2:0 (YV12) or vice versa, where it matters how you convert the chroma. Otherwise, I think it only changes the compression % slightly.

-Vit-
18th November 2014, 01:36
As I've been away, could someone update me on all the filter updates that have affected QTGMC recently? I noticed that masktools-2.6 doesn't work anymore. And now there is this RGTools. Anything else?

It would be nice to update the first post to be correct for current usage.

jriker1
18th November 2014, 02:31
I tried dropping RgTools.dll in my plugin directory. Caused the script to fail. I've also updated to latest 2.6MT.

Avisynth: access violation at 0x00000000 in virtualdub.exe
attempting to read from 0x000000000
QTGMC-3.22.avsi line 756
QTGMC-3.22.avsi line 781
QTGMC-3.22.avsi line 386

No documentation if this replaces other plugins what to physically remove if they are installed. If this is the problem. I tried removing RemoveGrainSSE2.DLL but didn't help.

Also ran into some other issues.

SEt's latest Avisynth 2.6MT doesn't work with the latest plugins. Got all kinds of access violations. Read a post that said the latest doesn't work. Had to go back to a prior version and problems went away.

mt_masktools-26.dll recommended for 2.6 doesn't work as -Vit- heard. Get colorspace errors and had to go back to 25.

JR

Reel.Deel
18th November 2014, 02:43
RGTools requires AviSynth 2.6 (latest Alpha 5 (http://forum.doom9.org/showthread.php?t=168764) or Set's latest MT version). It also requires the Microsoft Visual C++ 2012 Redistributable Package (vcredist_x86.exe) (http://www.microsoft.com/en-us/download/details.aspx?id=30679), also be aware that if you use RGTools you cannot process YUY2 with QTGMC (it only works with planar colorspaces; it does have the 'planar' parameter but it's only so it won't break the script).

For MaskTools2, take a look at the updated version by the awesome tp7 (https://github.com/tp7/masktools/releases). (same requirements as RGTools)

jriker1
18th November 2014, 02:50
RGTools requires AviSynth 2.6 (latest Alpha 5 (http://forum.doom9.org/showthread.php?t=168764) or Set's latest MT version). It also requires the Microsoft Visual C++ 2012 Redistributable Package (vcredist_x86.exe) (http://www.microsoft.com/en-us/download/details.aspx?id=30679), also be aware that if you use RGTools you cannot process YUY2 with QTGMC (it only works with planar colorspaces; it does have the 'planar' parameter but it's only so it won't break the script).

For MaskTools2, take a look at the updated version by the awesome tp7 (https://github.com/tp7/masktools/releases). (same requirements as RGTools)

Check and check. Though I am using YUY2 colorspace. Not sure if YV12 would cause the script to execute or not and it's crashing because of YUY2. Really trying to get this 3 and a half hour YUY2 script to deinterlace before going to try some of my YV12 content with other plugins.

JR

Reel.Deel
18th November 2014, 03:01
For YUY2, you should really stick to the original plugins. You also have to use mt_masktools-25.dll (for YUY2). Other than that I don't really know.

StainlessS
18th November 2014, 03:05
Tis a shame that some feel the need to drop support for YUY2, it was I think supported before YV12 in Avisynth
and some older filters only work in YUY2 not planar, also Layer is YUY2 or RGB32 only in v2.6.

EDIT:
It's annoying having to swap colorspaces multiple times when some filters only support a subsection of possibilities.
YUY2 is a tad more irksome to code for, but not so very much.

Reel.Deel
18th November 2014, 03:15
To be fair, those who dropped YUY2 do support YV16. Thanks to YUY2 there's ugly hacks like interleaved2planar/planar2interleaved (mainly all of kassandro's plugins) but MVTools2 is also affected by this ugly hack (hence the planar parameter).

jriker1
18th November 2014, 04:28
OK, I'm on 2.6 of AVISynth and can go back to 2.5.8 but will revert to the original QTGMC files but here's a funny one. I'm using MagicYUV to try encoding and Virtual dub crashes because of the lagarith module. Huh?

Is this all happening because of AVISynth and the plugins or should I be running this script with something other then VDub?

Even though I can't use it (won't open in Premiere Pro), also going to try using HuffyUV as it never seemed to crash for me with YUY2. See if in this case if it does or not.

EDIT: With original files still crashes. Even faster. Like 2 minutes in. Again complaining about Lagarith for whatever reason. Uninstalling it..

Edit: Uninstall lagarith now can't do anything. Darnit. Now I know what's kind of going on. When I originally imported the video into the system I did so using Lagarith. Guess I'm going to have to install Lagarith again, open the file itself in VirtualDub, and do a fast recompress in another codec before I can continue.

JR

Reel.Deel
18th November 2014, 04:33
As I've been away, could someone update me on all the filter updates that have affected QTGMC recently? I noticed that masktools-2.6 doesn't work anymore. And now there is this RGTools. Anything else?

It would be nice to update the first post to be correct for current usage.

Wow, I thought about sending you a PM about this very thing.
Since QTGMC is probably the most known/used AviSynth script it would be nice to see the first post updated with current information. Also, how about making v3.33 the official version? Since it's released I've used it exclusively and have not had any problems.

Here's all of the changes that I know of:

AddGrainC (http://forum.doom9.org/showthread.php?t=111849) - added support for additional planar colorspaces.

dfttest (http://forum.doom9.org/showpost.php?p=1386559&postcount=3) - has been updated a few times, it now supports YV16/YV24 and also includes "-Vit-'s threading fixes".

EEDI3 v0.9.2 (http://forum.doom9.org/showpost.php?p=1652667&postcount=476) - updated faster version.

MaskTools2 b1 (http://forum.doom9.org/showthread.php?t=169832) - a more "mature" version; works correctly with the latest avs 2.6. Read more here (https://github.com/tp7/masktools#masktools-2). A while back 06_taro (http://forum.doom9.org/showpost.php?p=1619023&postcount=649) released a fixed mt_masktools-26.dll since the official one no longer works with the latest Alpha 4/5.

MVTools v2.6.0.5 (http://forum.doom9.org/showpost.php?p=1386559&postcount=3) - has not been updated in a while so I'm sure you know about this one. In your plugins package you're distributing v2.5.11.2, the latest official version is v2.5.11.3

nnedi3 for AviSynth 2.6 (http://forum.doom9.org/showthread.php?t=170083) - supports all planar colorspaces.

nnedi3ocl (http://forum.doom9.org/showthread.php?t=169766) - OpenCL rewrite of nnedi3. I know it's not used in QTGMC but would be nice if you could :)

RGTools (http://forum.doom9.org/showthread.php?t=169832) - a rewrite of RemoveGrain, Repair, and VerticalCleaner all in one plugin. It also includes some other filters not used in QTGMC.

Regarding QTGMC, I think that covers everything you might of missed...

Notes:
Your plugin pack using the updated Avisynth 2.6 interface (http://forum.doom9.org/showpost.php?p=1568142&postcount=1126) is now outdated, it does not work with the latest 2.6; last version it worked with was 2.6 Alpha 3.

**Wishful thinking :p**
- a parameter to let the user pass a custom pre-filtered clip for better motion analysis

fvisagie
18th November 2014, 08:25
I have some YUY2 footage. AVISynth script works fine in Windows XP 32-bit. But on my Windows 7 box 64-bit no joy. Note using AVISynth 2.5.8 32-bit on both and both "work", just not with YUY2 colorspace.

It seems you haven't returned to this issue in the ensuing discussion. In case it's still relevant and in case I forget by the time you return to this:

What is your script, specifically what media file filter do you use? The problem you describe could very easily result from a. using a platform-dependent filter (e.g. DirectShow() and derivatives, and I think the AVI filters use VfW system codecs), and b. having platform differences. Some potential platform differences that come to mind are XviD (can take over some colourspace decoding), Intel... Indeo(?) codecs I think, Helix codec, etc.

Music Fan
18th November 2014, 12:39
Edit: Uninstall lagarith now can't do anything. Darnit. Now I know what's kind of going on. When I originally imported the video into the system I did so using Lagarith. Guess I'm going to have to install Lagarith again, open the file itself in VirtualDub, and do a fast recompress in another codec before I can continue.

JR
In my opinion, Lagarith is not the problem. On my pc, it doesn't crash, whatever I use it in yuy2 or YV12.
It works in Virtual Dub with Windows XP 32 bit and Win 7 pro 64.

qwerty1983
18th November 2014, 14:01
Sorry to interrupt the discussion. I want to clarify some things about the denoising aspects of qtgmc.

I read that the script denoises by default using MDegrain.

1) If i use QTGMC(NoiseProcess=1, NoiseRestore=0.0, Denoiser="dfttest",Sigma=4.0 ) does this mean that :
a) dfttest will do some additional denoising (to that done by MDegrain)
or b) dfttest will replace MDegrain as a denoiser ??


2) If i use QTGMC(NoiseProcess=2, GrainRestore=0.5, NoiseRestore=0.1, Sigma=2.5 ) does this mean that :
MDegrain will do the default denoising. The amount of noise will be calculated (by what filter? fft3dfilter? can i use dfttest?) but not removed. Then some of the noise is restored back. Is this correct?

3) I don't understand this example from the qtgmc 'read me' :
QTGMC(NoiseProcess=1, NoiseRestore=1.0, Sigma=2.0 ) # Retain *all* the noise / fine detail of a less noisy source
What's the point of denoising and then restoring 'all' the noise back again? What does 'all' mean? I'm missing something here.

jriker1
18th November 2014, 15:09
In my opinion, Lagarith is not the problem. On my pc, it doesn't crash, whatever I use it in yuy2 or YV12.
It works in Virtual Dub with Windows XP 32 bit and Win 7 pro 64.

That's good or bad to hear. :)

My Windows 7 64-bit system is pretty clean. I use it strictly for video editing so only have the following installed:


xiph.org for FLAC support
Virtual Clone Drive
Rovi TotalCode for Adobe Premiere
Adobe Premiere CC
QuickTime 7
Neat Video for Premiere
Haali Media Splitter
Microsoft Expressions Encoder 4

And now AVISynth 2.6 (32-bit), Lagarith and MagicYUV Codec.

For reference opening my AVI (Lagarith) directly in VirtualDub and selecting Fast Recompress, setting the Codec to MagicYUV caused a crash 35% into the conversion again with an "Assumption" as VirtualDub likes to say, that Lagarith caused it.

So the above wasn't even using AVISynth. Hmmm. For reference my YUY2 based script is fairly simple when I am using it.

SetMTMode(5,8)
import ("D:\Program Files (x86)\AviSynth 2.5\plugins\QTGMC-3.32.avsi")
SetMTMode(2)
AVISource("D:\Conversion\2 - Working\CH\CH.avi", pixel_type="YUY2")
AssumeTFF()
QTGMC(preset="Very Slow")

The script I don't have issues with which is in the YV12 colorspace plus mpeg2 based is a bit different:

SetMTMode(5,8)
LoadPlugin("D:\Program Files (x86)\AviSynth 2.5\plugins\dgdecode.dll")
import ("D:\Program Files (x86)\AviSynth 2.5\plugins\QTGMC-3.32.avsi")
SetMTMode(2)
V = MPEG2Source("D:\Conversion\2 - Working\HHGTTG\HHGTTG-4.d2v")
A = NicAC3Source("D:\Conversion\2 - Working\HHGTTG\HHGTTG-4 T80 2_0ch 192Kbps DELAY 0ms.ac3")
AudioDub(V, A)
AssumeTFF()
QTGMC(preset="Very Slow")

I have never seen the mpeg2 one fail on me though my conversions are shorter in length.

Edit. I am also as mentioned above on AVISynth 2.6 32-bit now and strictly the base plugins. Here is what is in the folder:

AddGrainC.dll
dfttest.dll
DGDecode.dll
EEDI2.dll
eedi3.dll
FFT3DFilter.dll
mt_masktools-25.dll
mvtools2.dll
NicAudio.dll
nnedi.dll
nnedi2.dll
nnedi3.dll
QTGMC-3.32.avsi
RemoveGrainSSE2.dll
RepairSSE2.dll
SSE2Tools.dll
TDeint.dll
VerticalCleanerSSE2.dll
yadif.dll


JR

Music Fan
18th November 2014, 15:28
I'm not an avisynth specialist and it's hard to tell what's going on with your pc, but all I can say is that I use neither MTMode nor 64 bit avisynth, only 32 bit. My avisynth version is 2.60 alpha 5.

LigH
18th November 2014, 15:45
Wrong order:

SetMTMode(5,x)
# no calculations to be parallelized, just Import or LoadPlugin
SetMTMode(2)
# Source plugins possibly not compatible with mode 2
# other filters to be parallelized


Right order:

# no calculations to be parallelized, just Import or LoadPlugin
SetMTMode(5,x)
# Source plugins possibly not compatible with mode 2
# maybe some Preroll to linearize frame requests
SetMTMode(2)
# other filters to be parallelized


Consider using less than 8 threads, because each thread needs its own amount of RAM. Also be aware that EDI inside QTGMC forks threads too.

-Vit-
18th November 2014, 16:09
Wow, I thought about sending you a PM about this very thing.
Since QTGMC is probably the most known/used AviSynth script it would be nice to see the first post updated with current information. Also, how about making v3.33 the official version? Since it's released I've used it exclusively and have not had any problems.

Here's all of the changes that I know of:...
Thanks for all that info, when I get the time I'll update everything.

**Wishful thinking :p**
- a parameter to let the user pass a custom pre-filtered clip for better motion analysis
- a parameter to disable chroma processing in QTGMC (useful in certain scenarios)
First one you can do already. In the docs the section "External Linkage" lists the clips/vectors that you can either inject into or extract from QTGMC innards. Here's how to send in your own filter clip:

QTGMC_srcClip = your filtered clip
QTGMC( PrevGlobals="Reuse" )

Second point - what would be in the chroma channel of the output? Zeros, 128 (or whatever you need for greyscale, can't remember - rusty), undefined? Any of that you can do yourself. Or do you want speed? Then use the ChromaMotion, ChromaEdi, ChromaNoise settings.

jriker1
18th November 2014, 16:22
I'm not an avisynth specialist and it's hard to tell what's going on with your pc, but all I can say is that I use neither MTMode nor 64 bit avisynth, only 32 bit. My avisynth version is 2.60 alpha 5.

Thanks for the info. I believe if I went your path the conversion would work as I have tried eliminating the MT commands which I guess makes AVISynth run without multi threaded support and after a couple hours it was still running. It's a trade off of 1 1/2 days of deinterlacing vs 9 hours with MT support enabled. Large investment in time to tie up the computer for the first step of my conversion to digital for this content. Guess there is the argument that a slow conversion is better than one that doesn't work at all, but that's really slow.

There is also an old plugin for Premiere Pro x64 that is out there to allow import of AVS files. Requires a 64-bit version of AVISynth and all it's plugins to work though. Not sure how it works with Premiere CC version or if it would help resolve my problem. Guess I'd like to see if I could do the same thing but without VirtualDub in the equation if things would work.

JR

-Vit-
18th November 2014, 16:42
I read that the script denoises by default using MDegrain
Yes and no. MDegrain is used to perform a binomial temporal blur that is the core of the algorithm. The primary use of MDegrain in this script is to deinterlace, not to denoise. But of course it does denoise as well. Which is why default QTGMC does some denoising. You can slightly control the final pass of MDegrain denoising by setting TR2=1,2 or 3, which in some cases might be enough if all you want is a stronger or weaker denoise.

However, for more precise control over noise, QTGMC provides a completely separate set of noise controls. In fact the noise in your clip can take a completely separate processing path than the clean underlying image. These denoising controls do not use MDegrain, they use fft3dfilter or dfttest.

Retain *all* the noise / fine detail of a less noisy source
What's the point of denoising and then restoring 'all' the noise back again?
(1) A light grain is sometimes desirable, part of the intent of a video and you do not want to remove it. (2) Even good denoising sometimes removes fine detail, which you probably don't want to lose.
Because QTGMC's core process (using MDegrain) will always denoise, that means you are guaranteed to lose grain and some fine detail using the defaults. So to retain those features you can denoise at the start, keep the removed noise, do the QTGMC processing, then add the noise back after. And of course I use the word noise to mean grain, fine detail and noise.

Whether you want to do this or not will depend on your source (graininess, detail, noise) and your personal preference.

1) If i use QTGMC(NoiseProcess=1, NoiseRestore=0.0, Denoiser="dfttest",Sigma=4.0 ) does this mean that :
a) dfttest will do some additional denoising (to that done by MDegrain)
or b) dfttest will replace MDegrain as a denoiser ??

(a) sort of. First dfttest will denoise, then MDegrain will do it's job for deinterlacing on the cleaned image.



2) If i use QTGMC(NoiseProcess=2, GrainRestore=0.5, NoiseRestore=0.1, Sigma=2.5 ) does this mean that :
MDegrain will do the default denoising. The amount of noise will be calculated (by what filter? fft3dfilter? can i use dfttest?) but not removed. Then some of the noise is restored back. Is this correct?

No, fft3dfilter will be used to denoise, set Denoiser="dfttest" if you want that instead. The amount of noise to remove is the Sigma=2.5. Some of the noise /grain is restored at the end of the script (so the MDegrains don't wipe it out).

Consider using the EZDenoise or EZKeepGrain settings.

Boulder
18th November 2014, 16:57
Thanks for the info. I believe if I went your path the conversion would work as I have tried eliminating the MT commands which I guess makes AVISynth run without multi threaded support and after a couple hours it was still running. It's a trade off of 1 1/2 days of deinterlacing vs 9 hours with MT support enabled. Large investment in time to tie up the computer for the first step of my conversion to digital for this content. Guess there is the argument that a slow conversion is better than one that doesn't work at all, but that's really slow.

There is also an old plugin for Premiere Pro x64 that is out there to allow import of AVS files. Requires a 64-bit version of AVISynth and all it's plugins to work though. Not sure how it works with Premiere CC version or if it would help resolve my problem. Guess I'd like to see if I could do the same thing but without VirtualDub in the equation if things would work.

JRWhat comes to QTGMC crashing when using SetMTMode, I'd say that you are asking for trouble :)

I'm always repeating myself but the old trick of splitting the lossless encode into x parts, x being the number of threads, and then joining them in the AVS script for the final encode is a non-crashing workaround. In fact, it is also faster than trying to use the same number of threads with QTGMC.

StainlessS
18th November 2014, 17:04
@Boulder,
I dont use MT versions, but I do sometimes do the same as you suggest (but I only do it in two parts [on dual core]).

EDIT: Dont think I could be bothered with all that MT nonsense.

Boulder
18th November 2014, 17:07
Yes, it speeds up processing in all cases where you can utilise a multicore processor. Squeezing out all I can, I've ended up piping to 64-bit ffmpeg with three parallel encodes, it leaves a nice headroom for other activies on a quad-core.

Music Fan
18th November 2014, 17:08
I believe if I went your path the conversion would work as I have tried eliminating the MT commands which I guess makes AVISynth run without multi threaded support and after a couple hours it was still running. It's a trade off of 1 1/2 days of deinterlacing vs 9 hours with MT support enabled.
When you don't use MT, does your CPU reach 100 % (or the same CPU consumption than with MT, admitting MT does not reach 100 %) ?
If the CPU works less without MT (or does not reach 100% even with MT), there is a trick to use CPU at 100 % : divide virtually the video (with trim function) in 2 or 3 parts, each one in a single avs script, and encode them together in lossless (Lagarith for instance) with Virtual Dub.
The scripts are exactly the same, except the trim line (the part of the video each script concerns).
Then join the files (possibly with avisynth) and encode the complete file in x264 or what you want.

edit : Boulder was faster than me ;)

jriker1
18th November 2014, 17:22
When you don't use MT, does your CPU reach 100 % (or the same CPU consumption than with MT, admitting MT does not reach 100 %) ?
If the CPU works less without MT (or does not reach 100% even with MT), there is a trick to use CPU at 100 % : divide virtually the video (with trim function) in 2 or 3 parts, each one in a single avs script, and encode them together in lossless (Lagarith for instance) with Virtual Dub.
The scripts are exactly the same, except the trim line (the part of the video each script concerns).
Then join the files (possibly with avisynth) and encode the complete file in x264 or what you want.

edit : Boulder was faster than me ;)

With MT set to (5,8) I am utilizing about 70% of my CPU. Without any MT settings 14%.

Sounds like, if I'm reading this right, the suggestion is to have multiple AVS files that contain a piece of the video using trim. Run each one separately thru separate instances of VirtualDub until I max out my CPU, and then splice them back together at the end?

JR

Boulder
18th November 2014, 17:25
Yes, that's how you do it if you want to avoid problems.

jriker1
18th November 2014, 17:32
Thanks. One last question on this topic and off I go to try. If I want to break it into 30 minute segments (3 hour footage, 6 running at once), what would that look like. The trim command seems to be based on frames, not minutes, which makes sense as more precise, so not sure how this should be calculated. Original footage for reference is 29.97fps. Will be 59.94fps when done.

import ("D:\Program Files (x86)\AviSynth 2.5\plugins\QTGMC-3.32.avsi")
AVISource("D:\Conversion\2 - Working\CH\CH.avi", pixel_type="YUY2")
AssumeTFF()
QTGMC(preset="Very Slow")

If someone could provide me an example of the AVS file for the first 30 minutes and then for the second 30, and as an example from that point to the end, sure I can figure out the rest in between. And assuming Trim does both audio and video and not just video. Note assuming this video has a total of 385937 frames per mediainfo. Guessing conceptually something like this:

0,64322
64323,128645
128646,192967
192968,257289
257290,321612
321613-end

Thanks.

Edit. Would that be:

Trim(0,64322) in the first script
Trim(64323,128645) in the second script
Trim(321613,0) in the last?

Edit2: A lot of people say when using AVISource("D:\capture\clipo1.avi")+AVISource("D:\capture\clip02.avi") type commands they always have audio sync issues. Is this generally a problem and is there a better way to merge the resulting clips? Read about a double plus (++) for an aligned split but not sure if that works better.

JR

Music Fan
18th November 2014, 18:54
Would that be:

Trim(0,64322) in the first script
Trim(64323,128645) in the second script
Trim(321613,0) in the last?
Yes, it seems ok. You can also have a few pictures in common in 2 consecutive scripts to see clearly that no frame is missing after encoding, for example 0,64322 - 64320,128645 and cut these frames with trim when joining files.
Make a test (open the scripts in VDub) before encoding.
For a 14% CPU usage, you can make 7 or 8 scripts.

Edit2: A lot of people say when using AVISource("D:\capture\clipo1.avi")+AVISource("D:\capture\clip02.avi") type commands they always have audio sync issues. Is this generally a problem and is there a better way to merge the resulting clips? Read about a double plus (++) for an aligned split but not sure if that works better.
In my opinion, the simplest solution is to treat separately the sound, just mux it with video after joining parts.

hello_hello
18th November 2014, 22:36
jriker1,
I also use the "split encodes and run them simultaneously" method rather than MT AVISynth. I don't use intermediate lossless files though. Mostly I don't think there's any advantage to doing so. I just encode with the x264 encoder and append the encoded video. If that's what you do, and in case nobody's mentioned it, it pays to add --stitchable to the x264 command line (even when the same encoder settings are used). It'd be very disappointing to spend hours and hours encoding only to discover you can't append the encoded video.

I agree it's easier to treat the sound separately (as a single file), encode the video in sections, append the sections and add the whole audio track as you normally would. MKVMergeGUI makes it pretty easy, assuming you're happy with MKV. You can split the encoding job into individual scripts exactly as you described and append the encoded video when it's done. ie

Trim(0,64322) in the first script
Trim(64323,128645) in the second script
.......
Trim(321613,0) in the last

I tend split the video on scene changes. That way if the first or last frame of an encoded section looks a little different (a little less noise removal etc) it's not in the middle of a scene. Not that I think it's likely to, but just in case. Plus that's where the encoder would most likely put a keyframe anyway. MeGUI has an AVS Cutter under it's Tools menu which lets you add multiple trims to a script with a preview (then I make multiple copies of the script and delete all but one of the trims from each script in order to split the encoding job between them), or there's a standalone version (http://www.videohelp.com/tools/AVSCutter), or there's AvsPmod (http://www.videohelp.com/tools/AvsP).

GMJCZP
19th November 2014, 00:11
@ jriker1

In my experience it is safer not to put the Trim snugly, ie, put a gap of some frames, because if you use scripts like Stab() will give you problems.

Edit: the solution of Music Fan is the more solid for the audio.

Music Fan
19th November 2014, 00:30
In my experience it is safer not to put the Trim snugly, ie, put a gap of some frames, because if you use scripts like Stab() will give you problems.
Your sentence is confusing, I guess you mean it's better to put a gap of some frames (as I suggested).

GMJCZP
19th November 2014, 00:33
Your sentence is confusing, I guess you mean it's better to put a gap of some frames (as I suggested).

For example:

Trim(0,100)
Trim(90,210)
Trim(190,310)
Trim(290,0)

Overlap the frames.

Music Fan
19th November 2014, 00:43
Yes, I understood, but I guess you mean that it's a good solution and not a bad solution.

GMJCZP
19th November 2014, 00:45
Indeed, Stab() or other more complex function with motion estimation possibly malfunction if you put consecutive frames. Is more safe overlap the frames, it is annoying but "no pain, no gain".

jriker1
19th November 2014, 00:58
@ jriker1

In my experience it is safer not to put the Trim snugly, ie, put a gap of some frames, because if you use scripts like Stab() will give you problems.

Edit: the solution of Music Fan is the more solid for the audio.

That sounds challenging. So is the thought to open the files in an NLE and overlap them until they line up?

I extracted the audio with virtualdubmod from the original AVI. I think instead of running this thru again splicing them all together and re-encoding yet again, will just load each individual files into Adobe Premiere pro and line them up, add the separate audio into the timeline. Since I need to run NeatVideo on it probably makes more sense and eliminate the time for an extra encoding round to merge them all together even if lossless.

JR

GMJCZP
19th November 2014, 01:04
That sounds challenging. So is the thought to open the files in an NLE and overlap them until they line up?

I extracted the audio with virtualdubmod from the original AVI. I think instead of running this thru again splicing them all together and re-encoding yet again, will just load each individual files into Adobe Premiere pro and line them up, add the separate audio into the timeline. Since I need to run NeatVideo on it probably makes more sense and eliminate the time for an extra encoding round to merge them all together even if lossless.

JR

The only thing to worry is that using Trim the result is identical to a single process.
I guess in Adobe Premiere (I've never used) in the edit line (per frame) look for cuts for each video.
If you keep separate audio should have no problems.

hello_hello
19th November 2014, 02:16
Would it be normal for QTGMC to be slower when working with non-mod16 video than if it's mod16?

I've been re-encoding some old video which is mostly 720x576 and running QTGMC in progressive mode to clean it up a little.
QTGMC(InputType=1, Ezdenoise=1)

I noticed every so often one of the encodes would take much longer. A little investigating seems to indicate it's due to a mod4 width. If I resize to mod16 in the script before QTGMC the speed goes back to normal, but that's not ideal as I'm also resizing after QTGMC.

For the record, I found the culprit. It was mt_masktools-26.dll causing the speed problem. I ran a bunch of test encodes on a video with a mod4 width and a mod2 height. I ran all the encodes using mt_masktools-26.dll (dated 31/12/2010) from the "QTGMC 32-bit Plugins.zip" file and I repeated a couple of them with mt_masktools-26.dll from "QTGMC 32-bit Plugins [Vit-Mod].zip". I didn't repeat them all as it appears speed-wise those two versions of mt_masktools-26.dll are the same.
I also ran all the encodes with mt_masktools-26.dll (dated 09/03/2013) from here (http://forum.doom9.org/showpost.php?p=1619023&postcount=649), and also with masktools2.dll from here (https://github.com/tp7/masktools/releases) (x86 version).

These are the speed results (speed noted at the same point in the encode each time courtesy of MeGUI). I used the following in the script.

QTGMC(InputType=1, EzDenoise=1)

Avisynth 2.6.0.4:
mt_masktools-26.dll (dated 31/12/2010) - 3.88fps
mt_masktools-26.dll (dated 09/03/2013) - 6.00fps
masktools2.dll - 8.50fps

Avisynth+ 2.6.0.5:
mt_masktools-26.dll (dated 31/12/2010) - 3.97fps
mt_masktools-26.dll (dated 09/03/2013) - 6.09fps
masktools2.dll - 8.71fps

After resizing the video to mod16 (width and height) the speed difference narrowed quite a bit. Slowest was still the combination of Avisynth 2.6.0.4 and mt_masktools-26.dll (dated 31/12/2010) at 7.34fps. Fastest was Avisynth+ 2.6.0.5 and masktools2.dll at 8.90fps

hello_hello
19th November 2014, 02:35
For example:

Trim(0,100)
Trim(90,210)
Trim(190,310)
Trim(290,0)

Overlap the frames.

I'd be tempted to disagree with that. Surely it depends on the order things are placed in the script?

For instance if a video has 10,000 frames and you use the following in a script:

QTGMC()
Trim(500,9000)

Wouldn't the frames before number 500 and after 9000 still be used by QTGMC if required?

Or as another example, what if I add IVTC to a script like this, then follow it with trim:

tfm(order=-1).tdecimate()
Trim(500,9000)

Obviously the frame count and frame numbers after tdecimate are going to be dramatically different, but my argument would be Trim() is applied after the filter proceeding it. There's no need for overlapping frames to get tdecimate to work correctly, so I'm not sure why you'd need them for any other filter.
It'd be the same principle as navigating when playing video. If you don't stop on a keyframe the decoder might need to decode the frames around the one you requested in order to display it correctly, but that's what it'll do.

Well.... it's possible when it comes to a filter such as SRestore which sometimes works on a "pattern" of frames, it might pay to overlap them, but I've never seen the need for QTGMC. Someone may be able to correct me if I'm wrong but it seems fairly obvious to me when I add QTGMC to a script in MeGUI's script creator and hit the preview button the result is QTGMC doing it's thing correctly regardless of the frame I've been previewing at the time. I can navigate to any random frame in the video and see QTGMC is working as it should.

Anyway.... I've used QTGMC followed by Trim() lots and lots of times without overlapping frames, encoded with the x264 encoder and appended the encoded video without a lossless intermediate file in between and I've never noticed any ill-effects as a result. I always put the trim points on scene changes, but that's mainly because it's where the encoder would most likely place a keyframe anyway, and you're not forcing it to use one in the middle of a scene by splitting the video there.

Boulder
19th November 2014, 05:55
IIRC Avisynth is smart enough to provide frames outside of your Trim statement if they are requested by a filter. Hence there should be no need for any overlap when trimming.

fvisagie
19th November 2014, 07:45
For the record, I found the culprit. It was mt_masktools-26.dll causing the speed problem.

That's quite a significant difference. Thanks for looking into this, and esp. reporting on it.

poisondeathray
19th November 2014, 08:05
Hmmmm just some quick preliminary tests, but I'm getting different (quality) outputs with those different mt_masktools-26.dll 's (that you can see with naked eye , not microscopic ssim differences)

hello_hello
19th November 2014, 10:44
Hmmmm just some quick preliminary tests, but I'm getting different (quality) outputs with those different mt_masktools-26.dll 's (that you can see with naked eye , not microscopic ssim differences)

De-interlacing or running QTGMC in progressive mode as I was?
I didn't actually compare the output myself. I'll run some more test encodes and look at them this time.

I forgot to mention earlier.... I'm using QTGMC 3.33d (mod). It's the version from here (http://www.mediafire.com/?gpil7zkz24lq4). I probably should try a different version of QTGMC also, to make sure that doesn't change anything.

Edit 1: I tried a couple of my earlier encodes with QTGMC 3.32 and it didn't make any difference to the speed.

Edit 2: I ran a few more test encodes to compare the output. QTGMC 3.33d (mod) again. If there's any difference between the mt_masktools-26.dll versions I tested earlier and masktools2.dll in respect to quality, I'll confess I can't see it. I tried the three of them with QTGMC in progressive mode again QTGMC(InputType=1, EzDenoise=1) and also with an interlaced source QTGMC(). The output was lossless huffyuv/AVI. Both source videos were mod16.
I couldn't see any difference in the output and the file sizes were identical down to the byte. That's a bit of a relief really, :) but so far I can't replicate the quality differences you're seeing.

poisondeathray
19th November 2014, 15:25
Actually not QTGMC. It was just some quick tests since I got so excited by your % FPS gains (!!), but I noticed right away something was up. At first I thought it was something stupid like source filter issues, but it's not. I'll try to do some more systematic tests and on different computers to see if there is a real issue. Hopefully it was a false alarm

jriker1
19th November 2014, 16:01
Few items. Thank you for the suggestion to run multiple scripts. Brilliant. Ran thru with no issues so guess AviSynth MT is out for me even though it eliminates the need to manually create a bunch of scripts, however in the end this process works for me and enabling MT doesn't.

Second and third items. If I'm just doing:

QTGMC(preset="Very Slow")

Is there any denoising going on? I tend to do this part today in NeatVideo so hate to think I'm denoising twice.

And is there any changes going on from the original YUY2 colorspace during the encoding process?

Thanks.

JR

GMJCZP
20th November 2014, 00:23
I'd be tempted to disagree with that. Surely it depends on the order things are placed in the script?

For instance if a video has 10,000 frames and you use the following in a script:

QTGMC()
Trim(500,9000)

Wouldn't the frames before number 500 and after 9000 still be used by QTGMC if required?

I think you misunderstood my post, if you use two or four cores or how many are there must always be a first Trim(0, x) and a final Trim(y, 0). Furthermore Trim should go at the end of script. How will you divide a cake if it is not cooked?

Based on the advice of Boulder, I seems a good idea to use the number of Trim equal to the number of cores. I use VirtualDubMod to encode (lossless) and I usually put in "Process thread priority" "Lower", so if you are using four Trims will be four open instances of VirtualDubMod for each script and Trim associated. I do not say that if someone has eight cores to be used eight Trims, but maybe six is good.

Edit: so far I have processed with overlap of 200 frames, but a matter of personal preferences.

Edit 2: @Boulder: Stab(), at least, is not usable without gap in frames (bad luck only for me?). This function needs some frames to better estimate the stabilization, something like MDegrain and backward vectors or SCSelect (RemoveDirt).

hello_hello
20th November 2014, 01:32
I think you misunderstood my post, if you use two or four cores or how many are there must always be a first Trim(0, x) and a final Trim(y, 0). Furthermore Trim should go at the end of script. How will you divide a cake if it is not cooked?

There's lots of ways to add Trim() to a script, but in the context of this discussion where a single Trim() is being used to split an encode over multiple copies of a script, it makes sense to put it at the end.

I don't think I misunderstood your post. For example, when de-interlacing a 10,000 frame video with QTGMC while splitting the encode between two scripts, I'd put something like this at the end of the first one:
Trim(0,4999)
and this at the end of the second:
Trim(5000,0)

No overlap required.

Based on the advice of Boulder, I seems a good idea to use the number of Trim equal to the number of cores.

Possibly if you're processing with QTGMC and outputting lossless intermediate files, but I rarely do that myself. I process with QTGMC and encode directly with the x264 encoder, then append the encoded video when it's done. "Overlapping" wouldn't be practical. The x264 encoder tends to use a bit of CPU power, so I find QTGMC's standard settings + x264 keep a dual core pretty busy, and two simultaneous encodes will keep a quad core busy. It depends on the resolution and QTGMC/x264 settings though.
Currently I'm using QTGMC to de-interlace a PAL DVD with the default settings and a bit of noise removal, it's being resized to 640x480 and gradfun3() is also included. I've split the encode into two scripts with Trim() and I'm using the x264 slow preset. With both encodes running simultaneously, CPU usage (quad core) is sitting on around 85%.
I could possibly have split the script into three parts and run them together but it leaves me a bit of CPU headroom for other things and I'm not in a major hurry.

GMJCZP
20th November 2014, 01:50
I'll try to explain better. It is using a number of Trim so you get the same number of identical scripts, except the Trim cited going to the end of them. The scripts will run in parallel, simultaneously.

Now, if you previewing every piece of video and are equal or not usases Trim then no problem, encodes everything at once but considering that SetMTMode is risky.

poisondeathray
20th November 2014, 05:21
Actually not QTGMC. It was just some quick tests since I got so excited by your % FPS gains (!!), but I noticed right away something was up. At first I thought it was something stupid like source filter issues, but it's not. I'll try to do some more systematic tests and on different computers to see if there is a real issue. Hopefully it was a false alarm

I can't reproduce this difference now.... I can't figure out what caused it or what went wrong. Sorry for the false alarm

hello_hello
20th November 2014, 06:59
I'll try to explain better. It is using a number of Trim so you get the same number of identical scripts, except the Trim cited going to the end of them. The scripts will run in parallel, simultaneously.

I'm referring to making identical copies of the same script while adding trim to the end of each, with trim being added so each script encodes a different section of the video. Each script is then encoded at the same time.

If we're not talking about the same thing, then I guess I'm missing the obvious, but I don't agree it's necessary for the trims at the end of each script to "overlap".

fvisagie
20th November 2014, 10:54
I can't reproduce this difference now.... I can't figure out what caused it or what went wrong.

So, also from your testing,
masktools2.dll from here (https://github.com/tp7/masktools/releases)
seems good to go?

hello_hello
20th November 2014, 11:45
I'm using it now (masktools2.dll from here (https://github.com/tp7/masktools/releases)). No difference quality-wise compared to the various flavours of mt_masktools-26.dll.... at least when it came to my limited test encodes earlier.... but this PC has been running two encodes simultaneously with QTGMC and masktools2.dll for most of the day today without any issues so far.

poisondeathray
20th November 2014, 16:39
So, also from your testing,

seems good to go?


If I find a difference I'll report it. That newer dll had been posted a year and half ago, someone would have reported something already by now if something was wrong so I think it's ok

jriker1
20th November 2014, 18:21
Few items. Thank you for the suggestion to run multiple scripts. Brilliant. Ran thru with no issues so guess AviSynth MT is out for me even though it eliminates the need to manually create a bunch of scripts, however in the end this process works for me and enabling MT doesn't.

Second and third items. If I'm just doing:

QTGMC(preset="Very Slow")

Is there any denoising going on? I tend to do this part today in NeatVideo so hate to think I'm denoising twice.

And is there any changes going on from the original YUY2 colorspace during the encoding process?

Thanks.

JR

Hey folks, in addition to my above inquiries when you get a chance, has anyone written something already to automate creation of multiple avs files for "emulating" multi-threading? Doesn't seem to hard. Would imagine except for those looking for visual scene changes to trim on, it would be a matter of:


Create an AVS file to run the whole file singularly
Program asks for the file.
Program asks how many "threads" to run.
Program reads in number of frames on video say with MediaInfo
Program creates copies of original AVS file with -1, -2, -3 at the end based on how many threads were requested.
Appropriate trim statements added to each file.


Batch file is then created to launch all the VDub instances could be added but gets more complicated with Codec selection and stuff. Could just launch each VDub and the AVS file and then the user has to pick the rest and Save AVI. Curious if this exists as I could use something like this with the quantity of videos I will need this for so will write it if it's not here. GUI or command line. Not sure yet.

JR

Groucho2004
20th November 2014, 18:33
Batch file is then created to launch all the VDub instances could be added but gets more complicated with Codec selection and stuff. Could just launch each VDub and the AVS file and then the user has to pick the rest and Save AVI.
Why do you need VDub? What is your target format?

hello_hello
20th November 2014, 20:38
Batch file is then created to launch all the VDub instances could be added but gets more complicated with Codec selection and stuff. Could just launch each VDub and the AVS file and then the user has to pick the rest and Save AVI. Curious if this exists as I could use something like this with the quantity of videos I will need this for so will write it if it's not here. GUI or command line. Not sure yet.

If you've got a quantity of videos to encode, why the need to split scripts? Unless I'm missing something, the idea behind splitting encodes with trim() is to run multiple encodes simultaneously to keep the CPU busy, but that's only necessary when you're only encoding a single video. If you've got multiple videos to encode, why not just run two or more at a time?

I'm not sure why you're using VirtualDub either, but don't forget VirtualDub lets you queue jobs. I don't use it a lot but I think multiple instances of VirtualDub share the same job queue (I could be wrong) so if I'm using VD and I want to run more than one encode at a time I add a bunch of jobs to the VirtualDub job queue, then I do the same thing using VirtualDubMod, then I run them both at the same time.

Mostly, because I encode without a lossless intermediate file, I use MeGUI to queue multiple encoding jobs. MeGUI lets you choose the number of "workers", which effectively means you can choose how many encodes it'll run simultaneously until all the jobs are completed.

To answer one of your earlier questions, yes QTGMC naturally denoises a little as part of the de-interlacing process. Unless a video is particularly noisy that's probably enough, but you can always try increasing it's denoising by enabling the EzDenoise function, and/or fiddling with other settings that effect the stabalisation/removal of noise. I don't know how it's denoising compares to NeatVideo (I've never used it) but it'd probably be an idea to avoid two lots of denoising if possible.

StainlessS
20th November 2014, 21:13
@jriker1,

This will create MultiPart avs files:

# MultiPart.avs

PARTS=4
#######
Assert(PARTS>1,RT_String("MultiPart.avs: PARTS MUST be greater than 1 (%d)",PARTS))
FSEL_TITLE="Select AVS files"
FSEL_DIR="."
FSEL_FILT="AVS files|*.AVS"
FSEL_MULTI=True
FILE_LIST = RT_FSelOpen(title=FSEL_TITLE,dir=FSEL_DIR,filt=FSEL_FILT,multi=FSEL_MULTI)
Assert(FILE_LIST.IsString,"MultiPart.avs: RT_FSelOpen Error="+String(FILE_LIST))
SCRIPT_TMPT = """
PART = %d
PARTS = %d
Import("%s")
FC = FrameCount
Start = ((part==0 ) ? -1 : part * (FC-1) / PARTS) + 1
End = ((part==PARTS-1) ? FC-1 : (part+1) * (FC-1) / PARTS)
End = (End == Start) ? -1 : End
Trim(Start,End)
# Subtitle("Trim("+String(Start)+","+String(End)+")")
Return Last
"""
GSCript("""
NLINES = RT_TxtQueryLines(FILE_LIST)
for(i=0,NLINES-1) {
PARTSNAME = RT_TxtGetLine(FILE_LIST,i)
for(part=0,PARTS-1) {
PartName = RT_String("%s_PART_%d.avs",PARTSNAME,part+1)
RT_WriteFile(PartName,RT_String(SCRIPT_TMPT,part,PARTS,PARTSNAME))
}
}
""")
MessageClip(RT_String("ALL DONE, Processed %d avs files of %d parts each",NLINES,PARTS))

REMOVED RT_subtitle("%d %d",Start,End) line

Test input avs file

VideoFilename = "D:\avs\test.avi"
VideoFilename = RT_GetFullPathName(VideoFilename)
Avisource(VideoFilename)
Return Last


Result 1 of 4: Test.avs_PART_1.avs


PART = 0
PARTS = 4
Import("D:\MultiPart\Test.avs")
FC = FrameCount
Start = ((part==0 ) ? -1 : part * (FC-1) / PARTS) + 1
End = ((part==PARTS-1) ? FC-1 : (part+1) * (FC-1) / PARTS)
End = (End == Start) ? -1 : End
Trim(Start,End)
Return Last


Result 4 of 4: Test.avs_PART_4.avs


PART = 3
PARTS = 4
Import("D:\MultiPart\Test.avs")
FC = FrameCount
Start = ((part==0 ) ? -1 : part * (FC-1) / PARTS) + 1
End = ((part==PARTS-1) ? FC-1 : (part+1) * (FC-1) / PARTS)
End = (End == Start) ? -1 : End
Trim(Start,End)
Return Last


Puts up a FileSelector to select a group of input files.
Will not work with Avisynth+ or AvsPMod as they both have problems with FileSelector.
(EDIT: I think Avisynth+ has problems, someone say if it does not)

EDIT: You can just select to play in some media player rather than eg AvsPMod and file selector should be OK.

jriker1
21st November 2014, 00:24
why do you need vdub? What is your target format?

mp4 (h.264)

What should I be using other than VDub? Second one to ask this and I thought that's how people executed their AVISynth scripts. Note h.264 isn't fully accurate. Within AVISynth part of the process I use Lagarith YV12 or YUY2 depending on the source.

jr

jriker1
21st November 2014, 00:26
If you've got a quantity of videos to encode, why the need to split scripts? Unless I'm missing something, the idea behind splitting encodes with trim() is to run multiple encodes simultaneously to keep the CPU busy, but that's only necessary when you're only encoding a single video. If you've got multiple videos to encode, why not just run two or more at a time?

I'm not sure why you're using VirtualDub either, but don't forget VirtualDub lets you queue jobs. I don't use it a lot but I think multiple instances of VirtualDub share the same job queue (I could be wrong) so if I'm using VD and I want to run more than one encode at a time I add a bunch of jobs to the VirtualDub job queue, then I do the same thing using VirtualDubMod, then I run them both at the same time.


I am splitting them because even though I have a lot of videos to convert, I'm only doing them one at a time so things don't get complicated.

JR

hello_hello
21st November 2014, 00:55
Splitting them sounds more complicated to me than simply encoding two or three at a time, but each to their own. In fact I'm not sure how encoding more than one whole video at a time could be complicated, but each to their own. ;)

I've almost finished encoding a series of a TV show. Twenty three episodes. Twenty three scripts created and loaded into MeGUI's job queue where they're being run two at a time. In a few hours I'll have 23 output files to mux, and there'll be no need to join encodes or worry if all the video was split correctly etc. It seems less complicated to me. :)

StainlessS
21st November 2014, 01:02
Hello, Hello_Hello,

I used to (but not so much recently) manually create split avs files, I'm quite glad I was prompted to write the previous little script, saves
doing it the hard way. (EDIT: render to Lossless AVI using VDub, mainly if doing 2 pass rather than ConstantQuality in MeGUI).
Also, Avisynthesizer_MOD (See MediaFire in sig) can concatenate multiple files (select input avi's and it will ouput avs),
and feed that straight into MeGUI.

EDIT: There are also other reasons you might want to render to lossless, when you have eg a job that requires lots of processing and you
are currently happy with what you have but needs further processing, render to lossless before next processing stage.
A couple of years ago, I had a difficult repair clip that I did (I think) in 12 stages, and could recover individual frames from any
of the previous stages using ClipClop. Involved 2,500+ individual frame edits.

jriker1
21st November 2014, 01:33
Wow. Learn something new everyday. Didn't know AVISynth had a scripting language of that level behind it. Is there something you have to add for it to work? I am getting Function not found GSCript.

Note: Found GScript 1.1 and put that in plugin folder. Now getting RT_String no found.

JR

StainlessS
21st November 2014, 01:39
Sorry, should have posted the requirements.

Here you go: http://forum.doom9.org/showthread.php?t=165479&highlight=RT_Stats

Didn't know AVISynth had a scripting language of that level behind it
Yes, GScript is quite wonderful, my favorite little play thing. :) Thanx Gavino !

hello_hello
21st November 2014, 02:16
Hello, Hello_Hello,

I used to (but not so much recently) manually create split avs files, I'm quite glad I was prompted to write the previous little script, saves
doing it the hard way. (EDIT: render to Lossless AVI using VDub, mainly if doing 2 pass rather than ConstantQuality in MeGUI).

Howdy.
I'm not denying there's reasons why sometimes outputting to a lossless AVI might be a good idea. I've done so many times. Mainly to get QTGMC out of the way before experimenting with other filtering.
I'm not saying splitting an encode is a bad idea either, I've done it lots of times myself.

I'm just saying unless there's a need for it, outputting to a lossless file might be an unnecessary step, and when splitting a single encode with Trim(), I think overlapping the trim points is unnecessary most of the time. When it comes to using QTGMC, I don't think there's any benefit, so if the output is lossless AVI simply so the split video can have overlapping frames, it's probably a waste of time.

And lastly if I had ten videos to encode and wanted to run two encodes simultaneously, I wouldn't split each encode in half and run each half simultaneously, because running the whole ten encodes two at a time would be just as quick and wouldn't require any extra work splitting and joining.

That's all..... :)

StainlessS
21st November 2014, 02:46
Mainly to get QTGMC out of the way before experimenting with other filtering.

Exactly, when you want to move on when you are quite happy with what you have.

overlapping the trim points is unnecessary most of the time

I would say ALL of the time (so long as the Trim is at the End Of Script).

A lot of us are not on any kind of production line, we sometimes just concentrate on an individual clip at a time.

jriker1
21st November 2014, 03:25
Sorry, should have posted the requirements.

Here you go: http://forum.doom9.org/showthread.php?t=165479&highlight=RT_Stats


Yes, GScript is quite wonderful, my favorite little play thing. :) Thanx Gavino !

OK got GSCript.dll, RT_Stats.dll. Also had to get twriteavi.dll. Now getting Couldn't Open a compressor with FourCC code ULY0 GSCript 7 and 12.

First read I thought you were generating the AVS file to run but I see this is actually generating the files.

o=TWriteAVI(c,FN,True,True,FourCC="ULY0")

What codec is this expecting? UT Codec? Changed it to LAVS and started running however not sure how I would tell it in this case to use YV12 or YUY2 for the color space or maybe it's just taking the source file and cutting pieces into folders. Seems that way with the speed.

EDIT: Tried just the code above with the multipart and test avs files. Test was set to:

VideoFilename = "D:\Conversion\2 - Working\CH\CHt.avi"
VideoFilename = RT_GetFullPathName(VideoFilename)
Avisource(VideoFilename)
Return Last

Launched multipart.avs. Selected test.avs containing above. I get: RT_String: Expecting data arg(4) line 7,8,9 at multipart.avs line 33.

JR

StainlessS
21st November 2014, 03:48
I'm sorry, can you clarify, why did you download TWriteAVI, nothing to do with this.
You have clearly been reading other threads, can you collect yourself without other threads stuff and report back please.

jriker1
21st November 2014, 04:41
I'm sorry, can you clarify, why did you download TWriteAVI, nothing to do with this.
You have clearly been reading other threads, can you collect yourself without other threads stuff and report back please.

Error message at the end is still relevant as it was strictly using what you posted here. It was very odd. I did a refresh of the browser and suddenly doom9 was on a different thread that you posted a zip file at so for a while was looking at that code.

JR

StainlessS
21st November 2014, 05:02
We will try again tomorrow, had a few beers, gonna get some sleep. I am going to the feathers, good nite.

foxyshadis
21st November 2014, 12:32
Error message at the end is still relevant as it was strictly using what you posted here. It was very odd. I did a refresh of the browser and suddenly doom9 was on a different thread that you posted a zip file at so for a while was looking at that code.

JR

TWriteAVI is basically a substitute for virtualdub; it writes an avi out via script no matter how you access it. ULV0 is UT Video. Neither of them has anything to do with anything in this thread or QTGMC; if you delete that line from your script I think you'll be on the same page as everyone else.

StainlessS
21st November 2014, 14:44
jriker1,

Sorry, I inserted the

# RT_subtitle("%d %d",Start,End)

line without testing (directly into D9 post), the RT_String() is seeing both of the %d sequences in the script template and is expecting
additional data arguments.

mea culpa (Have removed that line from post).

EDIT: Have put back a subtitle line that will not cause problems, re-copy the script I've made a couple of additional cosmetic changes.
Uncomment the line to show trim.

fvisagie
21st November 2014, 14:50
I don't use it a lot but I think multiple instances of VirtualDub share the same job queue (I could be wrong)

Perhaps you're getting confused with Help -> Batch operation -> Distributed mode?

In any case, each VirtualDub instance can be run with its own job queue script:
* Either set up VirtualDub for the job and File.Save processing settings, or
* create the script file externally, possibly from a template,
* then call VirtualDub with the script on the command line (Help -> Advanced operation -> Command-line operation)

hello_hello
21st November 2014, 16:50
Perhaps you're getting confused with Help -> Batch operation -> Distributed mode?

I was referring to "File/Queue Batch Operation/Save As AVI". If you add a job to the queue and open a second instance of VirtualDub, it'll have the same job already in the queue.
There's no doubt ways around it. Maybe saving job lists, or copying the whole VirtualDub directory to a second location and running two instances of VirtualDub that way. I've never really experimented.....

There's probably a whole variety of ways to batch encode with VirtualDub I don't know about or fully understand. I don't use it much.

Dogway
10th January 2015, 11:58
For a recent DV "remaster" I'm using the next line, I'm really digging it as a more sophisticated "lossless" approach.

QTGMC(tr2=1,preset="very slow",SVThin=0.5,GrainRestore=1.0,Sigma=4.0,NoisePreset="slower",Sharpness=0.7,tuning="DV-SD",border=true)

I observed that using this instead of the lossless workaround with sourcematch brings up surprising details that I want to include in the "remaster". The overall sharpness boost is also appreciated though I wanted to note that it creates some serious ringing. Decreasing the sharpness value fades the ringing strength but not its thickness which stands out more.

My last finding in terms of detail retention was using grain restore. It brings up even more details and starts to feel like an unprocessed progressive source. I wanted to know about NoiseDent=Generate, does this means the restored noise is artificial? I also observed that there's probably more noise than in the source, is the noise sharpened by any setting? And there's something also I really would like to deal with, I know GrainRestore retains the more stable grain though it shows the same effect in NoiseRestore as well, this effect of noise/grain being stuck to the screen, a grain curtain effect that is very distracting. Firstly I was using NoiseRestore but on flat surfaces especially dark ones I observed it creates some grain lumps. I'm curious to know whether it's possible to generate or restore dynamic grain. I checked the script and I saw you use constant=false for addgrainc, but didn't go any further.

Dogway
15th January 2015, 12:25
Here is an extract of the main issue. You can observe how the grain is somewhat static, thus it doesn't blend nice with the background as much as it should and becomes very noticeable, specially when the camera pans, you get this grain curtain that follows.

Apart from the fountain, you can see it on the white house in the back, the red house in right, and the road in front. It's not "in-your-face" but it certainly distracts.

11Mb Mediafire sample (http://www.mediafire.com/watch/qutlirimn2k67id/DVTape02-New_(1)-002.mkv)

Fantasy
24th January 2015, 20:30
Hello,
I have a problem.
I using QTGMC to deinterlacing.
If I play my source with MPC-HC or VLC-Player, I got 16:9 and 853x480.
But after using QTGMC I got 720x480 and it is no more 16:9.
How can I deinterlacing my source and have 16:9 and 853x480 after that?
Thank you!

LigH
24th January 2015, 20:38
I guess your source media file contained a flag which told the player to deskew the video by a specific factor or to a specific target aspect ratio.

AviSynth output does not have such a flag; you will have to encode it to a target format which will then contain a new aspect ratio flag with the same amount as your source file contained.

SubJunk
24th January 2015, 20:42
To expand on LigH's answer, if you're not sure which tool to use, try using MKVMerge (part of MKVToolnix) to set the aspect ratio flag to 16:9 or 1.78

hello_hello
27th January 2015, 02:27
To expand on SubJunk's expanded answer, it has nothing to do with QTGMC as such.

You'd preferably specify either --sar 40:33 or --sar 32/27 in the x264 command line, depending on which pixel aspect ratio (sample aspect ratio) religion you follow (https://www.doom9.org/showthread.php?p=1058927#post1058927), or as SubJunk suggested, try setting it later with MKVMergeGUI.

LigH
27th January 2015, 08:35
Well, Fantasy never reported to encode to H.264, or to multiplex to MKV... they may be the most usual formats today, but there are many other possible targets. ;)

MP84
27th January 2015, 17:56
QTGMC and shimmer

Hello everyone. I have been trying to make the switch to QTGMC from Yadif as my deinterlacer of choice, but quickly ran into a problem.

Sample video segment:
https://drive.google.com/file/d/0B_W3aG6rmBUnekRaR1FjN1g0a28/view?usp=sharing
(mpeg2, 17 seconds, 11 MB, on google drive)

The sample is some footage from a photo session in a studio, with strobe lights going off in the background. You will also notice there is a caption near the bottom of the screen, with some text on it.

Animated GIF, qtgmc -> http://i.minus.com/ibnZwwf0801JrC.gif

The caption is overlaid on top of the image, and never changes from frame to frame. Should be easy to process without any artifacts, right? Hovewer, with QTGMC, I get nasty shimmer inside the caption with each strobe flash. It severely distorts the text.

I do not understand why it is happening. Yes, very rapidly changing images are difficult for a deinterlacer. But the flash occurs in the upper part of the picture, far away from the caption. Why is it affected? Why does QTGMC think it even should try and do something drastic to the part where the caption is located?

I have experimented with a couple dozen different qtgmc() settings, and the shimmer gets slightly better or worse, but it is always there. Basic yadif() does a better job with the segment.

Animated GIF, yadif -> http://i.minus.com/ib0x0au0ya81cN.gif

Any advice?

Boulder
27th January 2015, 19:54
Without looking at the samples, could it be a scene change detection issue? Quick flashes are very difficult in that regard.

creaothceann
28th January 2015, 00:26
nasty shimmer inside the caption

Actually it affects the whole screen. You could manually replace these sections like this:

AVISource(...)
y = Yadif(...)
q = QTGMC(...)

q
Replace( 500, 543, y)
Replace( 2234, 2334, y)
Replace(34532, 34582, y)




function Replace(clip c, int i, int j, clip d) {
Assert(i >= 0, "Replace: parameter i is negative")
Assert(j >= 0, "Replace: parameter j is negative")
p1 = c.Trim(0 , -i)
p2 = d.Trim(i , j)
p3 = c.Trim(j + 1, 0)
p1 = (i == 0) ? c.Trim(0, -1).DeleteFrame(0) : p1
p3 = (j == 0) ? c.Trim(0, -1).DeleteFrame(0) : p3
p1 + p2 + p3
return (c.HasAudio) ? last.AudioDub(c) : last
}

kuchikirukia
4th February 2015, 02:58
Could someone package their working multithreaded plugins for me? I've gone through so many versions of mvtools, masktools, removegrain/repair vs rgtools, and nnedi3, but everything ends up crashing with Visual C++ runtime errors.

(interesting note: The the version of nnedi3 on its wiki (http://bengal.missouri.edu/~kes25c/nnedi3.zip) errors out with "arg0 must be a clip" while the one in the QTGMC wiki package (http://www.spirton.com/uploads/QTGMC/QTGMC%2032-bit%20Plugins%20%5BVit-Mod%5D.zip) works. Both say the same 0.9.4.0, but they're different file sizes. [links go straight to the downloads, not the wiki pages])

Reel.Deel
4th February 2015, 03:09
Could someone package their working multithreaded plugins for me? I've gone through so many versions of mvtools, masktools, removegrain/repair vs rgtools, and nnedi3, but everything ends up crashing with Visual C++ runtime errors.

(interesting note: The the version of nnedi3 on its wiki (http://bengal.missouri.edu/~kes25c/nnedi3.zip) errors out with "arg0 must be a clip" while the one in the QTGMC wiki package (http://www.spirton.com/uploads/QTGMC/QTGMC%2032-bit%20Plugins%20%5BVit-Mod%5D.zip) works. Both say the same 0.9.4.0, but they're different file sizes. [links go straight to the downloads, not the wiki pages])

What version of AviSynth are you using? If you have missing runtimes then a easy fix is just to download the requirements that you need. Also the nnedi3 link on the wiki is the official version by tritical.

Edit: the reason for the size different is because it was compiled with VS2010 and that package also included "Vit's threading fixes (http://forum.doom9.org/showpost.php?p=1503034&postcount=691)". It's also important to note that most (except eedi3, sse2tools, yadif) of all of those plugins included in that package are statically built so they do not require any runtime dependencies. For eedi3 take a look at the wiki for the updated version (http://avisynth.nl/index.php/Eedi3) and necessary dependency, you don't need sse2tools unless you want to process YUY2, and you also don't need yadif unless you specifically choose it, or use preset="Ultra Fast".

kuchikirukia
4th February 2015, 03:37
What version of AviSynth are you using? If you have missing runtimes then a easy fix is just to download the requirements that you need. Also the nnedi3 link on the wiki is the official version by tritical.

Pretty sure I have all the runtimes. I've gotten 6, 8 hours in before it crashes.

http://s11.postimg.org/p6qu4e14z/Untitled.png


2.6 alpha 5 MT. (Though I switch out between that and Avisynth+ depending)


Edit: the reason for the size different is because it was compiled with VS2010 and that package also included "Vit's threading fixes (http://forum.doom9.org/showpost.php?p=1503034&postcount=691)"

But the question is why it doesn't play with QTGMC. It errors out on script start, and I'm not the only one this has ever happened to.
http://forum.doom9.org/showthread.php?p=1628279#post1628279

Reel.Deel
4th February 2015, 03:47
Pretty sure I have all the runtimes. I've gotten 6, 8 hours in before it crashes.

2.6 alpha 5 MT. (Though I switch out between that and Avisynth+ depending)

But the question is why it doesn't play with QTGMC. It errors out on script start, and I'm not the only one this has ever happened to.
http://forum.doom9.org/showthread.php?p=1628279#post1628279

The link you provided is when the API change from AviSynth 2.6 Alpha 3 to Alpha 4 (not runtime dependencies). That change broke all the 2.6 plugins, most have been officially updated but not MaskTools2 (even the 2.6 masktools included in Vit's packages). I suggest you use the updated MaskTools: https://github.com/tp7/masktools/releases

Read my post here (http://forum.doom9.org/showpost.php?p=1699950&postcount=1857) for more information. I hope that helps.

kuchikirukia
4th February 2015, 04:50
Spoke too soon.

http://s29.postimg.org/ku3a17xfb/Untitled.png

Boulder
4th February 2015, 04:56
It has been stated quite a few times in this thread that it is very hard to make QTGMC run multithreaded and not crash at some point. If you want to minimize the probability of a crash: split the encode into multiple parts which you encode in simultaneously (single thread mode) into some lossless format and combine the parts for the final encode.

kuchikirukia
4th February 2015, 05:52
Well, with mvtools2 2.6.0.5's threaded avstp.dll, QTGMC can hit ~43% of my Phenom II X4 in single-threaded avisynth, so it's not too bad sticking with that. With x264 preset slower running across 3 threads I'm pretty well utilized.

http://s7.postimg.org/kt7hrkdy3/Untitled.png

Avisynth+ 2.6.0.5 r1576 faster than 2.6 alpha 5 MT, in case anyone was wondering. Seems to achieve max speed at Setmemorymax(900) when using preset="Slower". edithreads=2 a hair faster than 1, and starts to be a penalty at 3.

Oh, and how big a problem is this:

# v3.33
# - Bug fix for the fact that Bob always outputs a BFF clip regardless of field order of input (thanks ajp_anton)

Do... do I need to redo all the TFF videos I did under 3.32?

Stormborec
12th February 2015, 21:20
Am I right, that this setting is most close to the source, if I don't care about residual combing and sharpness? (I'll sharpen it later)

mpeg2source("1.d2v")
QTGMC(Preset="very slow",Lossless=1,smode=0,tr2=0)

Boulder
12th February 2015, 21:46
-Vit- once suggested me to try something this way: QTGMC("very slow", dct=5, tr2=0, SourceMatch=2, Lossless=2, EZKeepGrain=0.4, Sharpness=0.1, blocksize=8). You could leave the dct and blocksize parameters out if you need the speed increase.

Stormborec
13th February 2015, 18:38
Yes, it's OK. The ideal would be to copy non moving areas and just decent deinterlace moving areas. Because in the fast moving image the combing is less visible.

Dogway
13th February 2015, 19:39
I posted all the details here (http://forum.doom9.org/showthread.php?p=1705317#post1705317) for remaster purposes.
I found that the lossless parameter could be less than ideal generally. It leaves stranded combing, or artifacts resembling those, also it's a bit soft. I think the internal QTGMC sharpener is very good, as it's made to work with all the internal processes allowing for temporal limiting, etc I recommend using it.

QTGMC(tr2=0,preset="very slow",SVThin=0.5,GrainRestore=0.9,sigma=3.0,NoisePreset="slower",Sharpness=0.7,border=true)
I ended up using this line for having nice deinterlacing while still keeping the original definition or texture/detail. One possible problem is it strengthens ringing, and recovered grain can look a bit artificial at times. It would be good if -Vit- could look into that. You can compare both approaches with lossless=2 and mine above, although using lossless is slower.

Stormborec
13th February 2015, 21:57
Comparisson:
(ofcourse it's better to open every of them in mspaint/virtualdub - one over the other - and compare - click,click by mouse ...)

http://www.imghosting.cz/images/5900.png (http://www.imghosting.cz/view-5900.png)

http://www.imghosting.cz/images/9210.png (http://www.imghosting.cz/view-9210.png)

http://www.imghosting.cz/images/7220.png (http://www.imghosting.cz/view-7220.png)

http://www.imghosting.cz/images/3530.png (http://www.imghosting.cz/view-3530.png)

Now I see - it's shiffted ... so at least the ČT24 should be same ...

Stormborec
13th February 2015, 22:06
Btw. what type of sharpening is used? It will be something with removegrain, but - is it nonlinear? Because the text shouldn't be much sharpened, rather details in flat areas ...

Dogway
14th February 2015, 10:13
I see this is a very static grain free source, so that changes it all. Maybe you would prefer to set lower grain restore values or remove it completely.
Use higher temporal radius, maybe tr2=1 could be a nice idea to remove some mosquito noise.
Also the internal used sharpening method is temporal limited, so you will see more differences on motion (much blurrier in the lossless method), although you can already see some detail gain on the hair, dress pattern and monitors on the desk. You can try to set the limiting to spatial SLMode=3.

If you want upload a chunk so I can play and test.

Stormborec
14th February 2015, 12:01
Let's play ...
http://uloz.to/x5F8hLQT/zpravy-3-10-2013-mpg
http://uloz.to/xfiXkzNX/zpravy-7-11-2013-mpg

I use dgmpgdec and then mpeg2source("1.d2v") ...

My idea is: no need of change of QTGMC parameters according the scene change.

Input vs. output:
No change in static areas, no sharpening, no grain adding nor no noise removing ... But perhaps, if the sharpening would work very well, then it is perhaps better, than adding e.g. seesaw after deinterlacing.

Also I have no idea, how much is "rounding steps" in the QTGMC proccess - if it does something like: nnedi => rounding to intiger => sharpen => rounding to intiger => TR2 => rounding to intiger ... then could be better to do as a few steps as possible

Dogway
14th February 2015, 14:50
QTGMC doesn't add grain, it only recovers, but sometimes you underestimate the amount of grain/noise in source and would prefer some slight safe denoising. For a theoretical approach you would recover all grain/noise and turn off sharpening, but my opinion is there are better options. So it comes down to a balance between grain/noise restore and denoising strength, for either lossless or standard deinterlacing.

Here are comparisons using similar settings for lossless and standard:

In the left the best lossless I could get, and standard QTGMC on the right
http://i.imgur.com/7wCMdTRt.png (http://i.imgur.com/7wCMdTR.png) http://i.imgur.com/xbIe3ADt.png (http://i.imgur.com/xbIe3AD.png)

Lossless is good for tiny detail patterns like the teeth and collar in the image, things like grass, etc. For everything else I find standard a bit better, it retains textures, check neck, forehead, and dark section with monitors. So the lossless mode has a bit more definition on very small details, but muddy on everything else (normally what a dumb sharpener does), while standard has a better balance of overall sharpening, it gives that unprocessed "source feeling" in my opinion. It's true that lossless retains better text definition, but this is a very specific situation, if all your source was like this; on-screen text, detailed patterns, no grain or lack of texture maybe you could go with lossless, but for a general approach I think standard is better.

Here is another example with motion scenes using same settings. Standard brings more temporal and spatial cohesion so kinda acting like motion blur while lossless tries to retain original blocking/artifacts that are no relevant to visual information.

http://i.imgur.com/6LnlJ9Dt.png (http://i.imgur.com/6LnlJ9D.png) http://i.imgur.com/4IgkLWst.png (http://i.imgur.com/4IgkLWs.png)

Stormborec
14th February 2015, 16:40
Uf, it's tricky ...

mpeg2source("1.d2v")
crop(0,0,-464,-448)
x=last.trim(115,115).sharpen(1)
a=QTGMC("very slow",tr2=0).trim(230,230).sharpen(1)
b=QTGMC("very slow",sourcematch=2,Lossless=2,smode=0,tr2=0).trim(230,230).sharpen(1)


interleave(x,a,b,x)

pointresize(width*4,height*4)

Stormborec
14th February 2015, 20:18
I was reading the forum, and I found this two posts from -Vit-, concerning my question:

http://forum.doom9.org/showpost.php?p=1582936&postcount=1280

http://forum.doom9.org/showpost.php?p=1580001&postcount=1264

Maybe it's the solution ...

Dogway
14th February 2015, 22:46
yeah... what I said, for theoretical source reproduction you restore all grain and do no sharpness, while on lossless mode. But the point is... what for? If you want a master you already got the master, make a backup of it, it's already compressed. There is little point on having a deinterlaced lossless copy of your master since it takes loads of disk space.

If you want to do a remaster, you are supposed to enhance visuals in the safest form possible, like not being too artsy or subject to interpretation. I think standard mode with grain restore is a good candidate for remaster purposes in most cases... but that's me. I like to hear opinions.

Stormborec
14th February 2015, 23:09
I found still one possibility here:

tdeint(mode=1,edeint=nnedi3(field=-2))

but it's a bit exterme ...

If "lossless" - then would be hard to find something better than:

qtgmc(sourcematch=2,lossless=2,smode=0) ...

yup
5th March 2015, 09:02
Hi all!
I try QTGMC with YV16 source, script simple
AVISource("samplevhs.avi")# YUV 422 source
AssumeTFF()
ConvertToYV16(interlaced=true)
QTGMC()

At bottom half I see green or pink background or pink and green dig.
Not all frame, not regular, but frequently.
I use last Set avisynth build and plugin from
http://forum.doom9.org/showthread.php?p=1699950#post1699950
Please advice.
yup.

Reel.Deel
5th March 2015, 15:33
QTGMC and MVTools still uses the old and ugly planar YUY2 hack from the SSE*Tools plugin. So if you want to process YUY2 you need to use the older plugins like MaskTools2 for AviSynth 2.5, RemoveGrain, Repair, VerticalCleaner (if needed) and you will also need the SSE*Tools plugin. I really wish cretindesalpes would add native support for YV16 in MVTools. According to jackoneill the code already supports YV16 (https://github.com/dubhater/vapoursynth-mvtools/commit/7261a61ca1fb95ee30d0235cafc6ef045f51170a) it just needs to be used. It would make processing YUY2/YV16 way easier and less convoluted.

TheSkiller
13th March 2015, 18:17
While comparing between YUY2 and normal YV12 processing I found that the luma plane is in fact not identical but very slightly different between the two. Is this normal? I don't see why the luma processing would differ if I'm running QTGMC in YUY2 mode.

I also found that in YUY2 mode there sometimes seem to be problems with residual chroma combs if the video dimensions are not mod16 (no, it's not a cropping mistake).


I think we really need proper YV16 support for QTGMC. :p

feisty2
14th March 2015, 10:39
I found that the luma plane is in fact not identical but very slightly different between the two. Is this normal?

yup, normal, cuz motion estimation refers to all planes by default (chroma=true), set chroma=false in msuper and manalyze, the results will be identical.

LouieChuckyMerry
15th March 2015, 11:19
Hello. As I was reading this thread from the beginning, in preparation to attack my early-seasons NTSC Simpsons discs (thinking I could deinterlace and denoise in a single step, given the limited quality of the sources), I came upon several comments to the effect that QTGMC wasn't necessarily the best option for animated sources (these comments are quite early in the thread). Please, is this still the case? I ask because the results of QTGMC with default settings on a couple of test clips was vastly superior to any of MeGUI's 3 default options (after analyzing the clips), TIVTC, TIVTC + TDeint(EDI), and Decomb IVTC (plus I'd really appreciate not having to read another seventy-some pages of this thread if it's not necessary ;-). Thanks in advance for any help.

LigH
15th March 2015, 11:51
Because the reason won't change, the result won't change either: QTGMC is a deinterlacer which relies on the assumption that there are fields recorded in equal temporal distances, so from field to field, the time when it was shot progresses regularly, more or less linearly.

Real cartoons don't have the same progress for every frame, because their low frame rate (probably about 8 fps) causes repeated content over several frames, then suddenly the content changes from one field to another. This is no "regular motion", therefore a deinterlacer would calculate wrong interpolations, assuming that the previous and following fields continue with about the same amount of motion.

Similar case for Telecine: There is no regular progress through the fields either, instead, there has been a progressive content before, which can be restored almost losslessly; deinterlacing with interpolation would already be worse due to the interpolation, and on top even more worse because there is no (more or less) "linear" progress in motion following the field order.

But cartoons are certainly the harder case, because their progress pattern is harder to detect due to the many duplicates, and when there is a "hybrid animation" (with computer generated or at least computer assisted cartoons), the optimal technique to recover progressive frames would even change scene-wise... Deinterlacers are simply not meant to handle that. Neither of them. Not even QTGMC.

creaothceann
15th March 2015, 17:57
To summarize:


source: interlaced 30/1.001 fps VIDEO (e.g. TV recordings, most DVD content)
deinterlacer (http://avisynth.nl/index.php/External_filters#Deinterlacing) (e.g. QTGMC) → progressive 30/1.001 fps VIDEO
IVTC (http://avisynth.nl/index.php/External_filters#IVTC_.26_Decimation) (inverse telecine/pulldown (http://en.wikipedia.org/wiki/Telecine#2:3_pulldown)) → progressive 24/1.001 fps FILM (movies, anime), tricky in case of irregular patterns or interlaced content (e.g. credits)

TheSkiller
15th March 2015, 18:16
deinterlacer (http://avisynth.nl/index.php/External_filters#Deinterlacing) (e.g. QTGMC) → progressive 30/1.001 fps VIDEO
No, you get progressive 60000/1001 (59.94) fps video after QTGMC, unless you throw away half of the video (every other frame) using FPSDivisor=2.

LigH
15th March 2015, 18:22
But IVTC can only revert Telecine if your material was processed with 3:2 pulldown at all. You will always have to test if either IVTC or Deinterlace would work. Never assume, always test, by watching the content field-wise and slowly.

Boulder
15th March 2015, 18:27
And the next round to make things even more complicated: material that looks like it's interlaced but it's actually fieldblended :)

LouieChuckyMerry
16th March 2015, 03:11
Thank you all for your informative replies :) .

To summarize:


source: interlaced 30/1.001 fps VIDEO (e.g. TV recordings, most DVD content)
deinterlacer (http://avisynth.nl/index.php/External_filters#Deinterlacing) (e.g. QTGMC) → progressive 30/1.001 fps VIDEO
IVTC (http://avisynth.nl/index.php/External_filters#IVTC_.26_Decimation) (inverse telecine/pulldown (http://en.wikipedia.org/wiki/Telecine#2:3_pulldown)) → progressive 24/1.001 fps FILM (movies, anime), tricky in case of irregular patterns or interlaced content (e.g. credits)


Would this be considered the best method of attack for material such as mine? For example, is there a better deinterlacer than QTGMC for SD animation? Would I output this stage to lossless or is it stage one of a two-stage script? I apologize for my ignorance; I'm rather new to this realm, but capable of learning and have a functional MT version of AviSynth, and would very much appreciate suggestions. Thanks again for your time.

LigH
16th March 2015, 10:05
Cartoons are often victims of the strangest kinds of norm conversions where at least one person in the video studio had no clue how to handle the material with care. Therefore it will be hard to recommend any recovery method without a sample scene. But quite certainly, a real deinterlacer (like QTGMC and many others) is not the recommended choice here. Because a cartoon has no linear motion, any filter relying on linear motion will fail.

colours
16th March 2015, 12:04
Because a cartoon has no linear motion, any filter relying on linear motion will fail.

This argument doesn't hold water because the premise is false. It's not like live action has "linear motion" of any sort at all, so you could equally well have said "deinterlacing is useless on anything other than synthetic test sequences specially designed to be deinterlaced", which is an obviously untrue statement.

Deinterlacing is typically not suggested for animation because the problem to fix usually isn't interlacing, but telecine or duplicated frames or whatever.

LouieChuckyMerry
16th March 2015, 12:47
Here's a test clip, if anyone's the time or inclination to point me in the right direction: S1.E1-TestClip (httpwww.mediafire.comdownloadynl0h498p7uubckS1.E1-TestClip.7z) Thanks.

colours
16th March 2015, 13:30
Looks like telecine (you can tell from the clean-clean-clean-combed-combed pattern by stepping through each frame), so what you should do is inverse telecine (using TIVTC). There's some dot crawl though, which might need to be dealt with before applying IVTC.

LouieChuckyMerry
17th March 2015, 03:33
Thanks for your reply, colours. With MeGUI's preview window (thanks for the idea ;-) ) I see clean-clean-clean-clean-combed without a script. Using MeGUI's "Analyze" feature returns "Hybrid film/interlaced. Mostly film", and in the preview window, with the MeGUI generated script "tfm(order=0).tdecimate(hybrid=1)", every frame appears clean. However, the result of running this script looks not nearly as good, at least to my eyes, as the result of QTGMC with default settings. Seriously, there's significantly less noise, especially edge noise, with the QTGMC output.

Boulder
17th March 2015, 05:07
That's because QTGMC also denoises at the default settings. If necessary, you need to do that after the TFM-TDecimate part in your script.

hello_hello
17th March 2015, 05:15
If you can apply IVTC and the output frame rate is a smooth 23.976fps, that'd generally be better than de-interlacing to 29.970fps. Having said that, I often use QTGMC in progressive mode to remove noise etc, and that'd sometimes be after applying IVTC. For example:

tfm(order=-1).tdecimate()
QTGMC(InputType=1, EzDenoise=1)

Or you could try appling IVTC and then de-interlacing with QTGMC to see how it looks, even though technically that's completely wrong. Sometimes though I find de-interlacing progressive video with QTGMC can clean it up a bit better (as opposed to QTGMC in progressive mode) despite all it's technical wrongness. ;)

tfm(order=-1).tdecimate()
QTGMC()
SelectEven()

But having said that, I use QTGMC very regularly, often in progressive mode as a noise filter, but I don't find QTGMC to be especially good for animation. I don't know why, and I don't work with animation much myself anyway, but I had a play with your sample and couldn't get QTGMC to produce any oddness. I suspect it's because mostly, there's not two consecutive frames that are different. I tired QTGMC on a different source where every frame was different and it wasn't hard to find places where the output wasn't right when QTGMC was used (admittedly this was just a progressive source I had handy).

Pic 1 original
Pic 2 QTGMC deinterlacing
Pic 3 QTGMC in progressive mode.

http://s22.postimg.org/fcerekh01/QTGMC.jpg

It might give you an idea of what to look out for.

For your source I think MeGUI's suggestion of applying ITVC would be best. That'll give you progressive 23.976fps and you could maybe try following that with QTGMC in progressive mode, but there's probably more applicable filters you could use instead. Maybe someone who works with animation regularly will be able to offer a better suggestion.
http://avisynth.nl/index.php/Toon

colours
17th March 2015, 08:18
I see clean-clean-clean-clean-combed without a script.

I actually frame-stepped it in mpv because simple diagnostics don't really require much more than a simple video player.

The reason you sometimes (actually, on your source, most of the time) see only one combed frame out of five is because animation tends to have repeated frames, so a frame that is "supposed" to be combed happens to not be, just because it's weaving two such repeated frames together.

For this reason, it's best to check pans, as pans are usually as smooth as film allows (i.e. 24 fps).

LouieChuckyMerry
17th March 2015, 08:34
That's because QTGMC also denoises at the default settings. If necessary, you need to do that after the TFM-TDecimate part in your script.

Doh! Thanks for the reminder, Boulder.

If you can apply IVTC and the output frame rate is a smooth 23.976fps, that'd generally be better than de-interlacing to 29.970fps. Having said that, I often use QTGMC in progressive mode to remove noise etc, and that'd sometimes be after applying IVTC. For example:

tfm(order=-1).tdecimate()
QTGMC(InputType=1, EzDenoise=1)

Or you could try appling IVTC and then de-interlacing with QTGMC to see how it looks, even though technically that's completely wrong. Sometimes though I find de-interlacing progressive video with QTGMC can clean it up a bit better (as opposed to QTGMC in progressive mode) despite all it's technical wrongness. ;)

tfm(order=-1).tdecimate()
QTGMC()
SelectEven()

But having said that, I use QTGMC very regularly, often in progressive mode as a noise filter, but I don't find QTGMC to be especially good for animation. I don't know why, and I don't work with animation much myself anyway, but I had a play with your sample and couldn't get QTGMC to produce any oddness. I suspect it's because mostly, there's not two consecutive frames that are different. I tired QTGMC on a different source where every frame was different and it wasn't hard to find places where the output wasn't right when QTGMC was used (admittedly this was just a progressive source I had handy).

Pic 1 original
Pic 2 QTGMC deinterlacing
Pic 3 QTGMC in progressive mode.

http://s22.postimg.org/fcerekh01/QTGMC.jpg

It might give you an idea of what to look out for.

For your source I think MeGUI's suggestion of applying ITVC would be best. That'll give you progressive 23.976fps and you could maybe try following that with QTGMC in progressive mode, but there's probably more applicable filters you could use instead. Maybe someone who works with animation regularly will be able to offer a better suggestion.
http://avisynth.nl/index.php/Toon

Thanks for your reply, hello_hello. SMDegrain is my denoiser of choice, but that's because it's the only one I've actually learned to use to any (very tiny) extent :p . Now that I'm a notch above "Clueless" on the QTGMC Scale I'll try your suggestions and compare them to ITVC-SMDegrain, and I'll check your link (thanks). I've searched (not so much, but a bit) for SD animation deinterlacers-denoisers but the pickins were rather slim.

Given that you "had a play with your sample and couldn't get QTGMC to produce any oddness", and the results to my eyes were quite OK (and it makes deinterlacing-decombing-denoising a single-step process), could you recommend QTGMC settings, based on your experience, to get acceptable results? I realize that no set of eyes sees the same, but with your bag o' tricks I'm sure you'd pick a better (simpler) QTGMC starting point than I. I'm striving for final video bit rate ~1500 Kbps and final quality ~7 out of 10, where 1 is "Shrink To ~1500 Kbps Video Bit Rate With Zero Processing" and 10 is "Holy Buddha, I Didn't Know That Was Out In HD!". Any suggestions are welcome, and thanks.

LouieChuckyMerry
17th March 2015, 08:37
I actually frame-stepped it in mpv because simple diagnostics don't really require much more than a simple video player.

The reason you sometimes (actually, on your source, most of the time) see only one combed frame out of five is because animation tends to have repeated frames, so a frame that is "supposed" to be combed happens to not be, just because it's weaving two such repeated frames together.

For this reason, it's best to check pans, as pans are usually as smooth as film allows (i.e. 24 fps).

Thanks for the lucid, informative explanation, colours :) .

LigH
17th March 2015, 09:52
I actually frame-stepped it in mpv because simple diagnostics don't really require much more than a simple video player.

The reason you sometimes (actually, on your source, most of the time) see only one combed frame out of five is because animation tends to have repeated frames, so a frame that is "supposed" to be combed happens to not be, just because it's weaving two such repeated frames together.

For this reason, it's best to check pans, as pans are usually as smooth as film allows (i.e. 24 fps).

Usually I avoid full-quotes, but this is just the whole collection of wrong arguments I need to point at.

To start from the end: Cartoons don't have continuous pans, based on the distributed frame rate; to achieve a target of about 24...30 fps, the original sequence of drawn pictures has to be duplicated several times.

This lack of smooth pans makes spotting combed frames hard. Already because changes between frames only happen sporadically. Possibly not even really regularly, there are still scenes up to several seconds sometimes.

And even when a change between cartoon frames happens, it is not "supposed" to always happen between two fields of a frame. So you may see either a combed frame, or you may see a change between two frames, when you look at the video frame-wise. If a norm conversion even happens with some field blending, then spotting combing will be even harder. Therefore it is recommended to watch not possibly combed frames, but instead bobbed fields. This kind of display is closer to the behavior of TV broadcasts and the temporal order of displayed fields as it used to be since TV was invented.

In the times of analogue television, CRT TV sets displayed the video field-wise. The afterglow duration of the luminescent material in the CRT was in sync with the field display duration. Using fields as shortest time base was a valid technique to make conversions from cartoon frame rates to TV frame rates appear smoother.

Today, with LCD TV sets in progressive display mode, with no "afterglow" but rather immediate response, there is no more need for interlacing, and because motion inter-/extrapolation would not work correctly due to a lack of continuous motion in cartoons, field optimization would not be any advantage anymore.

Being able to see a combing is actually an undesired side effect of watching fields woven to a frame at the same time, instead of one after another. "You are not supposed to see that." Instead, you should see one field after another as whole frame. A "bob" filter tries to achieve that by interpolating each missing line in a field. Only spatial interpolation is not very satisfying, though. Smarter deinterlacers (or rather, bobbers), like QTGMC, try to use temporal information to enhance the spatial interpolation. But that works only when there is some regular temporal progress. A prerequisite which cartoons or telecined content don't fulfill.

colours
17th March 2015, 13:52
Ho hum. (http://xkcd.com/386/)

To start from the end: Cartoons don't have continuous pans, based on the distributed frame rate; to achieve a target of about 24...30 fps, the original sequence of drawn pictures has to be duplicated several times.

Demonstrably false. See frames 330 to 341 and frames 356 to 447 in LouieChuckyMerry's clip.

And even when a change between cartoon frames happens, it is not "supposed" to always happen between two fields of a frame. So you may see either a combed frame, or you may see a change between two frames, when you look at the video frame-wise. If a norm conversion even happens with some field blending, then spotting combing will be even harder. Therefore it is recommended to watch not possibly combed frames, but instead bobbed fields. This kind of display is closer to the behavior of TV broadcasts and the temporal order of displayed fields as it used to be since TV was invented.

I agree with this paragraph but I also don't think I ever said anything to the contrary. Checking the source without deinterlacing is merely a quick and simple test, and like every simple test, there are uncommon cases where it fails. I'll just take it on good faith that this statement was spurred by your mistaken understanding that no animation ever has smooth pans, because I don't see how you'd disagree with me if you'd actually looked at the clip.

Being able to see a combing is actually an undesired side effect of watching fields woven to a frame at the same time, instead of one after another. "You are not supposed to see that." Instead, you should see one field after another as whole frame. A "bob" filter tries to achieve that by interpolating each missing line in a field. Only spatial interpolation is not very satisfying, though. Smarter deinterlacers (or rather, bobbers), like QTGMC, try to use temporal information to enhance the spatial interpolation.

Okay, agree—

But that works only when there is some regular temporal progress. A prerequisite which cartoons or telecined content don't fulfill.

—but this is bollocks, like I already said. The only requirement is that motion compensation between frames is effective, and duplicated content is the best-case scenario for motion compensation, simply because there is no motion at all!

LigH
17th March 2015, 15:11
Demonstrably false. See frames 330 to 341 and frames 356 to 447 in LouieChuckyMerry's clip.

I'd assume that this is an artifical pan, which was not drawn by a painter, but created by a video editor feature. So this is the exception to the rest being a typical cartoon. For such exceptions, a deinterlacer may actually work...

I remember another bad case of "computer assisted cartoons": F.A.K.K.2 (manually drawn "sprites" with a lower frame rate floating over smoothly moving CG background). Restoring norm conversions with such a material would reach the limits of automatic filters, I guess...

... and duplicated content is the best-case scenario for motion compensation, simply because there is no motion at all!

Well, probably, but ... the hard case are the few fields where the content actually changes. Motion compensation will detect no motion in one temporal direction, and wide motion in the other temporal direction. The result may be such artefacts as you can see in hello_hello's sample pics 2 and 3 (ghosts of the roller skate wheels).

colours
17th March 2015, 16:26
I'd assume that this is an artifical pan, which was not drawn by a painter, but created by a video editor feature. So this is the exception to the rest being a typical cartoon. For such exceptions, a deinterlacer may actually work...

The pan is indeed "artificial", but does that matter? To be honest I have much more experience with filtering digital-era animation than analogue-era animation, so I don't know if cartoons from six or seven centuries ago really redrew every frame for pans. The very idea is absurd to me (why not just shift the cel around a bit each frame?), but hey, I'm not that old.

Besides, weren't we discussing about detecting the type of source rather than whether deinterlacing would be effective? :confused:

Well, probably, but ... the hard case are the few fields where the content actually changes. Motion compensation will detect no motion in one temporal direction, and wide motion in the other temporal direction. The result may be such artefacts as you can see in hello_hello's sample pics 2 and 3 (ghosts of the roller skate wheels).

Multiple possible reasons for this.

1: Artificial motion vector coherence ("truemotion" in MVTools and QTGMC) theoretically improves optical flow estimation at the expense of worsening SAD/SATD metrics, but is disabled in QTGMC by default.

2: Cartoons generally don't have motion blur to conceal ghosting artifacts from imperfect motion compensation.

3: The motion vector search just came up with a bad MV and QTGMC's default threshold is too high to catch such bad MVs.

4: No deinterlacer is perfect (proof: pigeonhole principle), so if you feed a deinterlacer a progressive source don't expect it to spit out the source untouched.

Very definitely not a reason: one of the adjacent frames is identical.

(Also, Postimage is another of those pathologically bad image hosts and serves only thumbnails to hotlinks. Literally why.)

hello_hello
18th March 2015, 00:00
Just my 2 cents towards the QTGMC/animation debate......

I don't work with animation much and I don't mess around with QTGMC's settings all that much so I'm far from an expert on either. I just see what I see.

I had a bit more of a play with the clip from which I posted the earlier screenshots, and in sections where there were changes between each frame QTGMC generally had a negative effect where there was "motion" (similar to my previous screenshot). Where adjacent frames were identical (or in parts of the frame where nothing changed), QTGMC had no negative effect.
In the third screenshot you can see what looks like "ghosting" between the two skaters where there's a "ghost" of the first skater's wheels. It's probably not what you'd normally call "ghosting" though, it's literally a leftover from the previous frame as that's where the wheels were in the previous frame. The same applies to the extra lines drawn on the ground. In the first screen shot there's one line under the first skater's left foot. In the third screenshot there's three. The line from the previous frame, the current frame, and the next frame.

"truemotion=true" increased the artefacts a little when QTGMC was in either de-interlacing or progressive mode.

On occasion, I've seen similar artefacts in "normal video", but I haven't noticed them very often. When I have, it's usually been where there's a large "flat" area in the frame, such as a shot of a plane moving quickly against a blue sky.

I mostly use QTGMC in progressive mode these days for stabilising the picture and/or removing noise, but I'm sure I've seen similar artefacts when using QTGMC to de-interlace animation in the past. I haven't noticed any adverse effects using QTGMC on the OP's sample, but the most likely reason for that seems to me to be due to the fact most frames are repeated at least once. I don't have any other "interlaced" animation handy to play with. Anyone got some samples?

Recently I used QTGMC (in progressive mode) to clean up an old Disney movie that contained fully animated sections. It did a great job on the film parts, but in the end I split the encoding job so as to only use it on the film sections because of the adverse effects on the animation.

I tried other de-interlacing methods on the clip from which I posted the screenshots (Yadif, TDient etc). They all had a negative effect as you'd expect when de-interlacing progressive video, but it was the "burring" you'd expect, not the "ghosting" you see using QTGMC.

I don't know why QTGMC tends not to be good with animation but in my experience it's not. Maybe there's a setting or two that could fix it with some adjustment but I've never played around myself because I rarely re-encode animation.

(I'm not seeing thumbnails of the screenshots I uploaded in Firefox, I'm seeing the full sized images. I did just use the first image hosting site I found though as I don't normally use one. Doom9 is the only forum I post in, and possibly the only forum on the internet, where you can't upload images. Unless you want to add them as an attachment and wait a couple of days for moderator approval)

hello_hello
18th March 2015, 00:16
Given that you "had a play with your sample and couldn't get QTGMC to produce any oddness", and the results to my eyes were quite OK (and it makes deinterlacing-decombing-denoising a single-step process), could you recommend QTGMC settings, based on your experience, to get acceptable results?

I don't stray too far from QTGMC's default settings all that often and I don't re-encode animation all that much, so I really can't offer advice there. I'd probably try to go with IVTC first and then apply other filtering (even if it's QTGMC in progressive mode) rather than just de-interlace, but I can't offer any good "other filter" suggestions for animation.

Maybe start a new thread for that one, and if you don't have any luck here, maybe try asking at the VideoHelp forum. Some of the regular posters there work with animation and would probably be able to offer some good advice. Or even try searching the existing threads there. The subject of animation seems to come up fairly regularly, but I usually don't pay any attention to those threads as it's not my thing.

LouieChuckyMerry
18th March 2015, 06:10
Thanks for the suggestions, hello_hello, VideoHelp has often been just that for me. Also, thanks again for your earlier ideas:

If you can apply IVTC and the output frame rate is a smooth 23.976fps, that'd generally be better than de-interlacing to 29.970fps. Having said that, I often use QTGMC in progressive mode to remove noise etc, and that'd sometimes be after applying IVTC. For example:

tfm(order=-1).tdecimate()
QTGMC(InputType=1, EzDenoise=1)

Or you could try appling IVTC and then de-interlacing with QTGMC to see how it looks, even though technically that's completely wrong. Sometimes though I find de-interlacing progressive video with QTGMC can clean it up a bit better (as opposed to QTGMC in progressive mode) despite all it's technical wrongness. ;)

tfm(order=-1).tdecimate()
QTGMC()
SelectEven()

The second script did a slightly better job than the first, to my eyes, and adding Toon (thanks!) to the end of the script made it even better. I'll play around with QTGMC's settings, and tweak Toon, and see what I can achieve. Also, just because I was curious, I applied "QTGMC(InputType=1, EzDenoise=1)" to some live action source footage and was pleasantly surprised by the speed-quality combination, so I've more to check out, competition for SMDegrain.

A couple of last (ha ha ha...) questions about deinterlacing. You suggested I go with MeGUI's suggestion, which was "tfm(order=0).tdecimate(hybrid=1)", but then your suggested scripts had "tfm(order=-1).tdecimate()"; how did you come to that conclusion and is it really that important? Also, do you think that TIVTC+TDent(EDI) is worth the extra time?


Finally, could you elaborate a bit on why it's better to output to 23.976fps than to 29.970fps, and is this true only for animation? Thanks.

hello_hello
18th March 2015, 07:04
Also, just because I was curious, I applied "QTGMC(InputType=1, EzDenoise=1)" to some live action source footage and was pleasantly surprised by the speed-quality combination, so I've more to check out, competition for SMDegrain.

Something else to try for really noisy sources. Aside from increasing the denoising a little, I sometimes use a faster speed preset. The logic being if not all the noise is removed, QTGMC tends to "stabilise" the noise that remains and static noise doesn't look natural. Using a faster speed preset can sometimes help it to look more natural as it doesn't "stabilise" as much.

QTGMC(InputType=1, Preset="Medium", EzDenoise=2)

And if the noise removal results in colour banding (http://en.wikipedia.org/wiki/Colour_banding) try adding gradfun3() to the end of the script. You'll need the Dither package for that.
http://forum.doom9.org/showthread.php?p=1386559#post1386559

I do use SMDegrain myself, but mostly only on "clean" video. By "clean" I mean where the picture is nice and stable but where there might be excessive grain. When the underlying picture isn't "stable" or there's compression artefacts then I'd mostly use QTGMC in progressive mode instead.

A couple of last (ha ha ha...) questions about deinterlacing. You suggested I go with MeGUI's suggestion, which was "tfm(order=0).tdecimate(hybrid=1)", but then your suggested scripts had "tfm(order=-1).tdecimate()"; how did you come to that conclusion and is it really that important? Also, could you elaborate a bit on why it's better to output to 23.976fps than to 29.970fps? Is that only for animation?

NTSC "video" is 29.970fps (either interlaced or progressive). If something's purely 29.970fps interlaced, then deinterlacing to 29.970fps progressive (or 59.940fps progressive is usually better) would be the way to do it.
"Film" converted to NTSC is originally 23.976fps converted to 29.970fps using telecine. Technically, applying inverse telecine (IVTC) probably isn't de-interlacing as such, but it usually falls under the "de-interlacing" category in most encoder GUIs. IVTC restores the original progressive frames (at 23.976fps).
http://en.wikipedia.org/wiki/Three-two_pull_down

I assume when MeGUI analysed the video it decided it was a hybrid. Partly "video" (29.970fps), but mostly "film" (originally 23.976fps).
The "film" parts would have IVTC applied and the "video" parts are de-interlaced and converted from 29.970fps to 23.976fps by dropping frames and using frame blending. The latter isn't necessarily ideal but you get a constant 23.976fps.
When I suggested IVTC earlier I just selected "Film" in MeGUI's de-interlacing section manually, and copied what was added to the script. That'd assume the entire thing was "film" (originally 23.976fps). Chances are it is entirely "film", in which case the result would be the same.

Anyway, while you can de-interlace "film" it's usually better to apply IVTC to restore the original progressive frames rather than apply de-interlacing, which doesn't. A 3/2 pattern of clean/dirty frames (where there's constant motion) indicates IVTC should be applied. Deinterlacing telecined "film" results in a type of frame blending which doesn't look nice. For your sample, where most frames are repeated, you might get away with de-interlacing but I still think it'd be better to reverse the telecine process to output progressive 23.976fps instead.
Hopefully all that makes sense.....

Also, do you think that TIVTC+TDent(EDI) is worth the extra time?

It might be for animation. I'm not really sure to be honest. Is it actually all that slow (at least in comparison to QTGMC)?

creaothceann
18th March 2015, 18:21
I assume when MeGUI analysed the video it decided it was a hybrid. Partly "video" (29.970fps), but mostly "film" (originally 23.976fps).
The "film" parts would have IVTC applied and the "video" parts are de-interlaced and converted from 29.970fps to 23.976fps by dropping frames and using frame blending. The latter isn't necessarily ideal but you get a constant 23.976fps.
Or you just convert to 120000/1001 fps, then (if you don't have a 120 or 144Hz monitor) let a tool (I forgot which ones can do that) remove the duplicates and create a VFR MKV. :)

LouieChuckyMerry
20th March 2015, 07:45
Something else to try for really noisy sources. Aside from increasing the denoising a little, I sometimes use a faster speed preset. The logic being if not all the noise is removed, QTGMC tends to "stabilise" the noise that remains and static noise doesn't look natural. Using a faster speed preset can sometimes help it to look more natural as it doesn't "stabilise" as much.

QTGMC(InputType=1, Preset="Medium", EzDenoise=2)

And if the noise removal results in colour banding (http://en.wikipedia.org/wiki/Colour_banding) try adding gradfun3() to the end of the script. You'll need the Dither package for that.
http://forum.doom9.org/showthread.php?p=1386559#post1386559

I've added this to my presets and will check it out ASAP, thanks.


I do use SMDegrain myself, but mostly only on "clean" video. By "clean" I mean where the picture is nice and stable but where there might be excessive grain. When the underlying picture isn't "stable" or there's compression artefacts then I'd mostly use QTGMC in progressive mode instead.

I think that SMDegrain is brilliant, finding that "SMDegrain(Lsb=True,Chroma=True,Plane=0)" works wonders and raising the thSAD from the default (400) to 600 or 800 for extremely grainy (usually older movies shot on film) sources. I'm really curious to try your above script and compare because QTGMC seems to run about 50% faster on my rig. What do you mean by "stable" in reference to the picture?


NTSC "video" is 29.970fps (either interlaced or progressive). If something's purely 29.970fps interlaced, then deinterlacing to 29.970fps progressive (or 59.940fps progressive is usually better) would be the way to do it.
"Film" converted to NTSC is originally 23.976fps converted to 29.970fps using telecine. Technically, applying inverse telecine (IVTC) probably isn't de-interlacing as such, but it usually falls under the "de-interlacing" category in most encoder GUIs. IVTC restores the original progressive frames (at 23.976fps).
http://en.wikipedia.org/wiki/Three-two_pull_down

I assume when MeGUI analysed the video it decided it was a hybrid. Partly "video" (29.970fps), but mostly "film" (originally 23.976fps).
The "film" parts would have IVTC applied and the "video" parts are de-interlaced and converted from 29.970fps to 23.976fps by dropping frames and using frame blending. The latter isn't necessarily ideal but you get a constant 23.976fps.
When I suggested IVTC earlier I just selected "Film" in MeGUI's de-interlacing section manually, and copied what was added to the script. That'd assume the entire thing was "film" (originally 23.976fps). Chances are it is entirely "film", in which case the result would be the same.

Anyway, while you can de-interlace "film" it's usually better to apply IVTC to restore the original progressive frames rather than apply de-interlacing, which doesn't. A 3/2 pattern of clean/dirty frames (where there's constant motion) indicates IVTC should be applied. Deinterlacing telecined "film" results in a type of frame blending which doesn't look nice. For your sample, where most frames are repeated, you might get away with de-interlacing but I still think it'd be better to reverse the telecine process to output progressive 23.976fps instead.
Hopefully all that makes sense.....

I only had to read this, slowly, a half dozen times to have an understanding ;-) . Seriously, thanks for the explanation, I really appreciate it.

hello_hello
23rd March 2015, 06:54
I'm really curious to try your above script and compare because QTGMC seems to run about 50% faster on my rig. What do you mean by "stable" in reference to the picture?

You could maybe think of an analogy of "unstable" as video that wasn't de-interlaced well, or a video encoded with Xvid with a low bitrate, resulting in what I call "encoder wobble" in static areas, that sort of thing. QTGMC is pretty good at cleaning up that sort of "unstable" picture. I'm probably ignorant of the proper technical terms but that's the sort of thing I'm referring to.

If you're interested, there's some samples attached to this post (http://forum.videohelp.com/threads/358043-A-comparison-of-AVIsynth-denoise-filters?p=2283228&viewfull=1#post2283228) from when I first started playing around with using QTGMC for noise removal. It was my 'torture test" noise removal but it's a good example of what I mean by QTGMC "stabilising" the picture. The other scripts I compared it to were FastDegrain (http://avisynth.nl/images/FastDegrain.avs) and TemporalDegrain (http://avisynth.nl/index.php/Temporal_Degrain) (I don't think I'd found SMDegrain at that stage) as well as some "standalone" Avisynth plugins. It's not a scientific comparison by any means as it was all with the default settings for each noise removal method, except for adjusting the amount of noise removal in QTGMC.
Whether you think it denoised best or not, QTGMC fixed more of the picture "bobbing". It also cleaned up more of the "blemishes" in single frames.

There's also some other samples in the first post (http://forum.videohelp.com/threads/358043-A-comparison-of-AVIsynth-denoise-filters?p=2259819&viewfull=1#post2259819) which include the original video, and Selur used that to add some additional denoised samples here (http://forum.videohelp.com/threads/358043-A-comparison-of-AVIsynth-denoise-filters?p=2359738&viewfull=1#post2359738).

It was all from a while ago when I first started getting a bit more serious about noise filtering and discovered QTGMC can denoise pretty well.
There's definitely no "one size fits all" noise filtering and I still experiment with other noise removal methods a bit, but most of the time I end up using QTGMC.

hello_hello
23rd March 2015, 11:41
I only had to read this, slowly, a half dozen times to have an understanding ;-) . Seriously, thanks for the explanation, I really appreciate it.

Once you get your head around how telecine (3-2 pulldown) works it's not too hard.

Interlaced video consists of 29.970 frames per second but each frame consists of two fields, so you could think of it as 54.940 fields per second. One field is the even scanlines, the other is the odd scanlines. The object of de-interlacing is to merge the two fields into a single progressive frame, but because each field is a different moment in time they can't just be combined as such.
http://en.wikipedia.org/wiki/Interlaced_video

Telecine (3-2 pulldown) uses the interlaced nature of video to convert 23.976fps into 29.970fps by repeating fields but the film isn't interlaced as such and inverse telecine can be used to recover the original progressive frames.
http://en.wikipedia.org/wiki/Three-two_pull_down

The problem is, NTSC can be a combination of "film" and "video", hence MeGUI's analysis sometimes seeing it as some sort of "hybrid" and you can't always assume MeGUI gets it right, so if in doubt it's best to post a sample.

LouieChuckyMerry
24th March 2015, 15:02
You could maybe think of an analogy of "unstable" as video that wasn't de-interlaced well, or a video encoded with Xvid with a low bitrate, resulting in what I call "encoder wobble" in static areas, that sort of thing. QTGMC is pretty good at cleaning up that sort of "unstable" picture. I'm probably ignorant of the proper technical terms but that's the sort of thing I'm referring to.

If you're interested, there's some samples attached to this post (http://forum.videohelp.com/threads/358043-A-comparison-of-AVIsynth-denoise-filters?p=2283228&viewfull=1#post2283228) from when I first started playing around with using QTGMC for noise removal. It was my 'torture test" noise removal but it's a good example of what I mean by QTGMC "stabilising" the picture. The other scripts I compared it to were FastDegrain (http://avisynth.nl/images/FastDegrain.avs) and TemporalDegrain (http://avisynth.nl/index.php/Temporal_Degrain) (I don't think I'd found SMDegrain at that stage) as well as some "standalone" Avisynth plugins. It's not a scientific comparison by any means as it was all with the default settings for each noise removal method, except for adjusting the amount of noise removal in QTGMC.
Whether you think it denoised best or not, QTGMC fixed more of the picture "bobbing". It also cleaned up more of the "blemishes" in single frames.

There's also some other samples in the first post (http://forum.videohelp.com/threads/358043-A-comparison-of-AVIsynth-denoise-filters?p=2259819&viewfull=1#post2259819) which include the original video, and Selur used that to add some additional denoised samples here (http://forum.videohelp.com/threads/358043-A-comparison-of-AVIsynth-denoise-filters?p=2359738&viewfull=1#post2359738).

It was all from a while ago when I first started getting a bit more serious about noise filtering and discovered QTGMC can denoise pretty well.
There's definitely no "one size fits all" noise filtering and I still experiment with other noise removal methods a bit, but most of the time I end up using QTGMC.

Thanks for the explanation, hello_hello, and I actually bumped into that thread, again, yesterday while searching for an answer to a question I can't put my finger on at this moment (at least I'm aging better in the looks department than Matthew Modine, ha ha). The first time I encountered it was when I began my quest for a denoiser I could use to attack my video collection (eventually settling on SMDegrain). I really like the results of QTGMC with (InputType=1,Preset="Medium",EZDenoise=2), but I typed too soon regarding the speed improvement on my setup. It seems that SD sources are no problem but HD sources cause nasty issues with my MT AviSynth. That's a real shame because I stumbled into an MT script for SMDegrain at the outset, probably dumb luck, that chugs along at pretty much 100% CPU Usage. I guess QTGMC is more demanding (involved?) than SMDegrain. Perhaps I'll have to master the hello_hello Trim & Stitch Method©, although given my wont of using SelectRangeEvery(1000,66) to (rather reasonablly) guesstimate a video bit rate I'll have to modify my approach. It's something to consider as I work my way chronologically backwards through my collection, since the quality of the sources is slowly getting worse. Can't wait for Kurosawa and Hitchcock ;-) . Now to poke away at an acceptable script for early season Simpsons...

hello_hello
25th March 2015, 11:35
What sort of issues with MT Avisynth?

Maybe you could try replacing the relevant plugins with the versions listed here if you're not using them already.
http://forum.doom9.org/showthread.php?p=1699950#post1699950
And while I don't use MT Avisynth myself, this version of MaskTools2 is the fastest of all the versions I've tried and it doesn't slow to a crawl if the source isn't mod16. http://avisynth.nl/index.php/MaskTools2

.....although given my wont of using SelectRangeEvery(1000,66) to (rather reasonablly) guesstimate a video bit rate I'll have to modify my approach.

Do you aim for a particular file size? I prefer CRF encoding myself, even though the file sizes vary all over the place.

I've been working on a video that's being more difficult than usual. The video quality is pretty high, but there's very fine grain in places. It's "moving" so fast it's virtually unnoticeable when watching the video at normal speed, but it's making it hard to re-encode at a reasonable bitrate. Unless I use a high bitrate the encoder turns the grain into "moving blocks" (for want of a better description) where the image is mostly a solid colour (a wall in the background etc) and that makes it noticeable. So far QTGMC's EzDenoise is resulting in some horrible banding so I've been experimenting with SMDegrain and at the moment SMDegrain followed by LSFMod (http://avisynth.nl/index.php/LSFmod) (both default settings) seems to be working the best. It's doing a good job removing the noise and with LFSMod it looks a tad sharper than the original (I don't like sharpening as a rule).

While I was playing around with this one I had a close look at what QTGMC was doing in places, and on occasion I found artefacts similar to those in the cartoon screenshots I posted earlier. Unlike the cartoon screenshots though, it'd be very unlikely you'd see them without pausing on individual frames and comparing them to the source (which I was doing) as they weren't as prominent and only seemed to occur where there was fast motion and a lot of contrast. I did discover though, the artefacts seemed to be reduced by using the medium speed preset rather than the default settings, so I'll have to experiment a bit more there.

Mind you SMDGrain isn't perfect either. I found a few places where it had some adverse effects where there was motion, although once again nothing you'd see while the frames running at normal speed.

LouieChuckyMerry
26th March 2015, 02:21
What sort of issues with MT Avisynth?

Maybe you could try replacing the relevant plugins with the versions listed here if you're not using them already.
http://forum.doom9.org/showthread.php?p=1699950#post1699950
And while I don't use MT Avisynth myself, this version of MaskTools2 is the fastest of all the versions I've tried and it doesn't slow to a crawl if the source isn't mod16. http://avisynth.nl/index.php/MaskTools2

Offhand it seems to be a memory issue, but I've not tested QTGMC with my AviSynth MT enough to have a definitive answer. It's on my list ;-) . I've opened your links and will peruse them ASAP, though, thanks.


Do you aim for a particular file size? I prefer CRF encoding myself, even though the file sizes vary all over the place.

I was a quick convert from 2-Pass to CRF as soon as I educated myself, but me being me I like my files to be of a certain general bit rate (I know, I know) so the sizes are somewhat predictable. After much searching (and my best buddy Dumb Luck) I discovered "SelectRangeEvery" and, after a bit of trial and error, I've found that the bit rate for a "SelectRangeEvery(1000,66)" output is within 10% of the bit rate I'd get processing the entire source with the same CRF. With the tweaking of experience I'm able to consistently achieve bit rates within 5%, so I'm happy. Depending on the source material's resolution, cleanliness, and running time my SelectRangeEvery script takes anywhere from a few minutes to an hour plus; I run these while away from my computer for a stretch, then I'm able to quite closely estimate the time involved (and resultant bit rate) for a full encode and can plan accordingly (I do most all my full encodes overnight).


I've been working on a video that's being more difficult than usual. The video quality is pretty high, but there's very fine grain in places. It's "moving" so fast it's virtually unnoticeable when watching the video at normal speed, but it's making it hard to re-encode at a reasonable bitrate. Unless I use a high bitrate the encoder turns the grain into "moving blocks" (for want of a better description) where the image is mostly a solid colour (a wall in the background etc) and that makes it noticeable. So far QTGMC's EzDenoise is resulting in some horrible banding so I've been experimenting with SMDegrain and at the moment SMDegrain followed by LSFMod (http://avisynth.nl/index.php/LSFmod) (both default settings) seems to be working the best. It's doing a good job removing the noise and with LFSMod it looks a tad sharper than the original (I don't like sharpening as a rule).

While I was playing around with this one I had a close look at what QTGMC was doing in places, and on occasion I found artefacts similar to those in the cartoon screenshots I posted earlier. Unlike the cartoon screenshots though, it'd be very unlikely you'd see them without pausing on individual frames and comparing them to the source (which I was doing) as they weren't as prominent and only seemed to occur where there was fast motion and a lot of contrast. I did discover though, the artefacts seemed to be reduced by using the medium speed preset rather than the default settings, so I'll have to experiment a bit more there.

Mind you SMDGrain isn't perfect either. I found a few places where it had some adverse effects where there was motion, although once again nothing you'd see while the frames running at normal speed.

Don't get me started on background noise, ha ha. Once I had the misfortune of noticing "...'moving blocks' (for want of a better description) where the image is mostly a solid colour (a wall in the background etc)" I was screwed. Now I can't not notice this noise and spend entirely too much time grinding my teeth while fiddling about with AviSynth :p . Are you utilizing SMDegrain's "Lsb" feature? From the .html:

lsb
[bool: true, "false"]

This enables 32 bit depth precision for denoising.
Avoids banding thanks to a dither algorithm friendly for optimum encodings (When no further non-edge processing is done)
For this to be used you will need the Dither package with its version of MVTools2.

As I've typed before, my goto SMDegrain script is "SMDegrain(Lsb=True,Chroma=True,Plane=0)". From what I've read and the kind help I've received from dogway (the script's author) the "Chroma=True" acts as a sort of poor man's motion vector improver and "Plane=0" skips processing the chroma planes, which it seems are more prone to smearing in the temporal domain, and saves a bit of time. On my 14" 1600x900 laptop screen the results look great; I figure that by the time I've a large TV I'll also have a SuperComputer and, if necessary, can reencode my sources with a "better" script, adding "ContraSharp=True", "RefineMotion=True", etc. My main goal with all of this is to never, ever check out anything on a frame-by-frame basis or all is lost ;) .

Now to check out LFSMod and compare it to QTGMC's built-in sharpener, Toon, and FastLineDarkener with regards to early seasons Simpsons...

hello_hello
26th March 2015, 11:21
Don't get me started on background noise, ha ha. Once I had the misfortune of noticing "...'moving blocks' (for want of a better description) where the image is mostly a solid colour (a wall in the background etc)" I was screwed. Now I can't not notice this noise and spend entirely too much time grinding my teeth while fiddling about with AviSynth

That's one of the reasons I often use QTGMC in progressive mode for very fine noise (without it's EzDenoise function) as it usually stabilises the noise and it'll encode without "moving blocks" but for some reason the video in question is being a little more difficult than usual and even EzDenoise=1 is resulting in some horrible banding. SMDegrain is working better this time.

Are you utilizing SMDegrain's "Lsb" feature?

Not this time because it's the first filter in the chain followed by cropping, resizing, a conversion to RGB and back to YV12 (so I could use RGBAdjust), and LSFMod, so there didn't seem to be much point given there's lots of 8 bit filtering following it. Adding GradFun3() to the end of the script seems to be fixing any banding problems.

As I've typed before, my goto SMDegrain script is "SMDegrain(Lsb=True,Chroma=True,Plane=0)". From what I've read and the kind help I've received from dogway (the script's author) the "Chroma=True" acts as a sort of poor man's motion vector improver and "Plane=0" skips processing the chroma planes, which it seems are more prone to smearing in the temporal domain, and saves a bit of time. On my 14" 1600x900 laptop screen the results look great; I figure that by the time I've a large TV I'll also have a SuperComputer and, if necessary, can reencode my sources with a "better" script, adding "ContraSharp=True", "RefineMotion=True", etc. My main goal with all of this is to never, ever check out anything on a frame-by-frame basis or all is lost.

Sometimes I long for the days of CRT TVs when this sort of thing wasn't much of a problem because you couldn't see it.
These days my PC is connected to a 51" Plasma next to my desk so frame by frame comparisons do require a certain level of sedation. :(
There's an identical TV in the living room and sometimes I walk in while someone's watching one of my encodes and I wonder why I was fussing about it so much. Adding an extra five feet to the viewing distance does more for video quality than most Avisynth filters I've used. ;)

Now you've got me motivated, I'll have to play around with SMDegrain's settings a bit more, once this lot of encoding is done.

Now to check out LFSMod and compare it to QTGMC's built-in sharpener, Toon, and FastLineDarkener with regards to early seasons Simpsons...

I find QTGMC in progressive mode tends to sharpen a little even with a bit of denoising enabled (ie EzDenoise=1), but it looks natural to me, as opposed to "sharpened" which I don't like as a general rule. If the video is nice and clean though (I hate sharpened noise) I sometimes use LSFMod. If you haven't tried it yet SeeSaw (http://avisynth.nl/index.php/SeeSaw) might also be worth a look.

All this talk of SMDegrain made me look at the script I'm using and I just discovered it's an old version. I don't know how that happened. Last time I cleaned out the Avisynth plugins folder and started again I must have accidentally copied the wrong version. Or maybe I didn't know there was a newer version at the time. Damn!!!!.......
It's working well for the video I'm encoding at the moment but naturally I'm going to have to stop encoding when the current job finishes and run a comparison encode using the newer script to make sure the result won't be noticeably better.
$@%$&!!! :mad:

Edit: So I found this Dogway mod (http://www.mediafire.com/download/p6w5ndpdag9obym/SMDegrain+v.1.8d.zip) of the SMDegrain script and it appears LSFMod is built-in (the LSFMod script is still required, but SMDegrain can use it for sharpening). I've no idea if sharpening that way will produce a more exciting result than LSFMod as a separate filter. Something else to experiment with, I guess......
The old version of SMDegrain I was using appears not to have any built-in sharpening, hence my following it with LSFMod, but maybe for the Dogway mod version that won't be necessary.

Which version are you using? The latest Dogway mod seems to be v2.21 but I'm having trouble finding a working download link (never mind, I found it (https://www.mediafire.com/?gpil7zkz24lq4)).

I think that SMDegrain is brilliant, finding that SMDegrain(Lsb=True,Chroma=True,Plane=0)" works wonders and raising the thSAD from the default (400) to 600 or 800 for extremely grainy (usually older movies shot on film) sources.

As a side note, I remembered you mentioned raising the thSAD value when I realised the default for the old SMDegrain script I was using (http://forum.doom9.org/showthread.php?p=1367412#post1367412) is thSAD=400. The newer versions of the script have thSAD=200 as the default.
Oh well, I'm off to run some comparison encodes using the newer scripts to see if exciting things will happen.......

LouieChuckyMerry
26th March 2015, 14:21
Sometimes I long for the days of CRT TVs when this sort of thing wasn't much of a problem because you couldn't see it.
These days my PC is connected to a 51" Plasma next to my desk so frame by frame comparisons do require a certain level of sedation. :(
There's an identical TV in the living room and sometimes I walk in while someone's watching one of my encodes and I wonder why I was fussing about it so much. Adding an extra five feet to the viewing distance does more for video quality than most Avisynth filters I've used. ;)

I have to admit that I occasionally worry my currently year-plus Seemingly Neverending ReEncoding Project will be for naught the day I own an actual TV (instead of a laptop at the foot of my bed). That bridge then or some such, I reckon ;) .


I find QTGMC in progressive mode tends to sharpen a little even with a bit of denoising enabled (ie EzDenoise=1), but it looks natural to me, as opposed to "sharpened" which I don't like as a general rule. If the video is nice and clean though (I hate sharpened noise) I sometimes use LSFMod. If you haven't tried it yet SeeSaw (http://avisynth.nl/index.php/SeeSaw) might also be worth a look.

It's my understanding that the default sharpening in QTGMC is 1.0 but changes to 0.2 when "SourceMatch" is invoked. As I've tested various sharpeners with the early season Simpsons my default script has become (thanks :) ):

Source, Load Plugin, Etc.
TFM(Order=-1).TDecimate(Mode=1)
#deinterlace
#crop
#resize
#denoise
QTGMC(FPSDivisor=2,Lsb=True,Preset="Medium",ChromaMotion=True,EZDenoise=2,Sharpness=0)
Pick-A-Sharpener,Any-Sharpener()

I think the "Lsb=True" is wishful thinking, I've borrowed the "ChromaMotion=True" from "Preset='Slower'" as it seemingly adds no extra time, and when I settle on a sharpener I'll make new tests adjusting the EZDenoise level. I found that adding other sharpeners to the default sharpening in QTGMC made things exponentially sharp, thus the "Sharpness=0" when testing with other sharpeners.


All this talk of SMDegrain made me look at the script I'm using and I just discovered it's an old version. I don't know how that happened. Last time I cleaned out the Avisynth plugins folder and started again I must have accidentally copied the wrong version. Or maybe I didn't know there was a newer version at the time. Damn!!!!.......
It's working well for the video I'm encoding at the moment but naturally I'm going to have to stop encoding when the current job finishes and run a comparison encode using the newer script to make sure the result won't be noticeably better.
$@%$&!!! :mad:

Edit: So I found this Dogway mod (http://www.mediafire.com/download/p6w5ndpdag9obym/SMDegrain+v.1.8d.zip) of the SMDegrain script and it appears LSFMod is built-in (the LSFMod script is still required, but SMDegrain can use it for sharpening). I've no idea if sharpening that way will produce a more exciting result than LSFMod as a separate filter. Something else to experiment with, I guess......
The old version of SMDegrain I was using appears not to have any built-in sharpening, hence my following it with LSFMod, but maybe for the Dogway mod version that won't be necessary.

Which version are you using? The latest Dogway mod seems to be v2.21 but I'm having trouble finding a working download link (never mind, I found it (https://www.mediafire.com/?gpil7zkz24lq4)).

I find much of the battle with AviSynth is keeping track of the plugins: which play nice together, which don't, which function with AviSynth MT, which don't, god my head hurts :rolleyes: . I'm using SMDegrain2.2d because it's the first version I found. Check these out:

SMDegrain'sNewHome (http://forum.videohelp.com/threads/369142-Simple-MDegrain-Mod-v2-2d-A-Quality-Denoising-Solution)

and

MoreAwesomeDogwayTools (http://forum.videohelp.com/threads/369143-ResizersPack-MasksPack-PlaygroundPack-SmoothContrast-Logo-mod-functions)

Dogway has never been anything but friendly (and ridiculously patient) with me so I'm sure he'd be willing to answer any questions you have.


As a side note, I remembered you mentioned raising the thSAD value when I realised the default for the old SMDegrain script I was using (http://forum.doom9.org/showthread.php?p=1367412#post1367412) is thSAD=400. The newer versions of the script have thSAD=200 as the default.
Oh well, I'm off to run some comparison encodes using the newer scripts to see if exciting things will happen.......

As far as I know the SMDegrain default for thSAD is still 400 (if it's not a year-plus of my life isn't quite as I've thought :( ). From the SMDegrain2.2d .avsi:

# Defaults & Conditionals


tr = default( tr, 3 )
thSAD = default( thSAD, 400 )
thSAD2=int(thSAD/2)

Now I really need to focus on the early season Simpsons...

hello_hello
26th March 2015, 17:09
I think the "Lsb=True" is wishful thinking.....

I'm not sure I've tried Lsb=True when using QTGMC, but if you follow it with an 8 bit filter (which often I would) I doubt there'd be much point anyway.

I'm using SMDegrain2.2d because it's the first version I found.

Do you know what the difference is between versions 2.2d and 2.21d?

As far as I know the SMDegrain default for thSAD is still 400 (if it's not a year-plus of my life isn't quite as I've thought

It appears the default for the original version 0.2 was thSAD=400, for 0.3 & 0.4 it was thSAD=200 (all original author), and for the Dogway mods I've looked at (1.8d, 2.2d and 2.21d) they're all thSAD=400.

For some reason the original 0.2 version is about 30% faster than any of the others (default settings, single threaded Avisynth). I haven't had a look at the scripts to try to work out why yet.

LouieChuckyMerry
27th March 2015, 01:24
Do you know what the difference is between versions 2.2d and 2.21d?

That's a really good question. Although I've both versions, I've been using 2.2d because, well, because in my mind it was newer than 2.21d. Seems I can't count very well, as "21" is certainly larger than "2". A quick gander with NotePad shows they're both dated 5 March 2013 but 2.21d has an extra chroma setting, Chr2, that's (as far as I can figure, which isn't very) used for prefiltering. But you'd have to ask Dogway as I'm unqualified to answer. Actually, I think I'll ask Dogway myself as I'd be quite depressed to learn that many months worth of encodes could've been a wee bit better.

LouieChuckyMerry
28th March 2015, 05:28
Dogway answered your question then updated SMDegrain: FromTheTipsOfDog ;) (http://forum.videohelp.com/threads/369142-Simple-MDegrain-Mod-v3-0d-A-Quality-Denoising-Solution)

hello_hello
30th March 2015, 04:27
Dogway answered your question then updated SMDegrain: FromTheTipsOfDog ;) (http://forum.videohelp.com/threads/369142-Simple-MDegrain-Mod-v3-0d-A-Quality-Denoising-Solution)

Thanks for that.

Back to QTGMC for noise removal......

I had a bit more of a play with a particularly noisy video (movie from the 70s) and it does seem QTGMC's medium preset is less likely to produce artefacts in progressive mode (where there's motion) than the default slow preset. Not that the slow preset is bad. I have to deliberately pause frames and look for problems.
In order to compensate for using a faster speed preset I increased the de-noising a little, and of course then I decided I wanted to compensate for the blurring.....

I was quite happy with the end result, but the script is very slow, especially for HD. I didn't use anything other than default settings and adjusting QTGMC's denoising.

QTGMC(InputType=1, Preset="Medium", EzDenoise=2)
LSFMod()
gradfun3()

It's hard to demonstrate denoising with still pictures, and the noise is more noticeable than the first screenshot might indicate (although I used a shot that included a blue sky so it's easy to see the pattern of noise), but the noise is greatly reduced and the encoded version is sharper than the original. It's probably on the verge of looking "sharpened" to me so I might dial LSFMod back a tad next time.

Before (resized to 720p, no filtering):
http://s3.postimg.org/a1zmcer4v/before.jpg (http://postimg.org/image/a1zmcer4v/)

After (QTGMC & LSFMod & Gradfun3):
http://s14.postimg.org/55phjis59/after.jpg (http://postimg.org/image/55phjis59/)

Now I know SMDegrain can use LFSMod for sharpening I'll experiment with it at some stage soon to see if I can achieve a similar result.

(Maybe if we're going to continue to discuss noise removal, even using QTGMC, we should start a new thread. If I do later on after playing with the new SMDegrain I'll add a link here)

LouieChuckyMerry
31st March 2015, 02:23
No problem, glad I could actually help for a change ;) .

And A Blue Sky Never Lies, ha ha, especially the older the source. As I mentioned earlier, solid backgrounds catch my eye now, particularly when they're "alive" (almost as if they're breathing) with noise. As I work chronologically backwards through my collection I'm discovering that denoising is getting quite a bit more... "involved" is a reasonable word. Damn film stock (http://en.wikipedia.org/wiki/Film_stock)! Your second shot looks waaay better to my eyes, but I can see what you mean about it bordering on oversharpened. I've found denoising to be a bit like listening to music; my preference is to use "neutral" earphones or speakers so I hear the music as it was made. It's the same for video viewing: oversharpening a Brian "King Of Soft Focus" DePalma classic would be anathema to me but, geez, the excess grain is so distracting it's difficult to enjoy the movie. Anyway, you're right about a new link (thanks for your patience, QTGMC Thread), keep me posted (couldn't resist).

Stereodude
31st March 2015, 16:33
It's my understanding that the default sharpening in QTGMC is 1.0 but changes to 0.2 when "SourceMatch" is invoked. As I've tested various sharpeners with the early season Simpsons my default script has become (thanks :) ):
I always override the sharpness and turn it down to 0.2. I don't care for the sharpening at the default of 1.0.

jriker1
4th April 2015, 14:55
I have a DVD that I am converting to a MP4 file after doing some cleanup. I first used VOB2MPG to create a MPEG2 file of the main movie. Plays fine. It is then my intent to deinterlace the movie, and then adjust the size as it's 16:9 and want it 1:1. And then use NeatVideo to clean it up a lot. OK so that's what I'm trying to do but after hitting the first step things are going wrong.

Create an AVISynth script basically with:

ffmpegsource2("vob2mpg.mpg", vtrack = -1)
trim(0,3500)
## AssumeTFF()
QTGMC(Preset="Slower", SourceMatch=3, Lossless=2, MatchEnhance=0.75, TR2=1, Sharpness=0.1)


Tried with and without AssumeTFF and also with and without trimming and doing the full movie. What I end up with is this (note small segment but due to double fps file is larger look in about a minute for more "moving" stuff) jerky output: https://www.dropbox.com/s/y44cxfqbwrxd686/VOB2MPG-Deinterlace.avi?dl=0

Note I also used the above avisynth script with QTGMC commented out. Video played fine.

Some info on the original:
- 5322kbps video
- 720x480 (16:9)
- 29.97fps
- Interlaced
- TFF

Any thoughts?

Thanks.

JR

poisondeathray
4th April 2015, 16:04
I have a DVD that I am converting to a MP4 file after doing some cleanup. I first used VOB2MPG to create a MPEG2 file of the main movie. Plays fine. It is then my intent to deinterlace the movie, and then adjust the size as it's 16:9 and want it 1:1. And then use NeatVideo to clean it up a lot. OK so that's what I'm trying to do but after hitting the first step things are going wrong.

Create an AVISynth script basically with:

ffmpegsource2("vob2mpg.mpg", vtrack = -1)
trim(0,3500)
## AssumeTFF()
QTGMC(Preset="Slower", SourceMatch=3, Lossless=2, MatchEnhance=0.75, TR2=1, Sharpness=0.1)


Tried with and without AssumeTFF and also with and without trimming and doing the full movie. What I end up with is this (note small segment but due to double fps file is larger look in about a minute for more "moving" stuff) jerky output: https://www.dropbox.com/s/y44cxfqbwrxd686/VOB2MPG-Deinterlace.avi?dl=0

Note I also used the above avisynth script with QTGMC commented out. Video played fine.

Some info on the original:
- 5322kbps video
- 720x480 (16:9)
- 29.97fps
- Interlaced
- TFF

Any thoughts?

Thanks.

JR

I'm not going to download the >1GB file . If you want to post a sample, cut it from the original DVD , MPEG2.


"main movie" ? If it's a theatrical movie, you can be 99.9% certain the content is NOT interlaced . From a NTSC you should be IVTCing, not deinterlacing. Likely that's why it's "jerky"

jriker1
4th April 2015, 16:24
I'm not going to download the >1GB file . If you want to post a sample, cut it from the original DVD , MPEG2.


"main movie" ? If it's a theatrical movie, you can be 99.9% certain the content is NOT interlaced . From a NTSC you should be IVTCing, not deinterlacing. Likely that's why it's "jerky"

Stay tuned, uploading to DropBox new versions. Hopefully 300MB on the converted one with issue and 97 megs on the original are OK. Can't do to much with the converted one due to being Lagarith and 59.97fps. Just takes a lot of space for a small piece as clip is only a couple minutes long. I'll provide links to both when done uploading. Using a public hotspot so not the fastest.

JR

EDIT: OK here are the files:

Piece of the original DVD: https://www.dropbox.com/s/e7reer6mqhqvrcp/VOB2MPG%28000110.233-000330.698%29.mpg?dl=0
Smaller piece of the converted video: https://www.dropbox.com/s/ywv8xtu2gzs6lhe/VOB2MPG-Deinterlace%28000111.328-000135.247%29.avi?dl=0

creaothceann
4th April 2015, 18:25
Opening that .mpg file with DSS2 failed. VirtualDub tells me it can't save to .avi. MKVmerge reports "found at least one B frame without second reference in a non closed GOP". Converting with mencoder (which throws up some warnings and doesn't convert the audio) to .avi and frame-stepping in AvsPmod shows the typical 3:2 pattern of progressive:interleaved frames. Solution: don't convert to .mpg and deinterlace via some IVTC script/plugin instead of QTGMC.

manono
4th April 2015, 20:50
Piece of the original DVD: https://www.dropbox.com/s/e7reer6mqhqvrcp
No, you ran it through VOB2MPG. When offering samples don't do anything to the VOBs - don't make an MPG or repackage it in the MKV container. Cut out an M2V for upload using DGIndex. When working on DVD VOB files, make a D2V project file using DGIndex and open them via MPEG2Source and the DGDecode dll. It's all explained in the documents included in the DGMPGDec package.

As creaothceann said, it IVTC's perfectly using something like this:

TFM()
TDecimate()

Unless you're using QTGMC for its cleaning properties, there's no reason to use it at all, and certainly not to make a 59.94fps video out of it when the true framerate is 23.976fps.

Taurus
4th April 2015, 21:30
As creaothceann said, it IVTC's perfectly using something like this:

TFM()
TDecimate()
You took the words right out of my mouth (Meat Loaf).
@manono: I really appreciate all your patience for all the years on this topic!

jriker1
5th April 2015, 00:43
Thank you folks and sorry for sending I guess incorrectly. For reference, how do I provide a VOB of just the main movie? Is there a tool to separate that out? Thought the MPG file was basically the VOB file which I thought was basically an MPEG2 container, and puts it into just a MPG labeled MPEG2 container with just the pieces of the main movie without any conversions. Maybe I'm wrong.

Anway, I have used in the past the following:


tfm(mode=5,pp=0,slow=1)
tdecimate(cycle=5)


Because someone else posted it. Is this better to use instead of the same but with no params?

Thanks.

JR

EDIT: Note when I leave pp=0 in everything still looks interlaced. have to take that command out to default to it's original setting of 6 to see a change with the above.

EDIT EDIT: I tried the above and resulting file had the same jerky output. I can try it without those params but guessing that isn't going to help.

Also when I ran this thru DGIndex to try a different way of loading the file I got at the end "A field order transition was detected" and asked if I want it corrected. Also DG says file is 29.97 interlaced.

Also trying now with MPEG2Source("VTS_01_1.d2v") directly to the VOB files and think it may be working better. Still interested in the field order message as I got this also when directly loading the VOB files in DGindex.

creaothceann
5th April 2015, 01:24
how do I provide a VOB of just the main movie? Is there a tool to separate that out?

- Cut out an M2V for upload using DGIndex.
- When working on DVD VOB files, make a D2V project file using DGIndex and open them via MPEG2Source and the DGDecode dll. It's all explained in the documents included in the DGMPGDec package.

:rolleyes: