Log in

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


Pages : 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 [29] 30 31 32 33 34 35 36 37 38 39 40 41

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