ApparentFPS
Raffriff42 (Talk | contribs) m (error in template) |
Raffriff42 (Talk | contribs) m (touchup) |
||
Line 2: | Line 2: | ||
{{Filter3 | {{Filter3 | ||
− | |StainlessS | + | |1=StainlessS |
− | |0.01 | + | |2=0.01 |
− | |[http://forum.doom9.org/showthread.php?t=171339 Doom9.org] | + | |3=[http://forum.doom9.org/showthread.php?t=171339 Doom9.org] |
− | | | + | |4=External filters |
− | | | + | |5=[http://www.gnu.org/licenses/gpl-2.0.txt GPLv2] |
− | |[http://forum.doom9.org/showthread.php?t=171339 Doom9.org] | + | |6=[http://forum.doom9.org/showthread.php?t=171339 Doom9.org] |
− | + | ||
}} | }} | ||
<br> | <br> |
Revision as of 19:39, 7 November 2014
Abstract | |
---|---|
Author | StainlessS |
Version | 0.01 |
Download | Doom9.org |
Category | External filters |
License | GPLv2 |
Discussion | Doom9.org |
Contents |
Description
Shows underlying framerate where a clip has had many duplicates inserted, easier than counting unique frames.
Requirements
- AviSynth v2.58 or v2.6
- progressive
- Supported color formats: RGB24, RGB32, YUY2, YV12, *YV16, *YV24, *YV411, *Y8
- * Not available in AviSynth 2.5.8.
Syntax and Parameters
- ApparentFPS (clip, float "DupeThresh", float "FrameRate", int "Samples", float "ChromaWeight", string "Prefix", bool "Show", bool "Verbose", bool "Debug")
- clp =
- Input clip.
- clp =
- DupeThresh float = 0.5
- (Greater than 0.0), suggest 0.5 -> 1.0. FrameDifference below or equal to this is a dupe.
- DupeThresh float = 0.5
- FrameRate float = clp.FrameRate
- FrameRate of clp. Probably of no great use, just use default.
- FrameRate float = clp.FrameRate
- Samples int = Round(FrameRate)
- (1 or more). Min Frames to sample for underlying framerate detection. Suggest as FrameRate.
- Samples int = Round(FrameRate)
- ChromaWeight float = 1.0/3.0
- (0.0 -> 1.0). YUV Only. Suggest 1.0/3.0 -> 1.0/2.0. (Use 0.0 for GreyScale YUV).
- ChromaWeight float = 1.0/3.0
- Prefix string = ""
- Prefix for returned Local vars. "" = None returned.
- Prefix string = ""
- Show bool = true
- If true, show Info
- Show bool = true
- Verbose bool = true
- If true, show additional info, Sequence as binary digits
- Verbose bool = true
- Debug bool = true
- Not of any great use.
- Debug bool = true
Function samples over Samples frames, and shows instantaneous ApparentFPS and MaxApparentFPS, the real and perhaps most useful result is MaxApparentFPS.
If Prefix = "" (Default) then does not return any info Local vars. When set to eg "P_" will set Local P_ApparentFPS and P_MaxApparentFPS as Float. Also returns Locals P_MinAboveDupeDif, P_MaxBelowDupeDif and P_CurrentDif which may assist in choosing DupeThresh, they are min and max values so far, and difference between current and previous frame. P_MinAboveDupeDif is the difference to previous frame of the frame which has lowest difference that what considered NOT a dupe (above DupeThresh), MaxBelowDupeDif max difference of frame that WAS considered a dupe (below DupeThresh). Ideally in a clip containing duplicates, there would be a distinct gap between these two above/below dup dif values with DupeThresh somewhere in between.
Can switch Off metrics (Show=False), and set eg Prefix = "P_" to return Locals P_ApparentFPS and P_MaxApparentFPS with rough instantaneous estimate of current underlying framerate and maximum underlying framerate detected so far. NOTE, ApparentFPS can range from 0.0 in static scene (can be measure of how 'active' a scene is). 'Verbose' (Default True) shows additional info, a string of 1's and 0's showing duplicate and unique frames. Also shown in info is the Unique frame count for the current Sample spread (which will be reduced at either end of clip), current ApparentFPS is calculated as (FrameRate * UniqueFrameCount / CurrentSampleSpread), so where UniqueFrameCount == CurrentSampleSpread, the result is FrameRate, However, if CurrentSampleSpread is reduced due to being near clip ends, then current ApparentFPS will NOT be assigned to P_MaxApparentFPS even where greater than current P_MaxApparentFPS.
The rest should be pretty straight forward.
Examples
## This is some example code. Avisource("example.avi") ExampleFilter(blah=true)
## This is another example. Avisource("example.avi") ExampleFilter(blah=false)
Back to External Filters ←