SalFPS3

From Avisynth wiki
(Difference between revisions)
Jump to: navigation, search
(reformat and add some things)
m (link fix)
 
(2 intermediate revisions by one user not shown)
Line 1: Line 1:
 
{{FilterCat4|External_filters|Scripts|Adjustment_filters|Frame_Rate_Conversion}}
 
{{FilterCat4|External_filters|Scripts|Adjustment_filters|Frame_Rate_Conversion}}
 
{{Filter3
 
{{Filter3
|scharfis_brain
+
|Mug Funky, Didée
|
+
|3.0
|[http://home.arcor.de/scharfis_brain/convert60ito24p.avs convert60ito24p.avs] [http://web.archive.org/web/20121102063915/http://home.arcor.de/scharfis_brain/convert60ito24p.avs]
+
|[[Media:salFPS3.avs|salFPS3.avs]]
 
|Frame Rate Converters
 
|Frame Rate Converters
 
|
 
|
|6=[http://forum.doom9.org/showthread.php?s=&threadid=63368  Doom9 Thread]}}
+
|6=[http://forum.doom9.org/showthread.php?p=987212#post987212 Doom9 Thread]}}
  
 
== Description ==
 
== Description ==
This function converts 60fps video into 24fps avoiding jerky motion.
+
A modded version of MotionProtectedFPS for extra protection. Originally created by Mug Funky, modded by Didée.
*'''Note:''' this method is rather old (2003), better alternatives are available.  
+
 
<br>
 
<br>
 +
<br>
 +
 
== Requirements ==
 
== Requirements ==
* AviSynth 2.5.8 or later
+
* AviSynth 2.5.8 or greater
* [[Progressive]] input only  
+
* [[Interlacing_and_deinterlacing|Progressive]] input only  
* Supported color formats: [[RGB24]], [[RGB32]], [[YUY2]]
+
* Supported color formats: [[YV12]]
 +
=== Required Plugins ===
 +
* [[MaskTools2]]
 +
* [[Motion]] | [http://wilbertdijkhof.com/mg262/Motion_v10.zip Motion_v10.zip]
 
<br>
 
<br>
 +
 
== [[Script variables|Syntax and Parameters]] ==
 
== [[Script variables|Syntax and Parameters]] ==
{{Template:FuncDef|convert60ito24p (clip video, int mode, int offset)}}
+
:{{Template:FuncDef|salFPS3 (clip input, float FPS, int "mode", int "protection", int "protection2", int "iterate", int "reset", int "initialise") }}
 +
<br>
 +
::{{Par2|input|clip| }}
 +
:::Input clip to be converted.
 +
<br>
 +
::{{Par2|FPS|float| }}
 +
:::The FPS to be converted to, this value is not optional so it must be specified.
 +
<br>
 +
:::{{Par2|mode|int|warp}}
 +
:::Modes:
 +
:::*<code>move</code> : construct new frame by moving blocks
 +
:::*<code>warpfast</code> : construct new frame by stretching blocks
 +
:::*<code>warp</code> : construct new frame by stretching blocks; more accurate than warpfast
 +
<br>
 +
::{{Par2|protection|int|80}}
 +
:::<tt>multiplier</tt> value for <tt>SumStretchFPSMask</tt>.
 
<br>
 
<br>
 +
::{{Par2|protection2|int|20}}
 +
:::<tt>thY1</tt> value for <tt>mt_edge</tt>; low threshold, if the pixel value is less than thY1, the pixel is set to 0.
 
<br>
 
<br>
:{{Par2|video|clip| }}
+
::{{Par2|interate|int|2}}
::Input clip.
+
:::<tt>iterate</tt> value for <tt>FindMotion</tt>.
 
<br>
 
<br>
:{{Par2|mode|int| }}
+
::{{Par2|reset|int|50}}
::Mode 0 does a simple 2 out of 5 selection, which results in jerky motion. Use this mode for comparing purposes.
+
:::<tt>reset</tt> value for <tt>FindMotion</tt>.
::Modes 1 to 3 are using blending of nearby Frames to avoid jerkyness and "simulate" motionblur. The higher the mode-number the more motionblur will be made and thus the motion gets smoother. Modes 2 and 3 are only recommended with a shutterspeed of 1/60sec. With shorter shutter speeds use Mode 1.
+
:::*<code>reset=0</code> : motion estimation always uses estimated motion vectors for the previous frame, which forces linear access.
::*<code>mode=0</code> : uses simple 24 out of 60 selection -> jerky motion.
+
:::*<code>reset=50</code> : motion vectors are calculated from scratch every 50 frames, allowing seeking. Lower values will allow faster seeking.
<ul><DD><DD><pre style="width: 100%;">
+
A B C D E F G H I J K L M N O P Q R  <- input sequence
+
  |    |  |    |  |    |  |    <- | = direct copy
+
  1    2    3    4    5    6    7    <- resulting output sequence
+
</pre></ul>
+
::*<code>mode=1</code> : introduces a blending of every other frame from its nearest neighbors. This mode delivers a non-jerky motion and should be used with shutter speeds below 1/60sec! ie. 1/120 or shorter.
+
<ul><DD><DD><pre style="width: 100%;">
+
A B C D E F G H I J K L M N O P Q R  <- input sequence
+
  |  \ /  |  \ /  |  \ /  |    <- | = direct copy ; \ / = 50:50 blending
+
  1    2    3    4    5    6    7    <- resulting output sequence
+
</pre></ul>
+
::*<code>mode=2</code> : uses blending on every frame, ideal for shutter speed of 1/60 sec since it simulates very close the 24p (1/24sec) motion blur and thus giving a really smooth 24p - motion as a positive side-effect, this mode reduces noise and nearly completely  eliminates remained line flickering of the deinterlacing!
+
<ul><DD><DD><pre style="width: 100%;">
+
A B C D E F G H I J K L M N O P Q R  <- input sequence
+
  \|/  \ /  \|/  \ /  \|/  \ /  \|/  <- \|/ = 25:50:25 blending ; \ / = 50:50 blending
+
  1    2    3    4    5    6    7    <- resulting output sequence
+
</pre></ul>
+
::*<code>mode=3</code> : similar to mode 2 but with more motion blur.
+
::*Any other number given to mode just returns the original (60fps) input clip.
+
 
<br>
 
<br>
:{{Par2|offset|int| }}
+
::{{Par2|initialise|int|6}}
::Apply an offset for selecting the 2 out of 5 frames - pattern.
+
:::<tt>initialise</tt> value for <tt>FindMotion</tt>; higher values increase the accuracy of vectors calculated from scratch, at the cost of increased calculation time.
 
<br>
 
<br>
 
== Examples ==
 
== Examples ==
Import("convert60ito24p.avs")<br>
+
Change frame rate to 23.976:
  [[AviSource]]("blah.avi")
+
  [[AviSource]]("blah.avi")<br>
  QTGMC() # or any other double frame rate deinterlacer
+
  fps = 24000.0/1001.0
  convert60ito24p(2,0)
+
  salFPS3(fps)
 
<br>
 
<br>
 
==External Links ==
 
==External Links ==
* [http://forum.doom9.org/showthread.php?s=&threadid=63368  Doom9 Forum] - Convert60ito24p discussion.
+
*Download [[Media: salFPS3.avs|salFPS3.avs]] : Current Version (recommended). <br>
* [http://home.arcor.de/scharfis_brain/60ito24p.html scharfis_brain's website][http://web.archive.org/web/20121101034135/http://home.arcor.de/scharfis_brain/60ito24p.html] - Convert60ito24p webpage.  
+
*Download [[Media: salFPS.avs|salFPS.avs]] : Original Version.
 
<br>
 
<br>
 
<br>
 
<br>
 
-----------------------------------------------
 
-----------------------------------------------
 
'''Back to [[External_filters#Frame_Rate_Conversion|External Filters]] &larr;'''
 
'''Back to [[External_filters#Frame_Rate_Conversion|External Filters]] &larr;'''

Latest revision as of 08:57, 12 November 2015

Abstract
Author Mug Funky, Didée
Version 3.0
Download salFPS3.avs
Category Frame Rate Converters
License
Discussion Doom9 Thread

Contents

[edit] Description

A modded version of MotionProtectedFPS for extra protection. Originally created by Mug Funky, modded by Didée.

[edit] Requirements

  • AviSynth 2.5.8 or greater
  • Progressive input only
  • Supported color formats: YV12

[edit] Required Plugins


[edit] Syntax and Parameters

salFPS3 (clip input, float FPS, int "mode", int "protection", int "protection2", int "iterate", int "reset", int "initialise")


clip  input =
Input clip to be converted.


float  FPS =
The FPS to be converted to, this value is not optional so it must be specified.


int  mode = warp
Modes:
  • move : construct new frame by moving blocks
  • warpfast : construct new frame by stretching blocks
  • warp : construct new frame by stretching blocks; more accurate than warpfast


int  protection = 80
multiplier value for SumStretchFPSMask.


int  protection2 = 20
thY1 value for mt_edge; low threshold, if the pixel value is less than thY1, the pixel is set to 0.


int  interate = 2
iterate value for FindMotion.


int  reset = 50
reset value for FindMotion.
  • reset=0 : motion estimation always uses estimated motion vectors for the previous frame, which forces linear access.
  • reset=50 : motion vectors are calculated from scratch every 50 frames, allowing seeking. Lower values will allow faster seeking.


int  initialise = 6
initialise value for FindMotion; higher values increase the accuracy of vectors calculated from scratch, at the cost of increased calculation time.


[edit] Examples

Change frame rate to 23.976:

AviSource("blah.avi")
fps = 24000.0/1001.0 salFPS3(fps)


[edit] External Links




Back to External Filters

Personal tools