NVEnc icon indicating copy to clipboard operation
NVEnc copied to clipboard

Avisynth or Vapoursynth script for filtering use only?

Open Usulyre opened this issue 8 months ago • 3 comments

Hi, is there a way to use an avisynth or vapoursynth script for filtering only in NVEnc?

Meaning just load an avisynth or vapoursynth script that only has a filter to be applied to a video source that is already specified as an input video in NVEnc?

Example:

NvEncC64.exe "frc.avs" -i 1.m2ts --audio-copy --vpp-fruc fps=144 -o - --output-format nut | C:\Users\Milar\PalemoonDownloads\testing\mpv-x86_64-v3-20241124-git-2d813de\mpv -

"frc.avs" contains the below filter and that would be applied to the video:

TDecimate(mode=7, rate=24.0/1.001)

Usulyre avatar May 15 '25 23:05 Usulyre

It might be doable, but still someone need to implement plugin that sources decoded frames from nvenc as uncompressed input, then create environment like

NvencDecodedClipSource()
<concatenated avs input>

then forward it as avs source to nvenc. I thinks that's too much effort to implement. Just use DGSource if you want GPU decoding in your avs script.

DJATOM avatar May 16 '25 13:05 DJATOM

It is possible to output video frames is y4m format with -c raw, but without audio, so will not match your usage.

I think current best way is to use --lossless -o - --output-format mpegts. Although it does add extra encode and decode, it shall be able to work fine in your use case.

rigaya avatar May 19 '25 10:05 rigaya

NVEnc 8.05 will make it possible to use -c raw --output-format nut at the same time, which shall allow to pass raw video frames to mpv.

rigaya avatar Jun 10 '25 14:06 rigaya

I'll close this issue as the feature has been added solving this issue.

rigaya avatar Aug 13 '25 04:08 rigaya