Log in

View Full Version : Any way to buffer a clip in advance?


nonoitall
8th June 2008, 09:38
I'll try and explain this as well as I can...

Let's say I have three clips, all of which are 24fps: A (100 frames long), B (30 frames long) and C (100 frames long). Let's say I assemble these clips into clip D like so: D = A+B+C

Now, let's say that clips A and C can both produce frames well above real-time (at like ~70fps) but clip B can't quite play at real-time (and produces frames at ~20fps).

For the sake of making the script play fluently in a media player, is there anyway to pre-cache a certain number of frames in advance? For example, when a frame from clip D is requested, that frame and ~50 frames following it are generated/cached, so that when slower parts of the clip are reached, the pre-cached frames are all ready to go instead of having playback slow down in the middle of the clip.

Alternatively, I'd also be open to any AviSynth-capable media player that has this functionality, though something that could be inserted into the script would be preferable. Thanks in advance.

stickboy
8th June 2008, 10:54
I suppose the ScanClip function from my TestHarness (http://www.avisynth.org/stickboy/) plug-in might help; it'll try to access all the frames in a clip when the script is loaded.

But you'd probably be better off preprocessing clip B (or D) and saving the results.

mikeytown2
8th June 2008, 18:48
But you'd probably be better off preprocessing clip B (or D) and saving the results.

Completely agree! nonoitall, you could try this out http://forum.doom9.org/showthread.php?p=1073371#post1073371 it's something that could be inserted into the script
but i don't think this is what you were looking for.

Comatose
8th June 2008, 21:54
Yup. Unless your script relies on something dynamic, just encode it :3

mikeytown2
15th June 2008, 10:42
I found this function called FrameCache (http://niiyan.net/?FrameCache) inside WarpSharpPackage modified version by seraphy (http://niiyan.net/?WarpSharpPackage). After reading the FAQ (http://niiyan.net/?WarpSharpFAQ) you need to install Microsoft Visual C++ 2008 Redistributable Package (x86) (http://www.microsoft.com/downloads/details.aspx?displaylang=en&FamilyID=9b2da534-3e03-4391-8a4d-074b9f2bc1bf).

Here is a google translated version (http://209.85.171.104/translate_c?hl=en&sl=ja&tl=en&u=http://seraphy.fam.cx/~seraphy/program/WarpSharp/index.html) of the filters webpage
Direct Download (http://seraphy.fam.cx/~seraphy/program/WarpSharp/warpsharp_20080325.rar).


I can't tell if it's working, but the function does run, and the package is fairly recent: March, 25th 2008. It's worth a shot!