Log in

View Full Version : Syntax for scripting VirtualDub frameserver?


fvisagie
20th September 2015, 16:52
According to the version 1.8.7 and 1.9.0 release notes (http://www.virtualdub.org/blog/pivot/entry.php?id=235) Frameserver startup is now scriptable.

However, nowhere on the VirtualDub forums or site, or elsewhere on the Internet have I been able to find the name and syntax of the script function. Any ideas?

Thanks,
François

shekh
20th September 2015, 18:47
Looks like it is this command (example):

VirtualDub.StartServer("test.avi");

fvisagie
21st September 2015, 09:53
Thanks for digging that up. It seems to work, except I found no way of creating a signpost file with this or any other function. It behaves similarly to: File.Start frame server -> Start -> Cancel - the frameserver is started with the specified frameserver name, but no signpost file is created. I haven't found any way of connecting to the frameserver running in this manner (without manually starting an identical frameserver session to create the signpost file beforehand).

Do you have any ideas for either connecting to the frameserver running without signpost file, and/or creating the signpost file from the VirtualDub script? Its syntax seems simple, but it contains NULL and other characters that will be tricky to generate from a batch file.

shekh
21st September 2015, 12:29
I have never used frameserving.. Maybe you can just create signpost file once and keep it?

raffriff42
21st September 2015, 13:16
It seems to me Script:StartServer does the same thing as File menu, Start server, namely pop up the Frameserver dialog. The string parameter seems to set the "Frameserver name" you see in the dialog.

So Script:StartServer needs human intervention whether scripted or not. You could script that intervention with something like AutoHotkey or AutoIt.

fvisagie
21st September 2015, 15:36
The string parameter seems to set the "Frameserver name" you see in the dialog.

That's how I also have it.

So Script:StartServer needs human intervention whether scripted or not. You could script that intervention with something like AutoHotkey or AutoIt.

Before starting the frameserver from the script, I hope to create its signpost file from Avisynth before opening it, thanks.

raffriff42
21st September 2015, 17:18
Won't work - sentinel must be created new each time. What needs to happen (I think) you make an AutoHotkey (http://www.autohotkey.com/) script to run (http://ahkscript.org/docs/commands/Run.htm) virtualdub.exe /s "script.vdscript"
you set up your VirtualDub source, filters etc in .vdscript
script calls StartServer()
a dialog box pops up and execution waits for your input
AutoHotKey sees the popup (http://ahkscript.org/docs/commands/WinWaitActive.htm), sends (http://ahkscript.org/docs/commands/Send.htm) an {Enter} key to click "OK," then sends your file path and {Enter} again.
Frameserving proceeds.
The AHK script would look like this:Run, C:\Program Files (x86)\VirtualDub\VirtualDub.exe /s "script.vdscript"
WinWaitActive, Frameserver
Send, {Enter}
Send, C:\Video Projects\sentinel.avi
Send, {Enter}
I can't check this right now, it's from memory :)

StainlessS
22nd September 2015, 11:27
If using AutoIt, can use MeGUI_AutoEncode_Batcher or DGIndex_Batcher as a sort of template.
Contains routines to open File Selector to select multiple files, start some external executable, and
interact with it eg switching Tabs, bring to front, send text to dialog box or file selector etc.

Auto HotKey should be just as good as AutoIt (they used to be the same project, but parted ways).

EDIT: http://forum.doom9.org/showthread.php?t=163343&highlight=megui+auto+encode+batcher

http://forum.doom9.org/showthread.php?p=1543507#post1543507

fvisagie
23rd September 2015, 09:18
:thanks:, guys.