Log in

View Full Version : How to load only a special number of single Frames


mbcd
22nd July 2014, 13:07
Hello,

I need an small advice for a performance-solution.
I have about 80000 single Frames as single PNG-files.

I dont need all those frames, only about 73578 from it.
How can I create a script to load only the pictures I want?
The frames are numbered "001", "002", "003", "004", "005", "006".
I can also create a txt-file with the numbers I really need.

With Imagesource I can load them automaticly, but it loads ALL pictures.
Doing:

Imagesource("001.png") + Imagesource("002.png") + Imagesource("005.png") + ...

is the only way I know.

How can I load only special frames without loosing too much performance on playback? Deleting unwanted Frames on Harddrive is no solution please! Is there a better solution, or a better way?

PS: I am not an Avisynth-Script/Plugin-Programmer :-(

filler56789
22nd July 2014, 13:27
CoronaSequence() (http://www.avisynth.nl/users/warpenterprises/#imagesequence)? Example:

CoronaSequence("c:\PIC%.2d.jpg", start=1, stop=1500, gapless=true)

With gapless = true missing pictures are omitted from the result.

Deleting unwanted Frames on Harddrive is no solution please!

You don't have to delete anything, moving them to a different directory should be more-than-sufficient =^.^=

Anyway, you can always use several instances of Trim(), and then concatenate the segments with UnalignedSplice().

Gavino
22nd July 2014, 13:31
ImageSource("%05d.png", end=...)
DeleteFrame(3,4,10, ...)

Since ImageSource only opens each file when needed, unused files will not be accessed.

StainlessS
22nd July 2014, 13:50
You can use FrameSel() to Select or Reject a large number of frames using a command file of frame numbers (and/or ranges). (after Imagesource)

http://forum.doom9.org/showthread.php?t=167971&highlight=FrameSel

EDIT: If clip contains audio (I know yours dont), then here script functions to select/reject frames/ranges using a command file.
Also trims audio. http://forum.doom9.org/showthread.php?p=1683559#post1683559

mbcd
31st July 2014, 12:25
Hi Guys,

thanks a lot for your input. This are quite interesting ways to handle this problem. Its a nice compilation of possibilities, I like this thread.:thanks: