View Full Version : QTGMC Deinterlacing Script (v3.32)
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) ...
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.
vBulletin® v3.8.11, Copyright ©2000-2026, vBulletin Solutions Inc.