rife-fps
Version:
Video framerate interlopation with rife
47 lines (40 loc) • 1.18 kB
Markdown
This package uses pre-built Rife binaries in order to interpolate video frames. You can use this to increase the framerate,
for example from 30FPS to 60FPS.
```ts
npm install rife-fps
```
- [**rife**](https://github.com/megvii-research/ECCV2022-RIFE)
```ts
import rife from "rife-fps"
/*The multiplier multiplies the framerate. To interpolate a 30FPS video into 60FPS set it to 2.*/
await rife.interpolateVideo("./videos/input.mp4", "./videos/input2.mp4", {multiplier: 2}, progress)
/*Just a directory of image frames.*/
await rife.interpolateDirectory("./input_images", "./output_images", {multiplier: 2}, progress)
/*You can track progress with a callback.*/
let progress = (percent: number) => {
console.log(percent)
}
```
```ts
export interface RifeOptions {
multiplier?: number
ffmpegPath?: string
sdColorSpace?: boolean
framerate?: number
quality?: number
rename?: string
rifePath?: string
threads?: number
speed?: number
reverse?: boolean
pitch?: number
noResume?: boolean
pngFrames?: boolean
transparentColor?: string
}
```