Welcome to Doom9's Forum, THE in-place to be for everyone interested in DVD conversion.

Before you start posting please read the forum rules. By posting to this forum you agree to abide by the rules.

 

Go Back   Doom9's Forum > Capturing and Editing Video > Avisynth Usage

Reply
 
Thread Tools Search this Thread Display Modes
Old 22nd July 2014, 13:07   #1  |  Link
mbcd
Registered User
 
Join Date: Dec 2008
Location: Germany
Posts: 159
How to load only a special number of single Frames

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 :-(

Last edited by mbcd; 22nd July 2014 at 13:10.
mbcd is offline   Reply With Quote
Old 22nd July 2014, 13:27   #2  |  Link
filler56789
SuperVirus
 
filler56789's Avatar
 
Join Date: Jun 2012
Location: Antarctic Japan
Posts: 1,048
CoronaSequence()? Example:

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

With gapless = true missing pictures are omitted from the result.
Quote:
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().
filler56789 is offline   Reply With Quote
Old 22nd July 2014, 13:31   #3  |  Link
Gavino
Avisynth language lover
 
Join Date: Dec 2007
Location: Spain
Posts: 3,405
ImageSource("%05d.png", end=...)
DeleteFrame(3,4,10, ...)

Since ImageSource only opens each file when needed, unused files will not be accessed.
__________________
GScript and GRunT - complex Avisynth scripting made easier
Gavino is offline   Reply With Quote
Old 22nd July 2014, 13:50   #4  |  Link
StainlessS
HeartlessS Usurer
 
StainlessS's Avatar
 
Join Date: Dec 2009
Location: Over the rainbow
Posts: 8,279
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.ph...light=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.ph...59#post1683559
__________________
I sometimes post sober.
StainlessS@MediaFire ::: AND/OR ::: StainlessS@SendSpace

"Some infinities are bigger than other infinities", but how many of them are infinitely bigger ???

Last edited by StainlessS; 22nd July 2014 at 14:14.
StainlessS is offline   Reply With Quote
Old 31st July 2014, 12:25   #5  |  Link
mbcd
Registered User
 
Join Date: Dec 2008
Location: Germany
Posts: 159
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.
mbcd is offline   Reply With Quote
Reply

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT +1. The time now is 03:17.


Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2020, vBulletin Solutions Inc.