Any script-guru on Avisynth knows what's wrong with this (part of a) script:
ConditionalSelect(film,"
V0 = VPlaneMax(film)
V1 = VPlaneMax(film1)
V0 <= V1 ? 0 : 1",film, film1)
It should pick frame(s) from "film" if it's VplaneMax-value is smaller than "film1" else it should take "film1".
It kind of works but .... not always
Sometimes it takes the higher value clip.
Any idea's? Something wrong with the "0 : 1" ?
+ Reply to Thread
Results 1 to 5 of 5
-
-
Could you upload a very short clip (and corresponding script) which shows your problem?
-
Do you realize that VPlaneMax() is the max of the chroma V plane, not the intensity (Y plane)?
-
I took a random YV12 video file and applied this script:
Code:film = Trim(1000,2000).Subtitle("film", text_color=$ffffff) film1 = Trim(3000, 4000).Subtitle("film1", text_color=$ffffff) ConditionalSelect(film," V0 = VPlaneMax(film) V1 = VPlaneMax(film1) V0 <= V1 ? 0 : 1",film, film1) StackHorizontal(film.ColorYUV(Analyze=true), film1.ColorYUV(Analyze=true), last)
-
Thanks for responding! What I want to do is some whitebalancing/colorcorrection. I have some super8 scans but sometimes parts of it have a redish hue. Not one of the known filters (coloryuv, autobalance) is perfect however so I combined them both + the original so the result will be the frames with the lowest V-value.
This gives rather nice results:
Code:ConditionalSelect(film," V0 = VPlaneMax(film) V1 = VPlaneMax(film1) V2 = VPlaneMax(film2) V0 <= V1 && V0 <= V2 ? 0 : (V1 <= V2 ? 1 : 2)", film, film1, film2)
Thanks!
Similar Threads
-
Avisynth script help?
By PeterNL in forum Newbie / General discussionsReplies: 6Last Post: 10th Dec 2014, 11:35 -
avisynth - How to write avisynth script for rgba overlay
By moelover in forum EditingReplies: 3Last Post: 13th Apr 2014, 12:24 -
How can i Use VDub Script[.vcf] into Avisynth Script[.avs] ( Megui )
By Maskoff in forum EditingReplies: 1Last Post: 25th Jun 2013, 15:30 -
Should i use and avisynth script for Dv ?
By smartel in forum Newbie / General discussionsReplies: 0Last Post: 10th Mar 2012, 08:29 -
Need Help with My AviSynth Script
By Enkidu in forum Newbie / General discussionsReplies: 3Last Post: 21st Jan 2011, 21:37