Practical-RIFE icon indicating copy to clipboard operation
Practical-RIFE copied to clipboard

Free real times frame interpolation solution

Open Ken1256 opened this issue 1 year ago • 3 comments

It's free and can be used with mpc-be for real times frame interpolation. Maybe you can add vapoursynth, vs-mlrt and avisynth_filter to README?

https://github.com/vapoursynth/vapoursynth https://github.com/AmusementClub/vs-mlrt https://github.com/CrendKing/avisynth_filter

avisynth_filter script

import os
import sys
import math

from vapoursynth import core
import vapoursynth as vs

# core.num_threads = 12
core.max_cache_size = 24000

sys.path += [r'vsmlrt.py path'] # your vsmlrt.py path

from vsmlrt import RIFE, RIFEModel, Backend

pp = VpsFilterSource
pp = core.resize.Spline36(pp, range_in_s='full', range_s='full', matrix_s='rgb', matrix_in_s='709', format=vs.RGBS, dither_type='error_diffusion')
pp = core.resize.Spline36(pp, format=vs.RGBH)
w_pad = ((math.ceil(pp.width / 32) * 32) - pp.width) / 2
h_pad = ((math.ceil(pp.height / 32) * 32) - pp.height) / 2
pp = core.std.AddBorders(pp, left=w_pad, right=w_pad, top=h_pad, bottom=h_pad)
pp = RIFE(pp, model=RIFEModel.v4_22, backend=Backend.TRT(fp16=True, num_streams=2), multi=2, video_player=False)
# pp = RIFE(pp, model=RIFEModel.v4_22_lite, backend=Backend.TRT(fp16=True, num_streams=2), multi=2, video_player=False)
pp = core.std.Crop(pp, left=w_pad, right=w_pad, top=h_pad, bottom=h_pad)
pp = core.resize.Spline36(pp, format=vs.RGBS)
pp = core.resize.Spline36(pp, range_in_s='full', range_s='full', matrix_s='709', matrix_in_s='rgb', format=vs.YUV444P8, dither_type='error_diffusion')

pp.set_output()

Ken1256 avatar Aug 28 '24 06:08 Ken1256

I don't quite understand, what should I write?

hzwer avatar Aug 28 '24 09:08 hzwer

He want you to add the vsmlrt into this part https://github.com/hzwer/ECCV2022-RIFE?tab=readme-ov-file#software

hooke007 avatar Aug 28 '24 12:08 hooke007

From https://github.com/hzwer/ECCV2022-RIFE?tab=readme-ov-file#software this repo https://github.com/HomeOfVapourSynthEvolution/VapourSynth-RIFE-ncnn-Vulkan doesn't exist anymore.

This fork is still actively maintained: Vapoursynth-RIFE-Vulkan

42147 avatar Aug 28 '24 20:08 42147