05.04.2019, 01:38
Hi Selur! Please add my version of FRC to your Hybrid.
I have long experienced all sorts of options. To get maximum smoothness of video clips. As a result, I came to this simple version. It is simple, but works well. Check it out yourself. Perhaps this is the best there is today.
So add this, please, to your program so that everyone can take advantage of it.
Sorry for my English.
https://yadi.sk/i/5iz7y3GaTVHufQ
# Frame Rate Converter 2
# Version: 1.0 (April 5th 2019)
#
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation; either version 2 of the License, or
# (at your option) any later version.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with this program; if not, write to the Free Software
# Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA, or visit
# http:#www.gnu.org/copyleft/gpl.html.
#######################################################################################
### Frame Rate Converter 2
### Increases the frame rate with interpolation.
##
## YV12/YV24/Y8/YUY2
## Requires: MvTools2 (pinterf)
##
## @ NewNum - The new framerate numerator (if FrameDouble = false, default = 60)
##
## @ NewDen - The new framerate denominator (if FrameDouble = false, default = 1)
##
## @ Preset - The quality preset [FilmForBagScene|FilmStandart|FilmForMaxFlow|VideoMusicClip]. (default=FilmStandart)
##
##
##
## Presets
## FilmForBagScene: To handle individual scenes in the film. Which have very strong artifacts in the FilmForMaxFlow preset.
## FilmStandart: Parameters with minimal artifacts, but sometimes poor flow.
## FilmForMaxFlow: Parameters with good flow, but in some scenes there may be strong artifacts.
## VideoMusicClip: Parameters with good flow, and off the replay of the last frame when changing scenes.
##
function FrameRateConverter(clip C, int "NewNum", int "NewDen", string "Preset")
{
Preset = Default(Preset, "FilmStandart")
P_FilmForBagScene = 1 P_FilmStandart = 2 P_FilmForMaxFlow = 3 P_VideoClip = 4
Pset = Preset == "FilmForBagScene" ? P_FilmForBagScene : Preset == "FilmStandart" ? P_FilmStandart : Preset == "FilmForMaxFlow" ? P_FilmForMaxFlow : Preset == "VideoMusicClip" ? P_VideoMusicClip : -1
thSCD2nom= (Pset==P_FilmForBagScene) ? 130 :(Pset==P_FilmStandart) ? 130 :(Pset==P_FilmForMaxFlow) ? 130 :(Pset==P_VideoMusicClip) ? 255 : 130
searParam= (Pset==P_FilmForBagScene) ? 1 :(Pset==P_FilmStandart) ? 2 :(Pset==P_FilmForMaxFlow) ? 3 :(Pset==P_VideoMusicClip) ? 4 : 2
NewNum = Default(NewNum, 60)
NewDen = Default(NewDen, 1)
# fps interpolation
superfilt = MSuper(C, hpad=8, vpad=8, pel=4, sharp=2, rfilter=4) # all levels for MAnalyse
bak = MAnalyse(superfilt, isb=true, blksize=48, blksizev=48, badSAD=2200, badrange=8, overlap=0, overlapv=0, search=4, searchparam=searParam, dct=5)
fwd = MAnalyse(superfilt, isb=false, blksize=48, blksizev=48, badSAD=2200, badrange=8, overlap=0, overlapv=0, search=4, searchparam=searParam, dct=5)
Flow = MFlowFps(C, superfilt, bak, fwd, num=NewNum, den=NewDen, blend=False, ml=5800, mask=2, thSCD2=thSCD2nom)
return Flow
}
I have long experienced all sorts of options. To get maximum smoothness of video clips. As a result, I came to this simple version. It is simple, but works well. Check it out yourself. Perhaps this is the best there is today.
So add this, please, to your program so that everyone can take advantage of it.
Sorry for my English.
https://yadi.sk/i/5iz7y3GaTVHufQ
# Frame Rate Converter 2
# Version: 1.0 (April 5th 2019)
#
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation; either version 2 of the License, or
# (at your option) any later version.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with this program; if not, write to the Free Software
# Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA, or visit
# http:#www.gnu.org/copyleft/gpl.html.
#######################################################################################
### Frame Rate Converter 2
### Increases the frame rate with interpolation.
##
## YV12/YV24/Y8/YUY2
## Requires: MvTools2 (pinterf)
##
## @ NewNum - The new framerate numerator (if FrameDouble = false, default = 60)
##
## @ NewDen - The new framerate denominator (if FrameDouble = false, default = 1)
##
## @ Preset - The quality preset [FilmForBagScene|FilmStandart|FilmForMaxFlow|VideoMusicClip]. (default=FilmStandart)
##
##
##
## Presets
## FilmForBagScene: To handle individual scenes in the film. Which have very strong artifacts in the FilmForMaxFlow preset.
## FilmStandart: Parameters with minimal artifacts, but sometimes poor flow.
## FilmForMaxFlow: Parameters with good flow, but in some scenes there may be strong artifacts.
## VideoMusicClip: Parameters with good flow, and off the replay of the last frame when changing scenes.
##
function FrameRateConverter(clip C, int "NewNum", int "NewDen", string "Preset")
{
Preset = Default(Preset, "FilmStandart")
P_FilmForBagScene = 1 P_FilmStandart = 2 P_FilmForMaxFlow = 3 P_VideoClip = 4
Pset = Preset == "FilmForBagScene" ? P_FilmForBagScene : Preset == "FilmStandart" ? P_FilmStandart : Preset == "FilmForMaxFlow" ? P_FilmForMaxFlow : Preset == "VideoMusicClip" ? P_VideoMusicClip : -1
thSCD2nom= (Pset==P_FilmForBagScene) ? 130 :(Pset==P_FilmStandart) ? 130 :(Pset==P_FilmForMaxFlow) ? 130 :(Pset==P_VideoMusicClip) ? 255 : 130
searParam= (Pset==P_FilmForBagScene) ? 1 :(Pset==P_FilmStandart) ? 2 :(Pset==P_FilmForMaxFlow) ? 3 :(Pset==P_VideoMusicClip) ? 4 : 2
NewNum = Default(NewNum, 60)
NewDen = Default(NewDen, 1)
# fps interpolation
superfilt = MSuper(C, hpad=8, vpad=8, pel=4, sharp=2, rfilter=4) # all levels for MAnalyse
bak = MAnalyse(superfilt, isb=true, blksize=48, blksizev=48, badSAD=2200, badrange=8, overlap=0, overlapv=0, search=4, searchparam=searParam, dct=5)
fwd = MAnalyse(superfilt, isb=false, blksize=48, blksizev=48, badSAD=2200, badrange=8, overlap=0, overlapv=0, search=4, searchparam=searParam, dct=5)
Flow = MFlowFps(C, superfilt, bak, fwd, num=NewNum, den=NewDen, blend=False, ml=5800, mask=2, thSCD2=thSCD2nom)
return Flow
}