PDA

View Full Version : Text output to disc ?


Tsui
26th August 2003, 14:30
Is there any way to write any Text to disc [instead onto the pictures] with avisynth ?

Is it possible in any future version of avisynth to implement such a feature ?

Wilbert
26th August 2003, 15:18
What kind of text (clip properties, or something entirely different)?

Tsui
26th August 2003, 22:36
I want to cgeck the field order of an avi with this function which works very well (thanks to shßdan) :


function CheckTopFirst(clip v1){
global top_hits=1
global bot_hits=1
global text = ""
global text2 = ""
v1 = assumeframebased(v1)
global tff=assumetff(v1).separatefields().bob()
global bff=assumebff(v1).separatefields().bob()
istff = tff.subtitle("Is frame TFF: TRUE").frameevaluate("top_hits=top_hits+1.0")
isnottff = tff.subtitle("Is frame TFF: FALSE").frameevaluate("bot_hits=bot_hits+1.0")
outclip = conditionalfilter(tff,istff, isnottff, "yDifferenceFromPrevious(tff)+ydifferenceToNext(tff)","<","yDifferenceFromPrevious(bff)+yDifferenceToNext(bff)",false)
outclip = frameevaluate(outclip,"text = "+chr(34)+"STATS: TFF = "+chr(34)+" + string(100.0*top_hits/(top_hits+bot_hits)) + " + chr(34) + "%"+chr(34))
outclip = frameevaluate(outclip,"text2 = "+chr(34)+"STATS: BFF = "+chr(34)+" + string(100.0*bot_hits/(top_hits+bot_hits)) + " + chr(34) + "%"+chr(34))
outclip = scriptclip(outclip, "Subtitle(text,y=50)")
outclip = scriptclip(outclip, "Subtitle(text2,y=70)")
return outclip
}




v=SegmentedAVISource("e:\capture\capture.avi")
v2=ConvertToYV12(v)
CheckTopFirst(v2)



Now I want to get a textfile with the same strings as seen in the picture like tff=true or tff=false.
The shown percentage is not needed.

Can I create an error-message myself to do that ?