View Full Version : avisynth as ftp-frameserver?
hanfrunz
30th November 2005, 14:55
Hello everyone,
i have this idea of an avisynth-filter.
let there be a script like:
colorbars()
ftpserver(port=25,dir="/film1",format="tiff")
now we play this script with some player.
and on ftp://localhost/film1 we find a bunch of .tiff files. So now you can download frame000001.tiff for example an get frame number 1 of our movie.
Is somebody willing to code such a filter, or can anybody point me to a good tutorial on virtual ftp-servers to start with?
thanks,
hanfrunz
Kopernikus
30th November 2005, 15:00
http://www.avisynth.org/TCPDeliver
hanfrunz
30th November 2005, 17:57
http://www.avisynth.org/TCPDeliver
Hello Kopernikus,
i know TCPDeliver, but i'd like to have a ftp or smb server with "virtual" files, so that any software can open them.
hanfrunz
sh0dan
30th November 2005, 19:14
I think for it to be useful, it would have to be smb - but that would also be REALLY useful. Perhaps the easiest way would be to mount it as a drive. I have no idea of what that would mean codewise, but the idea sounds great.
esby
30th November 2005, 20:18
An ftp server is somewhat out of the question, as it is just a file transfert protocol, it is not because you can download it byte per byte that you can serve it efficiently.
Port 25 is also used by the mail protocol.
Now technically tcpserver is still the best solution.
We may have an option of using ftp protocol for serving the frames, after all, we can do the following:
On the server:
Create a virtual drive containing:
* an index file, with all the structure information (beginning and end of avi), add god know what, the information is somewhat small.
* one file per video frame.
* one file per audio frame.
* the same for all streams.
If the index is too big, segment it to one index per stream.
On the client:
Connect via the protocol you want on this drive (smb, nfs, ftp etc.)
map the drive.
Have an interface (eg a vfw one) that will allow to create a fake avi serving the mapped drive.
esby
Richard Berg
30th November 2005, 23:31
I wrote something like this a long, long time ago. I implemented it as an ISAPI filter that listened for specific query strings from IIS. For instance, http://somemachine/AviServer?filename=foo&frameno=12345&format=jpg
IIRC, it was less than 100 lines of C++. (A very modified version of the code later became ImageWriter, which is probably why it's so buggy, sorry :devil: ). The API has changed since then, but it should still be pretty straightforward. Adding an index page that dumps the clip info to a predictable format (say, with a MIME of text/xml) wouldn't be too hard either.
Whatever route you take, I definitely suggest using the CreateScriptEnvironment API rather than writing a plugin.
hanfrunz
7th December 2005, 23:30
Whatever route you take, I definitely suggest using the CreateScriptEnvironment API rather than writing a plugin.
Hello Richard,
the longer i think about i the more i realise, that a filter is really not the way to go. I think this should be a own application, which handles .avs files or any other source. Can you explain what the CreateScriptEnviroment is. So far i only coded little filters :)
Does anybody know how to realise a virtual file system on windows machines?
regards,
hanfrunz
vBulletin® v3.8.5, Copyright ©2000-2012, Jelsoft Enterprises Ltd.