gizai/tasks/enhance
the video jobs that need no model: enhance-video (operation video.enhance, RTX Video) and interpolate-video (video.interpolate, optical flow) on a worker's GPU.
import * as Enhance from "gizai/tasks/enhance";Types
Treatment
type Treatment = { e: Enhance.Enhance; times: i64; effort: string; }What a job does to the frames: RTX Video e, or (times above 1) times - 1 frames made between each two (of
quality effort: Interpolate.interpolationQualities).
e:_gizlang_lib_ai__video__enhance.Enhancetimes:i64effort:string
Functions
service
function service(): Hosting.ServiceThe worker service for video enhancement and frame interpolation.
Effects: fail, alloc.
enhanceFile
function enhanceFile(gpu: Gpu, ffmpeg: string, source: string, s: Decode.Source, how: Treatment, codec: string, dir: string, progress: (f: i64, total: i64) => bool): i64 throws W.Failuresource (s: Decode.sourceOf) through how into DIR/output.mp4 of codec, with the source's audio: NVDEC, the effect
or the interpolation, and NVENC on gpu, then ffmpeg times the track at the source's rate (times how.times)
beside the audio. progress takes the source frames done and expected each 8 frames and gives false to cancel.
Effects: fail, read, write, console, io, alloc.
Constants
WORKER
const WORKER = "video-processing"The worker argument for the enhancement and interpolation operations.
QUALITY
const QUALITY: i64 = 20NVENC's constant quality of an enhanced video, for a model that upscales its own output too.