View Single Post
Old 13th March 2016, 09:33   #31  |  Link
Gavino
Avisynth language lover
 
Join Date: Dec 2007
Location: Spain
Posts: 3,431
Quote:
Originally Posted by Forensic View Post
I have tried everything that I can think of. What I need is a single pass solution to step through a video and only retain frames where AverageLuma(a)>16 (IOW, retain only non-blank frames). Scriptclip can step through the video and conditionally test the AverageLuma value, but I can't get the new video out of the Scriptclip, even with GRunT. Any suggestions?
As an alternative to StainlessS's solution, you could use my DeleteFrames() function, like this:
Code:
DeleteFrames("AverageLuma() <= 16")
(It works out at compile-time which frames to delete, so the script will take a noticeable time to load for a long video.)

BTW Nice to hear my code is being used in real practical applications!
__________________
GScript and GRunT - complex Avisynth scripting made easier
Gavino is offline   Reply With Quote