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 11th June 2013, 11:23   #1  |  Link
StainlessS
HeartlessS Usurer
 
StainlessS's Avatar
 
Join Date: Dec 2009
Location: Over the rainbow
Posts: 10,980
FrameRepeat - Repeat frames/ranges in clip.

Prompted by this thread:
http://forum.doom9.org/showthread.php?t=168018

EDIT: Requires Microsoft Visual C++ 2008 runtimes.

Code:
FrameRepeat() Plugin for Avisynth v2.5 & v2.6 by StainlessS.

FrameRepeat() is a simple plugin to select frames to repeat.

v2.6 plugin only required for Show and Ver arguments to display info on frame in Avisynth v2.6+ colorspaces.

Video:- Planar, YUY2, RGB32, RGB24. # EDIT: ALL AVS+ colorspaces.

Audio:- Returns NO AUDIO.


FrameRepeat(Clip,int "default",string "Cmd", bool "Show", bool "Ver")

Compulsory args:

        Clip,   No Default, source clip.
                
Optional args:

        default, int, default=0. The default repeat count for frames not mentioned in command file.
                Default =0, is, frames not mentioned in Cmd command file are excluded (repeated 0 times, ie not output at all).

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

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

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


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

#------------- # below contents of a text file eg "Repeat.txt".
1 1    # This is a comment. Output frame 1 once.
2      # Single frame number without a repeat count, outputs frame only once, equivalent to 2 1. # EDIT: Oops, we changed that, default is 0, so frame 2 skipped altogether.
3,2    # Can also use ',' COMMA rather than SPACE as a number separator. Outputs frame 3 twice.
5,3    # Output frame 5, 3 times.
#-------------

Given a 6 frame clip (frames 0 -> 5)

FrameRepeat(clip,default=0,cmd="Repeat.txt")  # would produce this sequence "1,2,3,3,5,5,5".

FrameRepeat(clip,default=1,cmd="Repeat.txt")  # would produce this sequence "0,1,2,3,3,4,5,5,5".

FrameRepeat(clip,default=2,cmd="Repeat.txt")  # would produce this sequence "0,0,1,2,3,3,4,4,5,5,5".

FrameRepeat(clip,default=3)  # would produce this sequence "0,0,0,1,1,1,2,2,2,3,3,3,4,4,4,5,5,5".
                             # Note, above without a command file.

Where a frame number and repeat count is mentioned more than once in file, the last one will override earlier ones..
--------------------------------------
StainlessS.
FrameRepeat(clip) will produce a "No frames to output" type of error message, as 'default' defaults to 0.

See MediaFire in sig
__________________
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; 3rd November 2022 at 05:24. Reason: Update
StainlessS is offline   Reply With Quote
Old 31st March 2015, 15:08   #2  |  Link
StainlessS
HeartlessS Usurer
 
StainlessS's Avatar
 
Join Date: Dec 2009
Location: Over the rainbow
Posts: 10,980
FrameRepeat v1.01, v2.6 dll recompile with Avisynth Version 6 Header.
See 1st post.
__________________
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 ???
StainlessS is offline   Reply With Quote
Old 3rd November 2022, 04:45   #3  |  Link
StainlessS
HeartlessS Usurer
 
StainlessS's Avatar
 
Join Date: Dec 2009
Location: Over the rainbow
Posts: 10,980
FrameRepeat v1.02. See 1st post.
Code:
/*

    v1.0, 7 June 2013. Initial version.
    v1.01, 31 Mar 2015. Recompile v2.6 dll with Avisynth Version 6 Header.
    v1.02, 02 Nov 2022. Add x64 compile + version resource. HBD capable for SHOW and VER Subtitles.

*/
EDIT: Cant change thread title, over 8 years old.

EDIT: "HBD capable for SHOW and VER Subtitles."
High bit depth would work ok anyway, as only replaces one frame with another, bit depth dont matter, but when
rendering subtitles on frame, we have to cope with high bit depth render.
__________________
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; 3rd November 2022 at 22:11.
StainlessS 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 08:24.


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