You are not logged in.

#1 2014-11-22 16:47:05

ezacaria
Member
Registered: 2007-12-10
Posts: 113

QTGMC on Vapoursynth running natively in Linux, but no fft3dfilter

I recently managed to run the QTGMC script with Vapoursynth in Arch (without Wine). This is now possible because (among other things) the mvtools2 Avisynth package has been ported to Vapoursynth.

I tested couple of scripts from the havsfunc package (QTGMC with preset "Medium" and "Slow" and the Deblock_QED filter). Autoloading of plugins worked fine, there was no need to invoke the LoadPlugin function explicitly.

Moreover, the vspipe utility gave no trouble, so I could use mpv to preview the output of the script, and also feed x264 for encoding.

The only thing I would still wish for is to have a working version of the fft3dfilter. I have seen that there exists a port of this filter for avxsynth (and there is a package in AUR), but I have no clue how much effort would be required to adapt the code for the vapoursynth interface (and if the plugin could be easily accelerated with OpenCL/CUDA). Perhaps if sl1pkn07 is around and has a minute, he could comment on that smile

Just in case there would be other video encoding/processing enthusiasts in the community, here is what I used:

  1. Vapoursynth-git from AUR (this may also work with the Community package, but I did not try it).
     

    • If using the git version, the imagemagick-no-hdri package is required. However, I found it easier to recompile imagemagick via ABS and leave out the --enable-hdri option (and then modify the vapoursynth-git PKGBUILD to use the "normal" imagemagick package)

  2. The havsfunc script package, available in AUR as vapoursynth-plugin-havsfunc.

  3. A bunch of plugins are required:     vapoursynth-plugin-addgrain-git, vapoursynth-plugin-dctfilter-git, vapoursynth-plugin-deblock-git, vapoursynth-plugin-eedi2-git, vapoursynth-plugin-fmtconv-git, vapoursynth-plugin-genericfilters-git, vapoursynth-plugin-havsfunc, vapoursynth-plugin-mvtools-git, vapoursynth-plugin-nnedi3-git, vapoursynth-plugin-scenechange-git, vapoursynth-plugin-tdeintmod-git, vapoursynth-plugin-temporalsoften2-git, vapoursynth-plugin-temporalsoften-git.

  4. In addition, vapoursynth-plugin-fmtconv-git is also needed but the AUR PKGBUILD required a small modification, as pointed out by the comments in the AUR page (add "-march=native" to the g++ line).

Using vspipe was simple:

mkfifo stream.y4m
	
# playing in mpv (e.g., for previewing the script's result)
vspipe ~/test.vpy stream.y4m --y4m & mpv stream.y4m

# encoding
vspipe ~/test.vpy stream.y4m --y4m & x264 --crf 20 --preset fast --output test.mkv stream.y4m

Here is the basic script I used:

import vapoursynth as vs
import havsfunc

# get the core instance
core = vs.get_core()

# Load havsfunc, which provides QTGMC among other tools
haf = havsfunc.HAvsFunc()

# open a video file; ret is now a clip object
ret = core.ffms2.Source(source='/tmp/v.mpg')

ret = core.std.Trim(clip=ret, first=0, last=1000) # take initial frames for testing

# try one of the HAvsFunc scripts. Note that autoloading worked, as long as plugins were installed
# e.g., Deblock_QED required plugins: fmtconv (patched PKGBUILD with -march=native), deblock, dctfilter - all installed from git version AUR packages
#ret = haf.Deblock_QED(ret)

# QTGMC
ret = haf.QTGMC( ret, Preset='Slow', TFF=True)

# set the clip to be output
ret.set_output()

Offline

#2 2014-11-22 16:58:45

sl1pkn07
Member
From: Spanishtán
Registered: 2010-03-30
Posts: 371

Re: QTGMC on Vapoursynth running natively in Linux, but no fft3dfilter

doom9 is your friend

you can ask to tsp (fft3dGPU) or Fizick (FFT3DFilter)  if can port his plugin to vapoursynth

Last edited by sl1pkn07 (2014-11-22 17:43:59)

Offline

#3 2014-11-23 10:43:58

ezacaria
Member
Registered: 2007-12-10
Posts: 113

Re: QTGMC on Vapoursynth running natively in Linux, but no fft3dfilter

OK, will eventually do.

By the way, thanks for keeping those AUR packages!

Offline

#4 2015-07-29 18:22:35

jose1711
Member
Registered: 2006-07-08
Posts: 144

Re: QTGMC on Vapoursynth running natively in Linux, but no fft3dfilter

thank you for posting this - got me going. now.. using the script nowadays yields an error:

Traceback (most recent call last):
  File "src/cython/vapoursynth.pyx", line 1469, in vapoursynth.vpy_evaluateScript (src/cython/vapoursynth.c:24755)
  File "test2.vpy", line 6, in <module>
    haf = havsfunc.HAvsFunc()
NameError: name 'havsfunc' is not defined

here's a working one:

import vapoursynth as vs
import havsfunc as haf
core = vs.get_core()
ret = core.ffms2.Source(source='/tmp/test.dv')
ret = haf.QTGMC( ret, Preset='Placebo', TFF=True)
ret.set_output()

also, fft3dfilter exists in aur so thank you for that (without it i could not use placebo effect for qtgmc).

Offline

#5 2015-08-01 12:52:23

ezacaria
Member
Registered: 2007-12-10
Posts: 113

Re: QTGMC on Vapoursynth running natively in Linux, but no fft3dfilter

Thanks for the good news!

Back when I started the thread, only the avxsynth version of fft3dfilter existed. Then I lost track of the issue and now I get a nice surprise smile

Last edited by ezacaria (2015-08-01 12:53:38)

Offline

Board footer

Powered by FluxBB