View Full Version : Log values into a file
piscator
2nd October 2003, 17:30
Seems a rather obvious thing to do, but couldn't find an answer so far.
I want to output a few values of a rather complex calculation to a text-file. It seems not possible with any of the standard functions documented on http://www.avisynth.org/index.php?page=ScriptFunctions.
thanks,
Piscator
KpeX
2nd October 2003, 17:39
It's not the easiest, but the only way I know of to create such a log is with Nic's Call plugin and the included NicEcho.exe, there's a good example in the included readme IIRC. Here's the thread: http://forum.doom9.org/showthread.php?s=&threadid=46506
hth,
piscator
2nd October 2003, 17:55
I already expected I would need a filter/plugin for that. This should work. Thanks for the quick response and the link.
greetz,
Piscator
WarpEnterprises
3rd October 2003, 13:27
I made a plugin only for that task.
Details are in the readme.
There are two functions in there:
Write()
and (a modified)
String(variable, format)
http://www.avisynth.org/users/warpenterprises/files/chr_25_dll_20030920.zip
Version.FadeIn(50).ConvertToYV12 # ein test-video
# print the frame number, time and AverageLuma for that frame
# Chr(34) is necessary to get the quotes in the String
Write(last, filename, "current_frame", "time(" + chr(34) + " %H:%M:%S " + chr(34) + ")", "AverageLuma")
Attention: don't use the clip which is fed in the Write() into AverageLuma after the Write, it get's somehow recursive and crahes.
Use a temporary variable instead.
Example for formatting with String:
String(1.23, "%f") '1.23'
String(1.23, "%5.1f") ' 1.2'
String(1.23, "%1.3f") '1.230'
piscator
3rd October 2003, 20:13
Great, that's exactly what I'm looking for :)
thanks,
Piscator
DDogg
4th October 2003, 03:18
This is brilliant, WarpEnterprises. It seems extremely well thought out. FYI, the readme shows a write.dll, but I see now you have added that into a new chr.dll.
WarpEnterprises
4th October 2003, 21:55
...you are right, there is no WRITE.DLL, I updated the docs.
Please report any success / failures.
I was trying to use variables together with FrameEvaluate but it seems I haven't understood that fully - it is always one step behind, regardless where I put the Write().
vBulletin® v3.8.11, Copyright ©2000-2026, vBulletin Solutions Inc.