Ich möchte gerne die Field Order eines interlaced Avi mit einem Avisynth-Script analysieren und das Ergebnis in ein Textfile schreiben.
Ich möchte dazu folgendes oder ein ähnliches Script benutzen :
Code
function CheckTopFirst4(clip v1){global top_hits=1global bot_hits=1global text1 = ""global text2 = ""global text3 = ""global text4 = ""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,"text1 = "+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(text1,y=50)")outclip = scriptclip(outclip, "Subtitle(text2,y=70)")text3 = string(100.0*top_hits/(top_hits+bot_hits))text4 = string(100.0*bot_hits/(top_hits+bot_hits))Call(BlankClip, "c:\Programme\Avisynth\PlugIns\2_5_x\nicecho.exe e:\capture5\report.txt " + text3 + "x" + text4 + "\n", "-2") return outclip}
Ich rufe diese Funktion mit diesem Script auf :
Das Problem ist jetzt, das in der Textdatei 'report.txt' nur 0.00000 steht, anstatt eine Liste mit den Prozentzahlen, die man auch auf dem Bildschirm sieht, was mache ich falsch ?