View Full Version : Frameserve locally preprocessed video to remote encoder


Opuz Klass
27th October 2007, 17:36
Hi there guys,

I've made an extensive research on this subject but I found no answers to my questions...

I want to really preprocess video in machine A and frameserve the result to encoder in machine B, so preprocessing step will only load machine A while encoding step will only load machine B.

I've made several experiments using VDub frameserver, AVS/AVIS, mapping network drives but everything I try always put preprocessing load also on machine B, turning machine A into a simple fileserver. FYI I'm using a dedicated gigabit VLAN with powerful offloading capability.

Do you know how/if this can be achieved?

Leak
27th October 2007, 18:47
Do you know how/if this can be achieved?
Well, the "load" will always be on the machine you're opening the AVS file on so stuff like mapped network drives obviously can't work.

You might want to take a look at your AviSynth documentation (which gets installed with AviSynth), under "Core Filters > Special > TCPDeliver" - that'll hand the processed frames from one script running on machine A to another script running on machine B, thus putting all the processing load on machine A and using only a miniscule amount of CPU (for receiving & delivering the frames from machine A) on machine B.

np: Prefuse 73 - Preparation Two (Interregnums)

Mug Funky
28th October 2007, 09:42
i wonder if MT_avisynth and TCPserver could be merged somehow?

renderfarming would be cool, though probably not that useful except for specialised stuff (or heavy noise reduction in HD).

squid_80
28th October 2007, 11:14
IIRC TCPSource does do some kind of pre-rendering i.e. it has the next frame ready to be sent out over the wire before it's actually requested.

MfA
28th October 2007, 12:26
It does prefetch a frame, but AFAICS the decoding/processing of the frame (GetFrame) and the sending of the frame are in the same thread, so they can't be overlapped. Also the throughput is limited to 64 MB/s (1 msec per select, 64 KB per SendPendingData).

sh0dan
28th October 2007, 19:47
@MfA: There shouldn't be any limit on data send speed, selects unblock, as soon as the driver has room for more data.

Both client and server prefetch frames. As soon as the client has decompressed the received frame, it requests the next frame, before delivering the frame to the next filter. If the server is idle more than 1msec after delivering a frame, it will automatically start preparing the next.

The 2.6 version is slightly more sophiticated than the 2.5, which I have stopped adding features to a while ago.

MfA
28th October 2007, 20:18
@MfA: There shouldn't be any limit on data send speed, selects unblock, as soon as the driver has room for more data.
Oops, didn't see the first select had 0 second time out.

Leaves the overlap issue ... I see you recognized it already :
// Requests should optimally be handled by a separate thread to avoid blocking other clients while requesting the frame.
Although that only part of the problem, it also blocks processing for the same client.

Opuz Klass
23rd November 2007, 18:28
Thanks for your feedback guys.

I've been trying several things during the previous weeks and while it works reasonably well between VirtualDubs, it doesn't work at all with WMCmd.vbs.

I've tried everything I remembered:
- 2 machines w/ Windows XP SP2 32-bit: Avisynth 2.7.0 and 2.8.1, latest WME9 and Zambelli's WMCmd.vbs
- Windows Vista Business 64-bit: runas Administrator 32-bit cmd.exe, 32-bit cscript, latest WME9 32-bit + hotfix, latest WMCmd.vbs

It always crashes cscript with DEP (if you have it enabled) or crashes by itself (if DEP is disabled).

Anyone know how to fix this? :|

zambelli
12th December 2007, 03:33
Does the same .avs play back OK in WMP?

Sagekilla
12th December 2007, 22:06
Hm I find this very interesting... would it also be possible to do a chain of sorts with one computer doing filtering on the frame, handing it off to the second computer to do more filtering and then finally handing it off to the machine that will do the final encoding?

I know it seems pretty useless but I could imagine it would be helpful in those situations when you're using a large number of filters that require oodles of processing power. I myself have a few clips that are like this and would probably benefit from doing a Filter --> Encoder setup.