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.

Domains: forum.doom9.org / forum.doom9.net / forum.doom9.se

 

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

 
 
Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
Old 23rd March 2012, 01:13   #1  |  Link
StainlessS
HeartlessS Usurer
 
StainlessS's Avatar
 
Join Date: Dec 2009
Location: Over the rainbow
Posts: 11,407
FrameSelect/FrameReplace LAST VERSION

Code:
FrameSelect() Plugin for Avisynth v2.5+ by StainlessS.


LAST VERSION FRAMESELECT()
http://www.mediafire.com/download/15...30516_LAST.zip

FrameSelect() is a simple plugin to select individual frames from a clip.

Can select frames numbers by direct arguments to filter, or in a string, or in a command file.


Video:- Planar, YUY2, RGB32, RGB24.

Audio:- Returns NO AUDIO (Does not really make sense for individual frames).


FrameSelect(Clip, int F1, ... , int Fn, string 'SCmd',string 'Cmd', bool 'Show', bool 'Ver',bool "Reject")

Compulsory args:

        Clip,   No Default, source clip.


Optional args:  (at least one of the frame select options must be supplied).

    F1...Fn Un-named. Zero or more frame numbers.

        SCmd,   string, Default= "", Not set.
                Command String, frame numbers supplied in a string.

        Cmd,    string, Default= "", Not set.
                Command file, frame numbers supplied in a file. Use eg "Select.txt" for command file in your script directory.

        Show    bool, Default= false.
                true = Show info.

        ver     bool, Default=false.
                true = Show version.

        Reject  bool, Default False. If true then selects frames NOT selected rather than selected frames. New, v1.03.


Either the direct frame numbers, Command string (SCmd), or command file (Cmd) must be supplied.
*** NOTE ***,  if more than one supplied, the commands in the Command File are processed
first followed by those in the SCmd String, and finally the directly supplied frame numbers.


NOTE, v1.01 Adds frame ranges to both command file and command string (not possible for directly supplied frame number args).


The 'Cmd' Command file allows one command per line and can contain comments eg:

#------------- # below contents of a text file.
100       # This is a comment
200       # and so is this
300,400   # This is a frame range, specifies all 101 frames between 300 and 400 inclusive.
500,-2    # Specifies 2 frames starting at frame 500, ie 500 and 501.
600,0     # Specifies ALL frames from frame 600 to the end of the source clip.

#-------------

The "SCmd" string accepts more than 1 command per line, but MUST be separated by a semi colon (;).
The Semi colon is processed as a sort of soft newline and will terminate a comment, so you CANNOT
have a semi colon in a comment. eg

SCMD = "
       1000  # This is a comment ; 2000 # the 2nd arg is 2000; 3000 # the third arg on a single line.
       4000 ; 5000 ; 6000
       7000,8000 ; 9000,-2 ; 10000,0  # Frames 7000-8000, 2 frames starting at 9000, and frame 10000 to end of clip.
"

example commands:

FrameSelect(clip, 1,2,3,4,5)
FrameSelect(clip,"100,110;200,-2;300,0")
FrameSelect(clip, 1,2,3,4,5,"100;200;300","Select.txt")
FrameSelect(clip, 1,2,3,4,5,"100;200;300")
FrameSelect(clip, 1,2,3,4,5,"","Select.txt")
FrameSelect(clip,"100;200;300","Select.txt")
FrameSelect(clip,"","Select.txt")

--------------------------------------
v1.02, added:

FrameReplace(Clip,clip, int F1, ... , int Fn, string 'SCmd',string 'Cmd', bool 'Show', bool 'Ver')

Args identical to FrameSelect, with exception of the 2nd clip arg which is a clip of frames to replace into the 1st clip arg.
The other args must be identical to the script that originally extracted the frames.
Replaces frames extracted with FrameSelect(), back into the original clip.
Use the same command args that were used to extract the clip.
--------------------------------------
StainlessS.
For audio support with fade in/out see trim/splice plugin Prune().
http://forum.doom9.org/showthread.php?t=162446
For frame range replacement see ClipClop().
http://forum.doom9.org/showthread.php?t=162266

v2.58 & v2.6 dll's with source, LAST VERSION here until attachment clears
http://www.mediafire.com/download/15...30516_LAST.zip

New Thread for FrameSel/FrameRep here:-
http://forum.doom9.org/showthread.php?t=167971
Attached Files
File Type: zip FrameSelect_25&26_dll_v1-03_20130516_LAST.zip (118.7 KB, 100 views)
__________________
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; 5th June 2013 at 04:30. Reason: Update
StainlessS is offline   Reply With Quote
 

Tags
edit, frames, join, select, trim

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 00:25.


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