Log in

View Full Version : VapourSynth Portable FATPACK - 64Bit, Editor, Plugins, Scripts, Apps & endless FUN!


Pages : 1 [2] 3 4

ChaosKing
21st October 2018, 08:59
Yes, I just waited for R45 final.

ChaosKing
23rd October 2018, 13:24
New release with Python 2.7.1, VS R45 and some new scripts.

WorBry
24th October 2018, 00:30
Just checked out VapourSynth Portable FATPAK. Don't seem to be able to open the scripts in VirtualDub2 (64bit) for encoding - 'AVI Import Error' - so I assume that, like Myrsloik's portable version, output is VSPipe only ?

https://forum.doom9.org/showthread.php?p=1753199#post1753199

ChaosKing
24th October 2018, 09:28
VirtuabDub opens the files in a different way. You could try to extract vdub inside the VapourSynth64 folder (where python.exe is). But I think this won't work. I will test it later myself.

Myrsloik
24th October 2018, 10:31
Just checked out VapourSynth Portable FATPAK. Don't seem to be able to open the scripts in VirtualDub2 (64bit) for encoding - 'AVI Import Error' - so I assume that, like Myrsloik's portable version, output is VSPipe only ?

https://forum.doom9.org/showthread.php?p=1753199#post1753199

It needs a registered VFW handler in the registry. So no. Unless you manually add that and go otherwise portable.

ChaosKing
24th October 2018, 13:24
@Myrsloik, these are the only reg entries that are necessery to get it to work in vdub, correct?
https://github.com/vapoursynth/vapoursynth/blob/51c89e5fd941c5123dc7b26f854d479976961cfc/installer/vsinstaller.iss#L176

Myrsloik
24th October 2018, 13:35
@Myrsloik, these are the only reg entries that are necessery to get it to work in vdub, correct?
https://github.com/vapoursynth/vapoursynth/blob/51c89e5fd941c5123dc7b26f854d479976961cfc/installer/vsinstaller.iss#L176

Yes yes YEEEEEEEEEES (this message is now long enough)

ChaosKing
22nd November 2018, 00:16
Added seek-test MOD https://www.dropbox.com/s/45pqnaslap2er6b/seek-test.zip?dl=1
Its basically seek-test from here https://gist.github.com/dubhater/3a2c8a59841cae49ecae25cd47ff78d2 with some argparse code + AVISource.

Just extract into root folder and drag&drop your video onto the bat file.


Reliability tester of VapourSynth Source Filters - seek test
Setting End to 100 frames

Press 1 for FFMS2000
2 for L-SMASH-Works
3 for D2V Source
4 for AVISource
Number: 1
ffms2
Clip has 101 frames.
Hashing: 100%
Clip hashed.

Requested frame 0, got new frame with hash fb37336400e36e64070c1ca795fa62d8.
Previous requests: 98 14 66 61 75 54 41 77 26 86 0
Seeking: 100%
Test complete. Seeking issues found :-(

Blovesx
25th November 2018, 04:42
Hello,

Could I get a script from someone who's knowledgable with VapourSynth concerning waifu2x? I'm actually learning, playing and teaching how to use .avs, x264 all the options what they do, mean as well as plugins for AviSynth. My head is already about to explode from all the informations. Someone can be so kind and post me a script ready to use with waifu2x? I will set the settings by myself just learning another thing right now will be just too much. I don't know how this Vapour thing works but can I use the plugin simply to resize my video without the need to encode it again?

I have files ready from converting a DVD trough AviSynth to .mp4 format using x264 so can I just resize my video without the need to re-encoding it again?

Selur
25th November 2018, 06:19
Someone can be so kind and post me a script ready to use with waifu2x?
Here's an example script here WaifuX is used to resize a 640x352 clip to 1280x704:
# Imports
import vapoursynth as vs
core = vs.get_core()
# Loading Plugins
core.std.LoadPlugin(path="I:/Hybrid/64bit/vsfilters/ResizeFilter/Waifu2x/Waifu2x-w2xc.dll")
core.std.LoadPlugin(path="I:/Hybrid/64bit/vsfilters/Support/fmtconv.dll")
core.std.LoadPlugin(path="I:/Hybrid/64bit/vsfilters/SourceFilter/FFMS2/ffms2k.dll")
# Loading F:\TestClips&Co\files\test.avi using FFMS2K
clip = core.ffms2.Source(source="F:/TESTCL~1/files/test.avi",cachefile="E:/Temp/avi_078c37f69bb356e7b5fa040c71584c40_41.ffindex",format=vs.YUV420P8,alpha=False)
# making sure input color matrix is set as unspec
clip = core.resize.Point(clip, matrix_in_s="unspec",range_s="limited")
# making sure frame rate is set to 25/1
clip = core.std.AssumeFPS(clip, fpsnum=25, fpsden=1)
# Setting color range to TV (limited) range.
clip = core.std.SetFrameProp(clip=clip, prop="_ColorRange", intval=1)
# resizing clip to 1280x704
# adjusting bit depth to 32bit
clip = core.fmtc.bitdepth(clip=clip,bits=32)
# resizing using Waifu2x
clip = core.w2xc.Waifu2x(clip=clip, scale=2)
# adjusting bit depth back to 8bit
clip = core.fmtc.bitdepth(clip=clip,bits=8)
# Output
clip.set_output()
if uses ffms2k as source filter and fmctconv to convert to 32bit and bach to 8bit.
Filters always lie inside a separate folder on my systems so I don't rely on auto-loading, but load each filter manually.
I don't know how this Vapour thing works but can I use the plugin simply to resize my video without the need to encode it again?
I have files ready from converting a DVD trough AviSynth to .mp4 format using x264 so can I just resize my video without the need to re-encoding it again?

Not really. In Vapoursynth and Avisynth you first use a source filter to open a (or multiple) source file, filter it and output raw video, so you normally would want to reencode the output of that script one way or the other.

Cu Selur

AlvoErrado2
1st December 2018, 11:55
Avira antivirus started to accuse this file of containing viruses, funny that this has not happened before.

VapourSynth64Portable\VapourSynth64\Lib\site-packages\PyInstaller\bootloader\Windows-64bit\runw.exe

Selur
1st December 2018, 11:55
probably a false positive,..

ChaosKing
1st December 2018, 13:25
Most likely a false positiv. But I don't think PyInstaller should be there... I guess I installed it by mistake while testing stuff. It's easy to confuse python (globally installed) with python.exe in that folder if your shell is open there. You can safely remove the folder.
Maybe this would be a good time to make a bat file for the "package installation" :D

PyInstaller can bundle a py script to an exe file. So I see why it can be seen as potentially harmfull by antivir software.

asarian
12th December 2018, 07:51
In order to use bilateralGPU.dll, you need to have opencv_core320.dll and opencv_cudaimgproc320.dll in the same path.
(Requirements: CUDA-Enabled GPU, OpenCV run-time library with CUDA module)


Where do you find these opencv_core320.dll and opencv_cudaimgproc320.dll. I downloaded the latest OpenCV 4.0, but where nothing in there even remotely with those kind of names.

asarian
12th December 2018, 08:25
In order to use bilateralGPU.dll, you need to have opencv_core320.dll and opencv_cudaimgproc320.dll in the same path.
(Requirements: CUDA-Enabled GPU, OpenCV run-time library with CUDA module)


I downloaded your OpenCV-Python in VapourSynth (https://github.com/WolframRhodium/muvsfunc/wiki/OpenCV-Python-for-VapourSynth), but I keep getting the same error:

Script evaluation failed:
Python exception: No attribute with the name bilateralgpu exists. Did you mistype a plugin namespace?

Traceback (most recent call last):
File "src\cython\vapoursynth.pyx", line 1927, in vapoursynth.vpy_evaluateScript
File "src\cython\vapoursynth.pyx", line 1928, in vapoursynth.vpy_evaluateScript
File "f:\jobs\inter.vpy", line 12, in <module>
vid = fvs.GradFun3mod (vid, smode=5)
File "C:\Users\Mark\AppData\Roaming\Python\Python37\site-packages\fvsfunc.py", line 315, in GradFun3
flt_y = smooth_mod(src_16, ref_16, smode, radius, thr, elast, planes2)
File "C:\Users\Mark\AppData\Roaming\Python\Python37\site-packages\fvsfunc.py", line 163, in smooth_mod
return bilateral_gpu(src_16, ref_16, radius, thr, elast, planes)
File "C:\Users\Mark\AppData\Roaming\Python\Python37\site-packages\fvsfunc.py", line 194, in bilateral_gpu
last = core.bilateralgpu.Bilateral(src, sigma_spatial=r / 2, sigma_color=t,
File "src\cython\vapoursynth.pyx", line 1660, in vapoursynth._CoreProxy.__getattr__
File "src\cython\vapoursynth.pyx", line 1522, in vapoursynth.Core.__getattr__
AttributeError: No attribute with the name bilateralgpu exists. Did you mistype a plugin namespace?

Wolfberry
12th December 2018, 10:57
Where do you find these opencv_core320.dll and opencv_cudaimgproc320.dll. I downloaded the latest OpenCV 4.0, but where nothing in there even remotely with those kind of names.

I never had these, I just use dependency walker on the bilateralGPU.dll, you will have to compile OpenCV 3.2 with CUDA yourself if you want to use it.

Some pre-compiled dlls from OpenCV with CUDA enabled are required, which I had lost them already.

I consider bilateral as a theoretically sound but not practical enough algorithm due to its high computational complexity. I prefer Guided Filter (https://github.com/WolframRhodium/muvsfunc/blob/681339624d375eb1b5ee372a01145a62704a1f87/muvsfunc.py#L2805), Edge BMA Filter (https://github.com/WolframRhodium/muvsfunc/blob/681339624d375eb1b5ee372a01145a62704a1f87/muvsfunc.py#L3763), LLSURE (https://github.com/WolframRhodium/muvsfunc/blob/681339624d375eb1b5ee372a01145a62704a1f87/muvsfunc.py#L3882) or other edge-preserving filters provided by OpenCV (https://docs.opencv.org/3.4.2/da/d17/group__ximgproc__filters.html) over bilateral filter.
I downloaded OpenCV-Python in VapourSynth (https://github.com/WolframRhodium/muvsfunc/wiki/OpenCV-Python-for-VapourSynth)
The OpenCV-Python only enables you to use opencv through muvsfunc_numpy.py (https://github.com/WolframRhodium/muvsfunc/blob/master/Collections/muvsfunc_numpy.py), the dll you are trying to use still has missing dependencies, which I don't have.

asarian
12th December 2018, 11:05
I never had these, I just use dependency walker on the bilateralGPU.dll, you will have to compile OpenCV 3.2 with CUDA yourself if you want to use it.

The OpenCV-Python only enables you to use opencv through muvsfunc_numpy.py (https://github.com/WolframRhodium/muvsfunc/blob/master/Collections/muvsfunc_numpy.py), the dll you are trying to use still has missing dependencies, which I don't have.

Thanks for the swift reply. :) Only reason I wanted to use GradFun3mod from fvsfunc to begin with, is because it's GPU-assisted, and core.f3kdb.Deband is too slow (as it's single-threaded).

Yeah, those dependency dll's are hard to find. :) I'll see if I can get them compiled myself; but if it's all becoming too much of a hassle, I'll just look for another deband tool.

ChaosKing
12th December 2018, 11:53
I get 300fps with f3kdb.Deband() on a 1080p source ...
There is also GradFun3 in muvsfunc.

Edit:
https://github.com/SAPikachu/flash3kyuu_deband/blob/9b896a6bb0536d184964590ab4fef59ab4a6be3c/src/vapoursynth/plugin.cpp#L164
Its not single threaded.

WolframRhodium
12th December 2018, 12:03
Yeah, those dependency dll's are hard to find. :) I'll see if I can get them compiled myself; but if it's all becoming too much of a hassle, I'll just look for another deband tool.


I have just uploaded the dependencies at https://mega.nz/#!3ygkwKIA!Oa1vAO9FKjwd7ptr1CRSSwgCrId4Y_IMddHZeSEcAeA

Anyway, bilateralGPU is slower than other suggested alternatives although it is the only one that is accelerated by a GPU.

asarian
12th December 2018, 12:24
I have just uploaded the dependencies at https://mega.nz/#!3ygkwKIA!Oa1vAO9FKjwd7ptr1CRSSwgCrId4Y_IMddHZeSEcAeA

Anyway, bilateralGPU is slower than other suggested alternatives although it is the only one that is accelerated by a GPU.

Thank you greatly! Been looking for those for hours! :)

import vapoursynth as vs
import fvsfunc as fvs

core = vs.get_core ()
core.max_cache_size = 16384

core.avs.LoadPlugin ("C:/Program Files (x86)/dgdecnv/x64 Binaries/DGDecodeNV.dll")
core.std.LoadPlugin ("C:/VS/cuda/bilateralGPU.dll")

vid = core.avs.DGSource (r'i:\jobs\inter.dgi', resize_w=1920, resize_h=1080, fulldepth=True)
vid = core.dghdrtosdr.DGHDRtoSDR (clip=vid, fulldepth=False)
vid = core.avs.DGDenoise (vid, strength=0.12, searchw=9)
vid = fvs.GradFun3mod (vid, smode=5)

vid.set_output ()



I created a special cuda folder for bilateralGPU.dll, and put the dependencies inside, but still no go:

Script evaluation failed:
Python exception: Failed to load C:/VS/cuda/bilateralGPU.dll. GetLastError() returned 126. A DLL dependency is probably missing.

Traceback (most recent call last):
File "src\cython\vapoursynth.pyx", line 1927, in vapoursynth.vpy_evaluateScript
File "src\cython\vapoursynth.pyx", line 1928, in vapoursynth.vpy_evaluateScript
File "f:\jobs\inter.vpy", line 8, in <module>
core.std.LoadPlugin ("C:/VS/cuda/bilateralGPU.dll")
File "src\cython\vapoursynth.pyx", line 1833, in vapoursynth.Function.__call__
vapoursynth.Error: Failed to load C:/VS/cuda/bilateralGPU.dll. GetLastError() returned 126. A DLL dependency is probably missing.

asarian
12th December 2018, 13:02
I get 300fps with f3kdb.Deband() on a 1080p source ...
There is also GradFun3 in muvsfunc.

Edit:
https://github.com/SAPikachu/flash3kyuu_deband/blob/9b896a6bb0536d184964590ab4fef59ab4a6be3c/src/vapoursynth/plugin.cpp#L164
Its not single threaded.


You appear to have a newer version of f3kdb.Deband. :) Thx. It's still the weakest link in my setup, though (probably because it doesn't do GPU).

And I saw GradFun3 in muvsfunc, but that one is sadly also not GPU-accelerated.

WolframRhodium
12th December 2018, 13:48
I created a special cuda folder for bilateralGPU.dll, and put the dependencies inside, but still no go:


Please put them in the same folder as other plugins (vapoursynth\plugins64, for example), otherwise VapourSynth won't load them.

asarian
12th December 2018, 14:08
Please put them in the same folder as other plugins (vapoursynth\plugins64, for example), otherwise VapourSynth won't load them.

I had already done that, but that didn't work either. ;)

After having been up for nearly 24 hours, I finally started a reencoding process with f3kdb.Deband(). So, tomorrow I will try this again.

N.B. The reason I didn't put them inside the plugins64 directory directly, was because I figured VS trying to autoload all these dependencies (as 64-bit VS plugins) might fail; so I did the LoadPlugin for "C:/VS/cuda/bilateralGPU.dll", and hoped the latter would then itself see and load the dependencies in its own directory).

WolframRhodium
12th December 2018, 14:49
I had already done that, but that didn't work either. ;)

Here (https://mega.nz/#!vqYi3SSL!4k11VV6d4YUmAjDUHXJeEcigI1OsvHYpriJzQlS2DRs) are additional dependencies that might help, if you don't have any of (cudart64_80.dll, npp?64_80.dll) in your search path.

Selur
12th December 2018, 19:22
@WolframRhodium: Got a similar problem using the portable version of Vapoursynth and:
# Imports
import os
import sys
import vapoursynth as vs
core = vs.get_core()
import ctypes
# Loading Support Files
Dllref = ctypes.windll.LoadLibrary("I:/Hybrid/64bit/vsfilters/Support/OpenCL.dll")
Dllref = ctypes.windll.LoadLibrary("I:/Hybrid/64bit/vsfilters/Support/libfftw3f-3.dll")
Dllref = ctypes.windll.LoadLibrary("I:/Hybrid/64bit/vsfilters/Support/BilateralGPU/cudart64_80.dll")
Dllref = ctypes.windll.LoadLibrary("I:/Hybrid/64bit/vsfilters/Support/BilateralGPU/nppc64_80.dll")
Dllref = ctypes.windll.LoadLibrary("I:/Hybrid/64bit/vsfilters/Support/BilateralGPU/nppi64_80.dll")
Dllref = ctypes.windll.LoadLibrary("I:/Hybrid/64bit/vsfilters/Support/BilateralGPU/npps64_80.dll")
# Import scripts folder
scriptPath = 'I:/Hybrid/64bit/vsscripts'
sys.path.append(os.path.abspath(scriptPath))
# Loading Plugins
core.std.LoadPlugin(path="I:/Hybrid/64bit/vsfilters/ResizeFilter/nnedi3/vsznedi3.dll")
core.std.LoadPlugin(path="I:/Hybrid/64bit/vsfilters/DenoiseFilter/DFTTest/DFTTest.dll")
core.std.LoadPlugin(path="I:/Hybrid/64bit/vsfilters/Support/libdescale.dll")
core.std.LoadPlugin(path="I:/Hybrid/64bit/vsfilters/Support/fmtconv.dll")
core.std.LoadPlugin(path="I:/Hybrid/64bit/vsfilters/Support/BilateralGPU/bilateralGPU.dll")
core.std.LoadPlugin(path="I:/Hybrid/64bit/vsfilters/SourceFilter/FFMS2/ffms2k.dll")
# Import scripts
import edi_rpow2
import fvsfunc
import havsfunc
import muvsfunc
# Loading F:\TestClips&Co\files\Test-AC3-5.1.avi using FFMS2K
clip = core.ffms2.Source(source="F:/TESTCL~1/files/TEST-A~1.AVI",cachefile="E:/Temp/avi_4a88093b3b83d19d00642a5a96b0af78_41.ffindex",format=vs.YUV420P8,alpha=False)
# making sure input color matrix is set as unspec
clip = core.resize.Point(clip, matrix_in_s="unspec",range_s="limited")
# making sure frame rate is set to 25/1
clip = core.std.AssumeFPS(clip, fpsnum=25, fpsden=1)
# Setting color range to TV (limited) range.
clip = core.std.SetFrameProp(clip=clip, prop="_ColorRange", intval=1)
# Debanding using GradFun3Mod
clip = fvsfunc.GradFun3(src=clip, smode=5)
# adjusting output color from: YUV420P16 to YUV420P8 for x264Model (i420)
clip = core.resize.Bicubic(clip=clip, format=vs.YUV420P8, range_s="limited")
# Output
clip.set_output()
so all the dependancy files are next to the bilaterialGPU.dll and are explicitly loaded and I still get:
Failed to evaluate the script:
Python exception: Failed to load I:/Hybrid/64bit/vsfilters/Support/BilateralGPU/bilateralGPU.dll. GetLastError() returned 126. A DLL dependency is probably missing.

Traceback (most recent call last):
File "src\cython\vapoursynth.pyx", line 1927, in vapoursynth.vpy_evaluateScript
File "src\cython\vapoursynth.pyx", line 1928, in vapoursynth.vpy_evaluateScript
File "E:\Temp\tempPreviewVapoursynthFile19_11_17_981.vpy", line 22, in <module>
core.std.LoadPlugin(path="I:/Hybrid/64bit/vsfilters/Support/BilateralGPU/bilateralGPU.dll")
File "src\cython\vapoursynth.pyx", line 1833, in vapoursynth.Function.__call__
vapoursynth.Error: Failed to load I:/Hybrid/64bit/vsfilters/Support/BilateralGPU/bilateralGPU.dll. GetLastError() returned 126. A DLL dependency is probably missing.

Any idea how to get this working? (I'm on Win10 with a Ryzen 7 1800X and a Geforce GTX 1070 Ti)

Cu Selur

Wolfberry
13th December 2018, 02:07
I have just uploaded the dependencies at https://mega.nz/#!3ygkwKIA!Oa1vAO9FKjwd7ptr1CRSSwgCrId4Y_IMddHZeSEcAeA

Anyway, bilateralGPU is slower than other suggested alternatives although it is the only one that is accelerated by a GPU.

This is the first part of the dependency (you only loaded the second part)

asarian
13th December 2018, 03:09
I think we're nearly there. :) (Thanks to the gurus who so generously contributed their dependencies and time). Using 'Dependency Walker', looks like only 1 dll is still missing: CUFFT64_80.DLL

So, if anyone has it, please share!

WolframRhodium
13th December 2018, 03:35
Using 'Dependency Walker', looks like only 1 dll is still missing: CUFFT64_80.DLL

Here (https://mega.nz/#!ejAUSCjD!x-s9Aqr95iVWY8-NWloaNLMsEuh6o9JEroASOJY0bt8) it is.

asarian
13th December 2018, 03:56
Here (https://mega.nz/#!ejAUSCjD!x-s9Aqr95iVWY8-NWloaNLMsEuh6o9JEroASOJY0bt8) it is.

Thank you! :) My current encoding still has 6 hours to go, but things are looking up, from Dependency Walker's perspective: no more missing .dlls reported. I'll let you know how it goes.

EDIT: P.S. bilateralGPU.dll better be worth it, for all the trouble. :p But I have a good feeling about it: you can't go wrong with GPU-assisted stuff.

And thanks to the guy above for the Dllref = ctypes.windll.LoadLibrary trick: it solves my issue having VS not try and load these as native VS filters.

Selur
13th December 2018, 05:48
Thanks @Wolfberry&WolframRhodium, got it working now. (754MB of dependencies later ;))

asarian
13th December 2018, 12:45
@Wolfberry & @WolframRhodium, thank you both kindly for your great assistance! :) I finally got it working! My, that was a lot of sweat for just bilateralGPU.dll. :) But the good news is, I went from 2.9 fps to 4.78 fps (including the vspipe to x264 process, of course); and I can visually see (GPU-Z) my video card getting taxed more. So, gentlemen, this was well worth the effort! So, thank you both again.

I'm not sure the forum rules would allow such a thing, but, if so, would be nice if the starter post could contain a link to a small 'dependency' repository for bilateralGPU. I know it's just 1 filter, but debanding is something I'm sure a lot of ppl are doing (because of compression), and with the big GPU's out there, I can attest that it's definitely a worthwhile filter. And for ppl who didn't have those dependencies, some of those are impossible to find on the net.

P.S. Actually, the whole 'Dllref = ctypes.windll.LoadLibrary' trick didn't work for me. I simply put core.std.LoadPlugin ("C:/VS/cuda/bilateralGPU.dll"), and had stuck all dependencies inside the C:/VS/cuda/ folder (figuring, as expected, that libraries always look inside their own directory for dependencies first, which worked).

Again, thank you guys, and especially you, @Wolfberry. I know I tend to ask a lot of questions, but you made me very happy today, and I'm pretty sure others will be happy with the result too. :)

ChaosKing
13th December 2018, 13:49
So these two links contains all dependencies for bilateralGPU? Can't test myself.
https://mega.nz/#!3ygkwKIA!Oa1vAO9FKjwd7ptr1CRSSwgCrId4Y_IMddHZeSEcAeA
https://mega.nz/#!ejAUSCjD!x-s9Aqr95iVWY8-NWloaNLMsEuh6o9JEroASOJY0bt8

Wolfberry
13th December 2018, 14:32
This one (https://mega.nz/#!vqYi3SSL!4k11VV6d4YUmAjDUHXJeEcigI1OsvHYpriJzQlS2DRs) is needed, too.

asarian
17th December 2018, 02:19
Speaking of GradFun3, I'm really loving the GPU-assisted speed. :) GradFun3 doesn't come with presets, though. Usually I did:

vid = core.f3kdb.Deband (vid, preset="medium", dither_algo=2)

What settings could I use on GradFun3 to achieve a similar strength as on f3kdb.Deband? In its default state, the debanding of GradFun3 is too little, for my taste.

WolframRhodium
17th December 2018, 03:03
Speaking of GradFun3, I'm really loving the GPU-assisted speed. :) GradFun3 doesn't come with presets, though. Usually I did:

vid = core.f3kdb.Deband (vid, preset="medium", dither_algo=2)

What settings could I use on GradFun3 to achieve a similar strength as on f3kdb.Deband? In its default state, the debanding of GradFun3 is too little, for my taste.

You can increase 'thr', 'radius' and 'elast', especially the first one, which should be the most important parameter that controls the strength.

asarian
17th December 2018, 03:18
You can increase 'thr', 'radius' and 'elast', especially the first one, which should be the most import parameter that controls the strength.

Thx. I'm not that mathematical, so most of these options usually dazzle me. :)

asarian
18th December 2018, 11:12
After several days of testing, I hate to admit that vid = core.f3kdb.Deband (vid, preset="medium", dither_algo=2) does a much better job of preserving the gradients than, for example, vid = fvs.GradFun3 (src=vid, thr=0.6, radius=16, elast=4.0, smode=5), even though the loss of non GPU-assisted processing is felt dearly. Dunno, but for some reason x264 just eats thru GradFun3 like crazy (and I use x264 with very high settings, for quality). Feels like the pattern of f3kdb.Deband is just more compression-resilient somehow. Unless I'm doing GradFun3 wrong, of course (always a possibility).

So, here's to hoping f3kdb.Deband gets ported to GPU one day! :)

asarian
18th December 2018, 12:13
Are you kidding? f3kdb already runs at 100+ fps with a 1920x1080 video. What makes you think that f3kdb is the bottleneck of your filtering chain?

Because it is. :) Keep in mind, that if you use a GPU-assisted debander, it doesn't take any CPU (or nothing you will notice, at least).

The x264 process usurps about 85-92%; vspipe around 1.7% (max). Which means the x246 process doesn't get enough data fast enough to fully saturate the CPU. The whole vspipe process (with x264) takes around 93% CPU, on average. In practice, this means I process around 2.95 fps with f3kdb (as last in the chain), and ca. 4.25 fps with bilateralGPU-assisted GradFun3.

The script itself is nothing special; like:

import vapoursynth as vs

core = vs.get_core ()
core.max_cache_size = 16384

core.avs.LoadPlugin ("C:/Program Files (x86)/dgdecnv/x64 Binaries/DGDecodeNV.dll")

vid = core.avs.DGSource (r'f:\jobs\jup.dgi', resize_w=1920, resize_h=1080, fulldepth=True)
vid = core.dghdrtosdr.DGHDRtoSDR (clip=vid, fulldepth=False)
vid = core.avs.DGDenoise (vid, strength=0.1, searchw=9)
vid = core.f3kdb.Deband (vid, preset="medium", dither_algo=2)

vid.set_output ()



Versus GradFun3:


import vapoursynth as vs
import fvsfunc as fvs

core = vs.get_core ()
core.max_cache_size = 16384

core.avs.LoadPlugin ("C:/Program Files (x86)/dgdecnv/x64 Binaries/DGDecodeNV.dll")
core.std.LoadPlugin ("C:/VS/cuda/bilateralGPU.dll")

vid = core.avs.DGSource (r'i:\jobs\jup.dgi', resize_w=1920, resize_h=1080, fulldepth=True)
vid = core.dghdrtosdr.DGHDRtoSDR (clip=vid, fulldepth=False)
vid = core.avs.DGDenoise (vid, strength=0.1, searchw=9)
vid = fvs.GradFun3 (src=vid, thr=0.6, radius=16, elast=4.0, smode=5)

vid.set_output ()




2.95 fps vs. 4.25 fps may not seem like much, but it's the difference between roughly waiting 16 hours before job-completion, or a full 24.

poisondeathray
18th December 2018, 17:40
After several days of testing, I hate to admit that vid = core.f3kdb.Deband (vid, preset="medium", dither_algo=2) does a much better job of preserving the gradients than, for example, vid = fvs.GradFun3 (src=vid, thr=0.6, radius=16, elast=4.0, smode=5), even though the loss of non GPU-assisted processing is felt dearly. Dunno, but for some reason x264 just eats thru GradFun3 like crazy (and I use x264 with very high settings, for quality). Feels like the pattern of f3kdb.Deband is just more compression-resilient somehow. Unless I'm doing GradFun3 wrong, of course (always a possibility).

So, here's to hoping f3kdb.Deband gets ported to GPU one day! :)


2.95 fps vs. 4.25 fps


What about 10bit encoding ? In general, 10bit encoding is slower than 8bit , but you likely do not even need to apply a debanding filter

asarian
18th December 2018, 19:02
What about 10bit encoding ? In general, 10bit encoding is slower than 8bit , but you likely do not even need to apply a debanding filter

That's a good idea. :goodpost: I haven't done 10-bit encodings yet; primarily, really, because I've been off this world for a spell, x264-wise, and only recently got interested in re-encoding again, now UHD Blu-rays became available. And I haven't even checked whether Kodi can even play it properly (although it should, as it can handle my UHD disc too).

What you're saying sounds very logical, though: 10-bit encoding should work wonders for gradients. And without a debanding filter, things go much faster still (ca. 5.15 fps). My next encode can start in about 6 hours. I shall try out a 10-bit conversion, and will report back. Thanks.

ChaosKing
19th December 2018, 01:22
New update, see first post.
I used my build script this time. I hope everything works: https://github.com/theChaosCoder/vapoursynth-portable-FATPACK

ThePi7on
30th December 2018, 15:11
New update, see first post.
I used my build script this time. I hope everything works: https://github.com/theChaosCoder/vapoursynth-portable-FATPACK

Thanks for the new update!
Would it be possible to add the new cunet (https://github.com/nagadomi/waifu2x/tree/master/models/cunet/art)waifu2x models in the next update?

ChaosKing
30th December 2018, 18:03
If the models are compatible with the VS version of waifu2x, sure.

brucethemoose
1st January 2019, 08:39
Love this pack, thanks!

If the models are compatible with the VS version of waifu2x, sure.

Speaking of Waifu, could you throw in some of muvsfunc's super_resolution dependancies? I guess you can't distribute cuDNN/CUDA, but I got most of what I needed in the Python directory with "pip install mxnet-cu92 --pre"

You could even add a few of the upscaling models with presets, but that's kinda a stretch since they're big files. Also, I'm not sure which ones are best to add yet... Need more testing.


Another small request: ffmpeg, just for a GPU encoding preset. GPU 10-bit hevc isn't so bad these days, especially if speed is a priority.

ChaosKing
1st January 2019, 10:47
Hmm I don't really want to ship a big chunk of dependencies that only nvidia users can use and since I only have a amd card here I can't test it myself. But I could link to a zip package similar to the bilineargpu plugin...

I think I can at least add some bat or vseditor-templates for ffmpeg (gpu) encoding. You use NVenc I guess?

brucethemoose
1st January 2019, 15:52
Hmm I don't really want to ship a big chunk of dependencies that only nvidia users can use and since I only have a amd card here I can't test it myself. But I could link to a zip package similar to the bilineargpu plugin...

I think I can at least add some bat or vseditor-templates for ffmpeg (gpu) encoding. You use NVenc I guess?

Yeah. Reasonably new AMD GPUs and Intel IGPs support hardware encoding too, I used to do it on my 7950 pretty regularly.

Also, there's a mxnet package that supports either Intel CPUs or Nvidia GPUs, depending on which is available. It's not too big, so I don't think it would hurt to include it: https://pypi.org/project/mxnet-cu92mkl/

AMD support for MXNet is coming soon, AFAIK... I'm on an Nvidia GPU atm, so in the meantime I can help test if you want.

ChaosKing
28th January 2019, 16:43
Just checked out VapourSynth Portable FATPAK. Don't seem to be able to open the scripts in VirtualDub2 (64bit) for encoding - 'AVI Import Error' - so I assume that, like Myrsloik's portable version, output is VSPipe only ?


Finally tested the vfw stuff. It seems these reg entries are enough to get vdub to read vpy files:^
(don't use it if you have vapoursynth already installed)

Windows Registry Editor Version 5.00

[HKEY_LOCAL_MACHINE\SOFTWARE\Classes\CLSID\{58F74CA0-BD0E-4664-A49B-8D10E6F0C131}]
@="VapourSynth"

[HKEY_LOCAL_MACHINE\SOFTWARE\Classes\CLSID\{58F74CA0-BD0E-4664-A49B-8D10E6F0C131}\InProcServer32]
@="D:\\VapourSynth64Portable\\VapourSynth64\\VSVFW.dll"
"ThreadingModel"="Apartment"


[HKEY_LOCAL_MACHINE\SOFTWARE\Classes\AVIFile]

[HKEY_LOCAL_MACHINE\SOFTWARE\Classes\AVIFile\Extensions\VPY]
@="{58F74CA0-BD0E-4664-A49B-8D10E6F0C131}"

unix
1st February 2019, 20:55
Why I'm getting this error?!

File "...VapourSynth64Portable\Scripts\CSMOD.py", line 1117, in CSMOD
sharpdiff2 = core.focus.TemporalSoften(sharpdiff, 1, 255, 255 if chroma else 0, 32, 2)
File "src\cython\vapoursynth.pyx", line 1803, in vapoursynth.Function.__call__
vapoursynth.Error: TemporalSoften: Too many unnamed arguments specified


script:

import fvsfunc as fvf#
import havsfunc as hvf #
import hnwvsfunc as hnwvsfunc
import CSMOD as cs

src = core.lsmas.LWLibavSource(source='69.mkv')
src = hvf.daa(src).std.AssumeFPS(fpsnum=24000,fpsden=1001)
c = cs.CSMOD(src, ss_w=2, ss_h=2, ssout=True)
c.set_output()

ChaosKing
1st February 2019, 22:00
Remove libfocus-em64t.dll and try again. There are currently 2 TemporalSoften dlls with the same namespace inside the plugins folder. (VapourSynth64Portable\VapourSynth64\vapoursynth64\plugins)

unix
2nd February 2019, 08:16
Remove libfocus-em64t.dll and try again. There are currently 2 TemporalSoften dlls with the same namespace inside the plugins folder. (VapourSynth64Portable\VapourSynth64\vapoursynth64\plugins)

It works
Thanx.