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

Reply
 
Thread Tools Search this Thread Display Modes
Old 2nd February 2021, 00:06   #61  |  Link
Danette
Registered User
 
Join Date: Apr 2013
Posts: 260
Yet another request:

Can the text lines showing up as “No Combing” be removed? They don’t indicate moire/combing, but add to the number of frames.

When I try to do it, it throws off syntax errors. I guess there is some conditional intertwining and some of the symbols, e.g.; “: \” are befuddling me.
Danette is offline   Reply With Quote
Old 2nd February 2021, 01:49   #62  |  Link
StainlessS
HeartlessS Usurer
 
StainlessS's Avatar
 
Join Date: Dec 2009
Location: Over the rainbow
Posts: 9,000
I have not really looked at it but suspect you only need call it with All=false.
__________________
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 4th February 2021, 05:46   #63  |  Link
Danette
Registered User
 
Join Date: Apr 2013
Posts: 260
In addition to asking if the script adjustment that would eliminate the “No combing” lines can be done, I am reporting some odd behavior with VDub2 and running the “FindCombingRed” function, although I suspect that it is a flaw in VDub2.

When I run a single avs file through VDub2’s “Run video analysis pass”, the results are as expected. However, when I try to load these avs files into VDub2’s “Queue batch operation”, specifying “Run video analysis pass”, the resulting text files all have a doubled “Frame count” line at the end, instead of just the one “Frame count” line that should be there. Additionally, some files result in empty text files with batch mode, but are fully populated when run alone, outside the batch process.

Is this a flaw in VDub2, or is it somehow related to the script? Remember: the avs files run perfectly when fed through VDub2 one at a time. If you think it’s VDub2, I’ll post over there.

Last edited by Danette; 4th February 2021 at 05:49.
Danette is offline   Reply With Quote
Old 4th February 2021, 05:58   #64  |  Link
poisondeathray
Registered User
 
Join Date: Sep 2007
Posts: 4,530
Quote:
Originally Posted by Danette View Post
In addition to asking if the script adjustment that would eliminate the “No combing” lines can be done, I am reporting some odd behavior with VDub2 and running the “FindCombingRed” function, although I suspect that it is a flaw in VDub2.

When I run a single avs file through VDub2’s “Run video analysis pass”, the results are as expected. However, when I try to load these avs files into VDub2’s “Queue batch operation”, specifying “Run video analysis pass”, the resulting text files all have a doubled “Frame count” line at the end, instead of just the one “Frame count” line that should be there. Additionally, some files result in empty text files with batch mode, but are fully populated when run alone, outside the batch process.

Is this a flaw in VDub2, or is it somehow related to the script? Remember: the avs files run perfectly when fed through VDub2 one at a time. If you think it’s VDub2, I’ll post over there.


SS mentioned it opened a few times in vdub2, probably a few more when you queue it



Why not use batch avsr64 for the "analysis" pass. It will be faster than vdub for each run, also you don't have to queue them one by one - that ends up being much faster and less tedious

Code:
for %a in ("*.avs") do avsr64 "%a"
poisondeathray is offline   Reply With Quote
Old 4th February 2021, 22:11   #65  |  Link
StainlessS
HeartlessS Usurer
 
StainlessS's Avatar
 
Join Date: Dec 2009
Location: Over the rainbow
Posts: 9,000
Groucho is the man:- https://forum.doom9.org/showthread.php?t=173259
[But zeppo was better]

EDIT: Down link at top of page.

EDIT: This was in answer to Danette asking where avsr64 was. The post seems to have disappeared.
__________________
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; 4th February 2021 at 23:15.
StainlessS is offline   Reply With Quote
Old 4th February 2021, 23:38   #66  |  Link
Danette
Registered User
 
Join Date: Apr 2013
Posts: 260
Quote:
Originally Posted by poisondeathray View Post
SS mentioned it opened a few times in vdub2, probably a few more when you queue it



Why not use batch avsr64 for the "analysis" pass. It will be faster than vdub for each run, also you don't have to queue them one by one - that ends up being much faster and less tedious

Code:
for %a in ("*.avs") do avsr64 "%a"
Wow - ZOOM - it is quite a bit faster than VDub! Thanks for pointing me to that.

Incidentally, the bug I mentioned does seem to be specific to VDub2. I ran the batch function in my old VDub, v1.10.4, and it performed flawlessly.
Danette is offline   Reply With Quote
Old 6th February 2021, 23:43   #67  |  Link
hello_hello
Registered User
 
Join Date: Mar 2011
Posts: 4,459
Quote:
Originally Posted by Danette View Post
Yet another request:

Can the text lines showing up as “No Combing” be removed? They don’t indicate moire/combing, but add to the number of frames.

When I try to do it, it throws off syntax errors. I guess there is some conditional intertwining and some of the symbols, e.g.; “: \” are befuddling me.
From the avisynth Wiki:
http://avisynth.nl/index.php/Operators
b = (a==true) ? 1 : 2
means
if (a==true) then b=1 else b=2
Although you can abbreviate it further, assuming "a" is either true or false.
b = a ? 1 : 2

For
b = (a==false) ? 1 : 2
it'd be
b = !a ? 1 : 2

" \ " is simply a line break. It can only occur at the end of a line, or before any text at the beginning of a line.
So you can do this sort of thing to make long lines readable.

Code:
b = a ? 1 : \
2

  b = 
\ a ? 1 : 2
Anyway...

FindRed()

Code:
# ===============================================================================

function FindRed(clip Vid, bool "Append", string "FileName", bool "All", bool "Write")  {

Append = default(Append, false)
FileName = default(FileName, "")
All = default(All, false)
Write = default(Write, true)

N = ScriptFile()
LN = LCase(N)
NLen = StrLen(N)
ELen = FindStr(LN, ".avs") - 1
File_Name = LeftStr(N, NLen-(NLen-ELen))
FName = (FileName == "") ? File_Name : FileName
File = FName + "_Red.txt"
Vid = Vid.GreyScale()
CombTest = BlankClip(Vid, Color=color_red)
Vid = Vid.TFM(Clip2=CombTest).TDecimate()
global Everything = All

Out = FrameEvaluate(Vid, """

  IsRed = (AverageChromaV() > 128)
  IsEnd = (FrameCount() == (current_frame + 1))

  WriteThis = \
  (!IsRed && !Everything ? "" : string(current_frame)) + \
  (!IsRed ? "" : string(AverageChromaV()-128, "  -  %.2f")) + \
  (!IsEnd ? "" : (!IsRed && !Everything ? "" : chr(10)) + string(FrameCount(), "%.0f  -  Frame Count"))

""")

Out = !Write ? Vid : \
!All ? WriteFileIf(Out, File, "IsRed || IsEnd", "WriteThis", Append=Append) : \
WriteFile(Out, File, "WriteThis", Append=Append)

return Out  }

# ===============================================================================
Code:
73  -  30.60
75  -  24.92
76  -  112.00
77  -  26.79
79  -  28.62
80  -  112.00
81  -  34.56
92  -  14.91
93  -  16.27
162  -  42.75
163  -  112.00
164  -  35.61
208  -  Frame Count
If you want nothing aside from frame numbers:

Code:
  WriteThis = \
  (!IsRed && !Everything ? "" : string(current_frame)) + \
  (!IsEnd ? "" : (!IsRed && !Everything ? "" : chr(10)) + string(FrameCount(), "%.0f"))
Although you can't use All=true because it'll write every frame number without indicating if it contains red.

Code:
73
75
76
77
79
80
81
92
93
162
163
164
208

Last edited by hello_hello; 7th February 2021 at 00:29.
hello_hello is offline   Reply With Quote
Reply

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 12:35.


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