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 > Video Encoding > MPEG-4 Encoder GUIs

Reply
 
Thread Tools Search this Thread Display Modes
Old 15th May 2019, 16:30   #8841  |  Link
gonca
Registered User
 
Join Date: Jul 2012
Location: Scarborough, Canada
Posts: 877
Can you post the script that was being used?
gonca is offline   Reply With Quote
Old 15th May 2019, 19:37   #8842  |  Link
wiggaz
Registered User
 
Join Date: Feb 2011
Posts: 23
Hello,
I don't wanna sound annoying but is there a reason why x265 has still not be updated to the last build?
Thanks in advance.
wiggaz is offline   Reply With Quote
Old 15th May 2019, 21:31   #8843  |  Link
LouieChuckyMerry
Registered User
 
LouieChuckyMerry's Avatar
 
Join Date: Feb 2014
Posts: 277
Quote:
Originally Posted by gonca View Post
Can you post the script that was being used?
In case you're asking me, the script is:

Code:
SOURCE INFORMATION HERE
### Deinterlace-Match Fields-Decimate ###
Function FieldMatch(Clip C) {
  Global PP = C.DuplicateFrame(0)
  Global CC = C
  Global NN = C.DeleteFrame(0)
  P2 = PP.SeparateFields()
  C2 = CC.SeparateFields()
  N2 = NN.SeparateFields()
  Global PC = Interleave(P2.SelectEven(),C2.SelectOdd()).Weave()
  Global CP = Interleave(C2.SelectEven(),P2.SelectOdd()).Weave()
  Global CN = Interleave(C2.SelectEven(),N2.SelectOdd()).Weave()
  Global NC = Interleave(N2.SelectEven(),C2.SelectOdd()).Weave()
  Global Deint = QTGMC(CC).SelectEven()
  Return ScriptClip(CC, \
    "!CC.IsCombedTIVTC(CThresh=12,Chroma=True,BlockX=16,BlockY=32) ? CC : " + \
    "!NN.IsCombedTIVTC(CThresh=12,Chroma=True,BlockX=16,BlockY=32) ? NN : " + \
    "!CN.IsCombedTIVTC(CThresh=12,Chroma=True,BlockX=16,BlockY=32) ? CN : " + \
    "!NC.IsCombedTIVTC(CThresh=12,Chroma=True,BlockX=16,BlockY=32) ? NC : " + \
    "!PP.IsCombedTIVTC(CThresh=12,Chroma=True,BlockX=16,BlockY=32) ? PP : " + \
    "!CP.IsCombedTIVTC(CThresh=12,Chroma=True,BlockX=16,BlockY=32) ? CP : " + \
    "!PC.IsCombedTIVTC(CThresh=12,Chroma=True,BlockX=16,BlockY=32) ? PC : Deint")
}
TFM(Order=-1,Mode=5,PP=2,Clip2=FieldMatch(),Slow=2,MChroma=False,Ubsco=False,CThresh=12,Chroma=True)
TDecimate(Mode=1)
### Fix Line-Doubled Fields ###
NNEDI3(Field=-2)
Merge(SelectEven(),SelectOdd())
### Color Conversion ###
ColorMatrix(Mode="Rec.601->Rec.709")
### Adjust Color ###
MergeChroma(aWarpSharp2(Depth=16))
### Crop ###
Crop(8,0,-8,0)
### Gibbs Noise Block ###
Edge=MT_Edge("prewitt",ThY1=20,ThY2=40).RemoveGrain(17)
Mask=MT_Logic(Edge.MT_Expand().MT_Expand().MT_Expand().MT_Expand(),Edge.MT_Inflate().MT_Inpand(),"xor").Blur(1.0)
MT_Merge(Minblur(),Mask,Luma=True)
### Resize ###
NNEDI3_RPow2(4,CShift="Spline64Resize",FWidth=960,FHeight=720)
aWarpSharp2(Depth=5)
Sharpen(0.2)
### Overall Temporal Denoise ###
SMDegrain(TR=3,ThSAD=600,ContraSharp=True,RefineMotion=True,Plane=0,PreFilter=2,Chroma=False,LSB=True,LSB_Out=True)
### Darken-Thin Lines ###
F=DitherPost(Mode=-1)
S=F.FastLineDarkenMod(Strength=24,Prot=6).aWarpSharp2(Blur=4,Type=1,Depth=8,Chroma=2)
D=MT_MakeDiff(S,F).Dither_Convert_8_To_16()
Dither_Add16(Last,D,Dif=True,U=2,V=2)
### Deband ###
F3KDB(Y=100,Cb=100,Cr=100,GrainY=1,GrainC=1,Input_Mode=1,Output_Depth=16)
## Trim()
# SelectRangeEvery(1000,66)
ConvertFromStacked.ConvertBits(10,Dither=0)
Prefetch(3)
Other than adding the Color Conversion line, modifying the Resize section to upscale the video, and improving the Deband line, I used the exact script some years ago without issue to encode my NTSC Simpsons DVD's. Now, although the script ran fine, it left:

Code:
Script error: Invalid arguments to function 'IsCombedTIVTC'
([ScriptClip], line 1)
superimposed at the top, center of a few frames. I'm certain it didn't do this with the original encodes because I've watched all the episodes multiple times and never saw this error message. The originals were encoded with SEt's AviSynth MT so I'm wondering if it's something with AviSynth+.

Last edited by LouieChuckyMerry; 15th May 2019 at 21:32. Reason: Syntax
LouieChuckyMerry is offline   Reply With Quote
Old 15th May 2019, 22:16   #8844  |  Link
gonca
Registered User
 
Join Date: Jul 2012
Location: Scarborough, Canada
Posts: 877
I can't see anything wrong
You are using 32 bit Megui?
I can't test right now due to a hardware meltdown
Still rebuilding after finding which Ram dimm failed
gonca is offline   Reply With Quote
Old 15th May 2019, 23:13   #8845  |  Link
LouieChuckyMerry
Registered User
 
LouieChuckyMerry's Avatar
 
Join Date: Feb 2014
Posts: 277
Quote:
Originally Posted by gonca View Post
I can't see anything wrong
You are using 32 bit Megui?
I can't test right now due to a hardware meltdown
Still rebuilding after finding which Ram dimm failed
Yes, 32 bit MeGUI. Any way to turn off error messages in AviSynth+?
LouieChuckyMerry is offline   Reply With Quote
Old 16th May 2019, 07:25   #8846  |  Link
LigH
German doom9/Gleitz SuMo
 
LigH's Avatar
 
Join Date: Oct 2001
Location: Germany, rural Altmark
Posts: 5,827
I wonder if this issue is better addressed to AviSynth+ developers to check the parser handling complex "eval" function parameters across several lines. Maybe point pinterf at this post.
__________________

New German Gleitz board
MediaFire: x264 | x265 | VPx | AOM | Xvid
LigH is offline   Reply With Quote
Old 16th May 2019, 13:19   #8847  |  Link
LouieChuckyMerry
Registered User
 
LouieChuckyMerry's Avatar
 
Join Date: Feb 2014
Posts: 277
Quote:
Originally Posted by LigH View Post
I wonder if this issue is better addressed to AviSynth+ developers to check the parser handling complex "eval" function parameters across several lines. Maybe point pinterf at this post.
Thanks, LigH. I'll copy-and-paste my question in the AviSynth+ thread. Hopefully I'll receive an answer.
LouieChuckyMerry is offline   Reply With Quote
Old 16th May 2019, 16:45   #8848  |  Link
StainlessS
HeartlessS Usurer
 
StainlessS's Avatar
 
Join Date: Dec 2009
Location: Over the rainbow
Posts: 6,571
LouieChuckyMerry,
Which Minblur() are you using ?
(the one on wiki requires at least one Int arg [ function MinBlur(clip clp, int r, int "uv") ]

You cannot just make the error go away, the error causing it must be fixed.
Also, best if you link to your script in Avisynth devs forum post. (I dont see anything wrong in the FieldMatch function).

Here a mod of the FieldMatch function, maybe it makes problem go away [Removes Globals, requires Grunt].

Code:
Function FieldMatch(Clip c) {
    PP = c.DuplicateFrame(0)
    CC = c
    NN = c.DeleteFrame(0)
    P2 = PP.SeparateFields
    C2 = CC.SeparateFields
    N2 = NN.SeparateFields
    PC = Interleave(P2.SelectEven,C2.SelectOdd).Weave
    CP = Interleave(C2.SelectEven,P2.SelectOdd).Weave
    CN = Interleave(C2.SelectEven,N2.SelectOdd).Weave
    NC = Interleave(N2.SelectEven,C2.SelectOdd).Weave
    Deint = CC.QTGMC.SelectEven
    SSS="""
        \   !CC.IsCombedTIVTC(CThresh=12,Chroma=True,BlockX=16,BlockY=32) ? CC
        \ : !NN.IsCombedTIVTC(CThresh=12,Chroma=True,BlockX=16,BlockY=32) ? NN
        \ : !CN.IsCombedTIVTC(CThresh=12,Chroma=True,BlockX=16,BlockY=32) ? CN
        \ : !NC.IsCombedTIVTC(CThresh=12,Chroma=True,BlockX=16,BlockY=32) ? NC
        \ : !PP.IsCombedTIVTC(CThresh=12,Chroma=True,BlockX=16,BlockY=32) ? PP
        \ : !CP.IsCombedTIVTC(CThresh=12,Chroma=True,BlockX=16,BlockY=32) ? CP
        \ : !PC.IsCombedTIVTC(CThresh=12,Chroma=True,BlockX=16,BlockY=32) ? PC
        \ : Deint
    """
    Args="CC,NN,CN,NC,PP,CP,PC,Deint"
    Return CC.GScriptClip(SSS,Args=Args,Local=True)
}
__________________
I sometimes post sober.
StainlessS@MediaFire ::: AND/OR ::: StainlessS@SendSpace

"Some infinities are bigger than other infinities", but how many of them are infinitely bigger ???

Last edited by StainlessS; 16th May 2019 at 16:47.
StainlessS is offline   Reply With Quote
Old 16th May 2019, 23:42   #8849  |  Link
LouieChuckyMerry
Registered User
 
LouieChuckyMerry's Avatar
 
Join Date: Feb 2014
Posts: 277
Quote:
Originally Posted by StainlessS View Post
You cannot just make the error go away, the error causing it must be fixed... (I dont see anything wrong in the FieldMatch function).
Thanks for the mental push, StainlessS (I hope you're not offended, but every time I read one of your posts I hear John DiMaggio's voice as Bender in Futurama, a combination of your avatar and signature). As I was editing a copy of the original script to test your modification, I realized the only real change I'd made to the original script, a script that worked just fine some years ago, was to add "PreFetch(3)" to the end. While searching how to upgrade from SEt's AviSynth MT to pinterf's AviSynth+ I decided that starting a script with "SetFilterMTMode("Default_MT_Mode",2)" and ending with PreFetch(X) was a bad idea for interlaced video; however, I accidentally learned that adding "PreFetch(X)" to the end of a script for interlaced video improved the encoding speed. Long story short, a couple tests later and the cause of the AviSynth+ error message was "PreFetch(X)" at the end of the script. I guess the moral is Don't MultiThread Interlaced Video No Matter Which Version Of AviSynth You Use. I'll now hustle over to the AviSynth+ thread with this knowledge, thanks again for your help .
LouieChuckyMerry is offline   Reply With Quote
Old 17th May 2019, 14:43   #8850  |  Link
StainlessS
HeartlessS Usurer
 
StainlessS's Avatar
 
Join Date: Dec 2009
Location: Over the rainbow
Posts: 6,571
Glad you got it sorted, but might be a good idea just the same to use the FiledMatch without Globals (globals could have been cause, QTGMC uses Globals I think, and maybe
other scripts functions, if they used same global var name then can interfere with each other and be cause of the 'Invalid arguments' if interfering globals were of wrong type).
__________________
I sometimes post sober.
StainlessS@MediaFire ::: AND/OR ::: StainlessS@SendSpace

"Some infinities are bigger than other infinities", but how many of them are infinitely bigger ???
StainlessS is offline   Reply With Quote
Old 17th May 2019, 20:59   #8851  |  Link
LouieChuckyMerry
Registered User
 
LouieChuckyMerry's Avatar
 
Join Date: Feb 2014
Posts: 277
But it's 3% faster with the globals! Seriously, thanks for the advice. I'll edit my script accordingly. Oh, and Happy Friday!
LouieChuckyMerry is offline   Reply With Quote
Reply

Tags
megui

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 19:05.


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