View Full Version : How to feed VD2 with a frame server?
nji
30th March 2025, 13:48
For special purposes I made several programs (using e.g. OpenCV).
Sometimes interactive manipulation is necessary afterwards
- for that I use VD2 (or ADM).
The interface?
Up to now I export lossless (huge) results from my programs.
Now the idea rose to me to do that without that intermediate step,
but to feed VD2's frameserver.
I never used that... so my question:
Is it to possible to add a frame client for that in my programs (mingw)?
And I would use VD2's API for that?
How would the code look like/ where do I find informations about it?
https://github.com/shekh/VirtualDub2/wiki/index
https://www.virtualdub.org/docs_frameserver.html
don't provide information on it.
TIA
StainlessS
30th March 2025, 18:52
I dont have much to add (aint used VD fileserver for well more than a decade, and then only with TmpGenc).
Maybe you missed the section in "VirtualDub.chm" in main VD folder {Processing/FrameServer/}.
Also, I tend to copy files that are missing in current versions of VD/2 {compared to older versions),
This WAS PREVIOUSLY included under the name "extra/frameserver64.reg"
Windows Registry Editor Version 5.00
[HKEY_LOCAL_MACHINE\SOFTWARE\Classes\CLSID\{894288e0-0948-11d2-8109-004845000eb5}]
@="VirtualDub link handler"
[HKEY_LOCAL_MACHINE\SOFTWARE\Classes\CLSID\{894288e0-0948-11d2-8109-004845000eb5}\InprocServer32]
@="vdremote64.dll"
"ThreadingModel"="Apartment"
[HKEY_LOCAL_MACHINE\SOFTWARE\Classes\CLSID\{894288e0-0948-11d2-8109-004845000eb5}\InprocServer32\AVIFile]
@="1"
[HKEY_LOCAL_MACHINE\SOFTWARE\Classes\AVIFile\Extensions\VDR]
@="{894288e0-0948-11d2-8109-004845000eb5}"
[HKEY_LOCAL_MACHINE\SOFTWARE\Classes\AVIFile\RIFFHandlers\VDRM]
@="{894288e0-0948-11d2-8109-004845000eb5}"
[HKEY_LOCAL_MACHINE\SOFTWARE\Wow6432Node\Classes\CLSID\{894288e0-0948-11d2-8109-004845000eb5}]
@="VirtualDub link handler"
[HKEY_LOCAL_MACHINE\SOFTWARE\Wow6432Node\Classes\CLSID\{894288e0-0948-11d2-8109-004845000eb5}\InprocServer32]
@="vdremote.dll"
ThreadingModel="Apartment"
[HKEY_LOCAL_MACHINE\SOFTWARE\Wow6432Node\Classes\CLSID\{894288e0-0948-11d2-8109-004845000eb5}\InprocServer32\AVIFile]
@="1"
[HKEY_LOCAL_MACHINE\SOFTWARE\Wow6432Node\Classes\AVIFile\Extensions\VDR]
@="{894288e0-0948-11d2-8109-004845000eb5}"
[HKEY_LOCAL_MACHINE\SOFTWARE\Wow6432Node\Classes\AVIFile\RIFFHandlers\VDRM]
@="{894288e0-0948-11d2-8109-004845000eb5}"
No idea what it does. (you would probably be best advised to create a UNDO_frameserver64.reg to reverse and/or delete the registry edits, compared to previous clean registry state).
nji
30th March 2025, 20:35
Thank you for the info :)
As I didn't find any information in the net about VD2's frameserver,
I wouldn't have expected it in VD1's "VirtualDub.chm".
(So yes, I missed that :) ).
Still, some of the files mentioned there don't exist at my installation;
and the info about using the "standard AVI file client" leaves me at a loss.
I've no idea what functions my program should use/ provide to act as
a frame client for VD.
I guess I have to link (?) to some kind of lib, and call some functions.
Moreover I will have to provide kind of callback functions for frame seeking
(position, forward, backward)?
poisondeathray
30th March 2025, 21:33
Unless some functions were added to vdub2's frameserver (I doubt it, I don't see any relevant changes in the changelog) - vdub's frameserver is for exporting out of vdub. ie. Vdub is serving the frames to other programs
nji
31st March 2025, 00:24
Oh... obviously I took frame client and frame server wrong.
AviSynth is a frameserver, and e.g. VD2 is capable to take the served frames von AviSynth
and process them as they are from movie files.
My idea for my program(s) was to interact with VD2 like AviSynth does.
If that is possible for AviSynth... then my question is:
Is it possible to write a frameserver that VD2 accepts as source?
And how to do that.
poisondeathray
31st March 2025, 01:18
VD2 should accept any frameserver as input, I don't see the vd2 side as the problem ; VD2 already accepts avs, vpy, emulated "fake" AVI's from avfs, debugmode frameserver, advanced frameserver, avs2avi , a few others
I don't know how to write it for your program, or anything about your program other than opencv based. openCV-python can run in vapoursynth , so maybe that is something to explore, since avfs vapoursynth is supported by vd2 and many other programs
The way the most of frameservers above work is a producing a "signpost" or "fake" AVI. If you've used avfs, it's the same. For example, you frameserve out of a NLE like Premiere Pro or Vegas and a "dummy" AVI is created, and you can open that in vd2 . Maybe have a look at pismo file mount code, because that's what avfs is based on
If your program can std pipe out, then avs or vpy can be a "bridge" to read that pipe with rawsource , and vd2 can open the avs or vpy . The big negative of this method is it's not robust for frame seeking ; there is no cache or solid frame accurate non linear access
StainlessS
31st March 2025, 03:32
Here some stuff that is sort of related, but maybe not of use [just for others searching, maybe].
VideoInputSource - grab video frame from video capture card or webcam in real-time
https://forum.doom9.org/showthread.php?t=170311
and
https://forum.doom9.org/showthread.php?p=1905743
Above, Also for TcpSource() and TcpServer() [TcpDeliver plugin].
Can't get TCPServer() and TCPSource() to work. Need help. :- https://forum.doom9.org/showthread.php?p=1802408
EDIT: CodeProject stuff linked via above links now offline, but here on Archive.org
https://web.archive.org/web/20241113100125/https://www.codeproject.com/Articles/1017223/CaptureManager-SDK-Capturing-Recording-and-Streami
nji
31st March 2025, 09:09
Thank you, both of you. :)
I never heard of any on the mentioned concepts.
As I had that main mixing up of expressions of frame client and frame server.
I will try to find out how difficult it actual is to insert frame client ability in my code.
vBulletin® v3.8.11, Copyright ©2000-2025, vBulletin Solutions Inc.