Welcome to Doom9's Forum, THE in-place to be for everyone interested in DVD conversion.

Before you start posting please read the forum rules. By posting to this forum you agree to abide by the rules.

 

Go Back   Doom9's Forum > Capturing and Editing Video > Avisynth Usage

Closed Thread
 
Thread Tools Search this Thread Display Modes
Old 15th February 2011, 16:49   #301  |  Link
-Vit-
Registered User
 
Join Date: Jul 2010
Posts: 448
Of course, you're supposed to use mt_masktools-25.dll for 2.58MT. But I've heard this story before, the other way round - needed to use mt_xx-25.dll when using 2.6MT. There's only one rule to get best MT avisynth stability - try every version of everything.

I assume you've tweaked the thread counts. I often find > 8 is best for SetMTMode at "Slow" (I use as high as 14 in some cases), and recently I've noticed better results with EdiThreads lower (4 or less). However, these values will likely vary widely with different systems.

The output resolution is a little unusual (5:3), but I can't tell you what is correct though - depends on the source and how you intend to encode it / what you are using it for.
-Vit- is offline  
Old 15th February 2011, 17:42   #302  |  Link
@MeGui
Registered User
 
Join Date: Apr 2008
Posts: 39
Quote:
Originally Posted by -Vit- View Post

The output resolution is a little unusual (5:3), but I can't tell you what is correct though - depends on the source and how you intend to encode it / what you are using it for.
Then what res. should i use to get nice 16:9 as final PAL video?

This is my input:

Video
ID : 0
Format : DV
Format_Commercial_IfAny : DVCPRO
Codec ID : dvsd
Codec ID/Hint : Sony
Duration : 46s 320ms
Bit rate mode : Constant
Bit rate : 24.4 Mbps
Width : 720 pixels
Height : 576 pixels
Display aspect ratio : 4:3
Frame rate mode : Constant
Frame rate : 25.000 fps
Standard : PAL
Color space : YUV
Chroma subsampling : 4:2:0
Bit depth : 8 bits
Scan type : Interlaced
Compression mode : Lossy
Bits/(Pixel*Frame) : 2.357
Stream size : 159 MiB (95%)
Encoding settings : wb mode= / white balance= / fcm=auto focus

Should i add SelectEven()?

p.s. i'll keep current treads..works nice so far ))

Tnx again mate
@MeGui is offline  
Old 15th February 2011, 17:50   #303  |  Link
pokazene_maslo
Registered User
 
Join Date: Apr 2009
Location: Martin, Slovakia
Posts: 79
Do you have any ETA when will be chroma planes denoising supported?
pokazene_maslo is offline  
Old 15th February 2011, 19:04   #304  |  Link
sadie
Registered User
 
Join Date: Sep 2006
Posts: 55
I've uploaded that miserable little 3 second clip.
http://rapidshare.com/files/448099289/Arg.avi

Yesterday I got the error with a sourcematch 25p test, so there goes that theory down the drain. I will try your new update tonight along with newly installed setMT. SetMTmode (5,4)>DirectShowSource>SetMtmode (2,4) sound OK for my core duo? Or perhaps down a notch. Since x264 has its own multi-thread settings I've wondered if there might be some interference going on there? Or should I even just go back to standard two-pass mode and forget about CRF. Lossless will have to wait for the next project and new hard disk.

I also want to reiterate that when my bug rears its head, it can just as easily disappear in the next sequence if there's adequate movement going on. I believe that Didee even mentioned straight out somewhere on this thread that TGMC wasn't ever made for static scenes? Or is that to be nuanced?
sadie is offline  
Old 15th February 2011, 19:09   #305  |  Link
-Vit-
Registered User
 
Join Date: Jul 2010
Posts: 448
@@Megui: I'm sure there are many threads here about resizing. I work with NTSC material, SD at 720x480. I don't resize, instead encode as anamorphic 16:9 and let the player do the resizing. This keeps the original detail and doesn't bloat the final encode size, but relies on the player's resizers. I imagine a similar process would would work for you, but you'll have to find out for yourself. If you really want to explicitly resize, then 1024x576 would lose no vertical detail, but the encode will be somewhat larger.

Use SelectEven if you want a 25fps result. It's close to film rate and some people prefer that look. It can make for a smaller and quicker encode than 50fps. However, a 25fps result can look juddery depending on the source. You could use the new motion blur feature to help with that (in which case you don't use SelectEven, you set FPSDivisor=2 in QTGMC, along with the motion blur settings). Motion blur will slow the encode, but might reduce filesize a little.
____

@pokazene_maslo: Chroma/pixel format features are next on my list (as long as I don't go off on a whim as I just did with the motion blur). But currently I'm looking at Avisynth itself, in particular the caching, which is starting to become a serious stability problem with more complex settings. I'm also busy with several other projects. So I don't currently have an ETA, although I am quite active with QTGMC at the moment...

Last edited by -Vit-; 15th February 2011 at 19:19.
-Vit- is offline  
Old 15th February 2011, 19:15   #306  |  Link
-Vit-
Registered User
 
Join Date: Jul 2010
Posts: 448
@sadie: DirectShowSource: Can be problematic, could explain any number of ills. I've seen strange ghosting with it sometimes. Try FFVideoSource?

EDIT: This might be a source filter issue. Comparing DirectShowSource to FFVideoSource on this vid, no other processing. FFVideoSource shows some horizontal lines - under the fountain and red mark in the first 4 or 5 frames, DirectShow has some flickering in that bright area but nothing so problematic. However, that was all. [DSS2 matches DirectShowSource, but it got the parity wrong and I had to use ConvertToYV12 - is there a DSS2 setting to set a preferred pixel format?]

Encoded both directly to MKV and via lossless, no other visual issues apart from that odd difference despite running several versions testing source accuracy. As expected, the most accurate to the source was:
Code:
QuickTGMC( Preset="Slower", SourceMatch=3, Lossless=2, Sharpness=0.1 )
EDIT2: Here's the result from the above line (x264 in MKV).

[I've reupped a cleaner version done with new v3.11]. I went for source accuracy. Everything was done with 10 main threads and 4 EdiThreads.

Last edited by -Vit-; 16th February 2011 at 06:40.
-Vit- is offline  
Old 16th February 2011, 00:23   #307  |  Link
wOxxOm
Oz of the zOo
 
Join Date: May 2005
Posts: 205
I wonder how do I set qtgmc parameters to avoid ugly artefacts in static fades from/to black like these: qtgmc vs daa - changing Preset or SourceMatch=1/2/3 do not help...

Last edited by wOxxOm; 16th February 2011 at 00:26.
wOxxOm is offline  
Old 16th February 2011, 00:53   #308  |  Link
Didée
Registered User
 
Join Date: Apr 2002
Location: Germany
Posts: 5,390
Post your script. It's not clear what exactly you are doing there. In particular, since it seems you're actually doing IVTC ....

Fades generally are problematic. As far as MVTools are concerned, try different DCT modes - they can help to get better matches. (For some fun, try blocksize 16 together with DCT 1. No, nothing is broken ... it *IS* *THAT* slow. Really.)
But even then, it's still a fade ...
__________________
- We´re at the beginning of the end of mankind´s childhood -

My little flickr gallery. (Yes indeed, I do have hobbies other than digital video!)
Didée is offline  
Old 16th February 2011, 01:07   #309  |  Link
wOxxOm
Oz of the zOo
 
Join Date: May 2005
Posts: 205
IVTC(TFM) is a nonfactor here, it was used for debugging purposes, the script is plain simple:
Code:
DGDecode_mpeg2source("dvd1.d2v",info=3)
QTGMC( preset="very slow", SourceMatch=3 ).selectEven()
I've tried blocksize=16 & dct=1 (it was sloooooow) - slightly better (picture was kinda posterized/banded but without previously seen ghosting/blending artefacts), anyway it is far from being as clean as daa(), then avisynth hanged when I added sourcematch=3. Seems like I have to find manually every little fade throughout the whole movie.

Last edited by wOxxOm; 16th February 2011 at 01:20.
wOxxOm is offline  
Old 16th February 2011, 01:35   #310  |  Link
Didée
Registered User
 
Join Date: Apr 2002
Location: Germany
Posts: 5,390
Darn fades. Well ... if it was about TGMC, you could set low SAD thresholds like thSAD1=64,thSAD2=32, which probably would solve the problem. In QTGMC, those aren't exposed anymore.

May I ask what you're trying to achive, at all? For most Anime-content scenarios, Q/TGMC isn't the most-suited-filter-of-all, anyway.
__________________
- We´re at the beginning of the end of mankind´s childhood -

My little flickr gallery. (Yes indeed, I do have hobbies other than digital video!)
Didée is offline  
Old 16th February 2011, 03:00   #311  |  Link
DVDBob
Registered User
 
Join Date: May 2010
Posts: 120
Which interlace method, can this filter deinterlace??
DVDBob is offline  
Old 16th February 2011, 06:06   #312  |  Link
-Vit-
Registered User
 
Join Date: Jul 2010
Posts: 448
Oops... I introduced a nasty bug in v3.05. The final couple of core algorithm stages were being skipped over including the final smooth, which left the output noisy. Fixed in the OP (v3.11). If you have version 3.05 or 3.10, you really need to update to v3.11 as it was a serious bug. Sorry for the inconvenience.

Dunno if that was partly causing wOxxOm's problem (although Didée's points still hold regardless). Don't think it caused sadie's smears, the bug caused noise.
____

Given the above posts, I have allowed control over thSAD1, thSAD2, thSCD1 and thSCD2 (which are the same as TempGaussMC_beta2):
- ThSAD1/2 control how willing the temporal smooths are to blend with the neighbor frames. Increasing these values will increase smoothness, but can also can cause blurring or smearing. Conversely, reducing these values can reduce ghosting, or the blurring of high-speed temporal changes, but may leave shimmer or noise. In any case, they should be used rarely, and ThSAD2 is safer to use than ThSAD1.
- ThSCD1/2 control scene change detection. Again only change them if you must (read the MVTools documentation for details).

Code:
QTGMC( Preset="Slower", TR2=2, ThSAD2=400 ) # Smoother but might smear...
Defaults are: ThSAD1=640, ThSAD2=256, ThSCD1=180, ThSCD2=98
____

DVDBob: I'm not sure I understand, what other interlacing methods are there?

Last edited by -Vit-; 16th February 2011 at 06:42.
-Vit- is offline  
Old 16th February 2011, 08:22   #313  |  Link
SubJunk
Registered User
 
Join Date: Jun 2010
Posts: 441
Hi -Vit-, thanks so much for this script! It is really great.
Also thanks for keeping it updated.
I have what is hopefully a quick question

I have an interlaced video at 706x480 which I want to resize to 706x528.
I've noticed that doing the resize before calling QTGMC produces better results than afterwards (it is a cartoon, so some of the lines connect up better this way) but then there are fat horizontal lines every 5 frames which aren't there if I resize after QTGMC (I attached a screenshot to show it)
I did of course expect that something wrong would happen if I resized it beforehand but I was curious if the interpolation would like the extra resolution - which it did.

So my question is: Is there somewhere I can put the resize line in your script so it will work properly?

The script I used for that screenshot is (with irrelevant things removed for clarity):

Code:
PointResize(706,528)
QTGMC()
Attached Images
 

Last edited by SubJunk; 16th February 2011 at 08:27.
SubJunk is offline  
Old 16th February 2011, 10:06   #314  |  Link
kypec
User of free A/V tools
 
kypec's Avatar
 
Join Date: Jul 2006
Location: SK
Posts: 820
Quote:
Originally Posted by SubJunk View Post
I have an interlaced video at 706x480 which I want to resize to 706x528.
Code:
PointResize(706,528)
QTGMC()
Changing vertical resolution before the frame(s) were deinterlaced is plainly wrong. No deinterlacer can reliably re-construct the frame that had its fields resized vertically. Period.
kypec is offline  
Old 16th February 2011, 10:30   #315  |  Link
wOxxOm
Oz of the zOo
 
Join Date: May 2005
Posts: 205
Quote:
Originally Posted by Didée View Post
For most Anime-content scenarios, Q/TGMC isn't the most-suited-filter-of-all, anyway.
I always use it as clip2 for tfm with pp=4, and sometimes for scrolling credits without tfm.
wOxxOm is offline  
Old 16th February 2011, 10:49   #316  |  Link
SubJunk
Registered User
 
Join Date: Jun 2010
Posts: 441
Quote:
Originally Posted by kypec View Post
Changing vertical resolution before the frame(s) were deinterlaced is plainly wrong. No deinterlacer can reliably re-construct the frame that had its fields resized vertically. Period.
Maybe you should read the whole post before replying

Quote:
Originally Posted by SubJunk View Post
I did of course expect that something wrong would happen if I resized it beforehand [...] Is there somewhere I can put the resize line in your script so it will work properly?

Last edited by SubJunk; 16th February 2011 at 10:51. Reason: Clarified in case he misses it again
SubJunk is offline  
Old 16th February 2011, 11:16   #317  |  Link
Gavino
Avisynth language lover
 
Join Date: Dec 2007
Location: Spain
Posts: 3,376
Any vertical resizing must be done after deinterlacing.
Why are you using PointResize? That is almost bound to introduce artifacts.
__________________
GScript and GRunT - complex Avisynth scripting made easier
Gavino is offline  
Old 16th February 2011, 11:30   #318  |  Link
SubJunk
Registered User
 
Join Date: Jun 2010
Posts: 441
I was using Spline36Resize but I changed it in the post to the most simple one in order to avoid comments about which resizing filter is better
I obviously worded my first post in a confusing way, I'll try again. Hopefully this is clearer:


Hi -Vit-, thanks so much for this script! It is really great.
Also thanks for keeping it updated.
I have what is hopefully a quick question

I have an interlaced video at 706x480 which I want to resize to 706x528.
I've noticed that doing the resize before calling QTGMC produces better results than afterwards (it is a cartoon, so some of the lines connect up better this way) but then there are fat horizontal lines every 5 frames which aren't there if I resize after QTGMC (screenshot here)
I did of course expect that something wrong would happen if I resized it before the deinterlacing but I was curious if the interpolation would like the extra resolution - which it did.

So my question is:
Is there somewhere I can add a resize line to your script - after deinterlacing but before the interpolation and postproc - so it will work properly?

The script I used for that screenshot is (with irrelevant things removed for clarity):

Code:
Spline36Resize(706,528)
QTGMC()
SubJunk is offline  
Old 16th February 2011, 12:26   #319  |  Link
Gavino
Avisynth language lover
 
Join Date: Dec 2007
Location: Spain
Posts: 3,376
Are you sure your source is really interlaced?
A glitch every 5 frames suggests that it is telecine material and should be IVTC'd rather than deinterlaced.
__________________
GScript and GRunT - complex Avisynth scripting made easier
Gavino is offline  
Old 16th February 2011, 12:57   #320  |  Link
DVDBob
Registered User
 
Join Date: May 2010
Posts: 120
Quote:
Originally Posted by -Vit- View Post
Oops... I introduced a nasty bug in v3.05. The final couple of core algorithm stages were being skipped over including the final smooth, which left the output noisy. Fixed in the OP (v3.11). If you have version 3.05 or 3.10, you really need to update to v3.11 as it was a serious bug. Sorry for the inconvenience.

Dunno if that was partly causing wOxxOm's problem (although Didée's points still hold regardless). Don't think it caused sadie's smears, the bug caused noise.
____

Given the above posts, I have allowed control over thSAD1, thSAD2, thSCD1 and thSCD2 (which are the same as TempGaussMC_beta2):
- ThSAD1/2 control how willing the temporal smooths are to blend with the neighbor frames. Increasing these values will increase smoothness, but can also can cause blurring or smearing. Conversely, reducing these values can reduce ghosting, or the blurring of high-speed temporal changes, but may leave shimmer or noise. In any case, they should be used rarely, and ThSAD2 is safer to use than ThSAD1.
- ThSCD1/2 control scene change detection. Again only change them if you must (read the MVTools documentation for details).

Code:
QTGMC( Preset="Slower", TR2=2, ThSAD2=400 ) # Smoother but might smear...
Defaults are: ThSAD1=640, ThSAD2=256, ThSCD1=180, ThSCD2=98
____

DVDBob: I'm not sure I understand, what other interlacing methods are there?
What I mean is that there are some movies that are just interlaced, other films are partially interlaced, hybrid interlaced etc.
DVDBob is offline  
Closed Thread

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT +1. The time now is 04:10.


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