Welcome to Doom9's Forum, THE in-place to be for everyone interested in DVD conversion.

Before you start posting please read the forum rules. By posting to this forum you agree to abide by the rules.

 

Go Back   Doom9's Forum > Capturing and Editing Video > VapourSynth

Reply
 
Thread Tools Search this Thread Display Modes
Old 13th December 2018, 12:45   #81  |  Link
asarian
Registered User
 
Join Date: May 2005
Posts: 1,462
@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.
__________________
Gorgeous, delicious, deculture!
asarian is offline   Reply With Quote
Old 13th December 2018, 13:49   #82  |  Link
ChaosKing
Registered User
 
Join Date: Dec 2005
Location: Germany
Posts: 1,795
So these two links contains all dependencies for bilateralGPU? Can't test myself.
https://mega.nz/#!3ygkwKIA!Oa1vAO9FK..._IMddHZeSEcAeA
https://mega.nz/#!ejAUSCjD!x-s9Aqr95...9JEroASOJY0bt8
__________________
AVSRepoGUI // VSRepoGUI - Package Manager for AviSynth // VapourSynth
VapourSynth Portable FATPACK || VapourSynth Database
ChaosKing is offline   Reply With Quote
Old 13th December 2018, 14:32   #83  |  Link
Wolfberry
Helenium(Easter)
 
Wolfberry's Avatar
 
Join Date: Aug 2017
Location: Hsinchu, Taiwan
Posts: 99
This one is needed, too.
__________________
Monochrome Anomaly
Wolfberry is offline   Reply With Quote
Old 17th December 2018, 02:19   #84  |  Link
asarian
Registered User
 
Join Date: May 2005
Posts: 1,462
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.
__________________
Gorgeous, delicious, deculture!
asarian is offline   Reply With Quote
Old 17th December 2018, 03:03   #85  |  Link
WolframRhodium
Registered User
 
Join Date: Jan 2016
Posts: 162
Quote:
Originally Posted by asarian View Post
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.

Last edited by WolframRhodium; 17th December 2018 at 09:35.
WolframRhodium is offline   Reply With Quote
Old 17th December 2018, 03:18   #86  |  Link
asarian
Registered User
 
Join Date: May 2005
Posts: 1,462
Quote:
Originally Posted by WolframRhodium View Post
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.
__________________
Gorgeous, delicious, deculture!
asarian is offline   Reply With Quote
Old 18th December 2018, 11:12   #87  |  Link
asarian
Registered User
 
Join Date: May 2005
Posts: 1,462
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!
__________________
Gorgeous, delicious, deculture!
asarian is offline   Reply With Quote
Old 18th December 2018, 12:13   #88  |  Link
asarian
Registered User
 
Join Date: May 2005
Posts: 1,462
Quote:
Originally Posted by HolyWu View Post
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:

Code:
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:


Code:
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.
__________________
Gorgeous, delicious, deculture!
asarian is offline   Reply With Quote
Old 18th December 2018, 17:40   #89  |  Link
poisondeathray
Registered User
 
Join Date: Sep 2007
Posts: 5,374
Quote:
Originally Posted by asarian View Post
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!
Quote:
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
poisondeathray is offline   Reply With Quote
Old 18th December 2018, 19:02   #90  |  Link
asarian
Registered User
 
Join Date: May 2005
Posts: 1,462
Quote:
Originally Posted by poisondeathray View Post
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. 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.
__________________
Gorgeous, delicious, deculture!
asarian is offline   Reply With Quote
Old 19th December 2018, 01:22   #91  |  Link
ChaosKing
Registered User
 
Join Date: Dec 2005
Location: Germany
Posts: 1,795
New update, see first post.
I used my build script this time. I hope everything works: https://github.com/theChaosCoder/vap...rtable-FATPACK
__________________
AVSRepoGUI // VSRepoGUI - Package Manager for AviSynth // VapourSynth
VapourSynth Portable FATPACK || VapourSynth Database
ChaosKing is offline   Reply With Quote
Old 30th December 2018, 15:11   #92  |  Link
ThePi7on
Registered User
 
ThePi7on's Avatar
 
Join Date: Jan 2017
Location: Italy
Posts: 7
Quote:
Originally Posted by ChaosKing View Post
New update, see first post.
I used my build script this time. I hope everything works: https://github.com/theChaosCoder/vap...rtable-FATPACK
Thanks for the new update!
Would it be possible to add the new cunet waifu2x models in the next update?
ThePi7on is offline   Reply With Quote
Old 30th December 2018, 18:03   #93  |  Link
ChaosKing
Registered User
 
Join Date: Dec 2005
Location: Germany
Posts: 1,795
If the models are compatible with the VS version of waifu2x, sure.
__________________
AVSRepoGUI // VSRepoGUI - Package Manager for AviSynth // VapourSynth
VapourSynth Portable FATPACK || VapourSynth Database
ChaosKing is offline   Reply With Quote
Old 1st January 2019, 08:39   #94  |  Link
brucethemoose
Registered User
 
Join Date: Sep 2016
Posts: 67
Love this pack, thanks!

Quote:
Originally Posted by ChaosKing View Post
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.
brucethemoose is offline   Reply With Quote
Old 1st January 2019, 10:47   #95  |  Link
ChaosKing
Registered User
 
Join Date: Dec 2005
Location: Germany
Posts: 1,795
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?
__________________
AVSRepoGUI // VSRepoGUI - Package Manager for AviSynth // VapourSynth
VapourSynth Portable FATPACK || VapourSynth Database
ChaosKing is offline   Reply With Quote
Old 1st January 2019, 15:52   #96  |  Link
brucethemoose
Registered User
 
Join Date: Sep 2016
Posts: 67
Quote:
Originally Posted by ChaosKing View Post
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.

Last edited by brucethemoose; 1st January 2019 at 19:03.
brucethemoose is offline   Reply With Quote
Old 28th January 2019, 16:43   #97  |  Link
ChaosKing
Registered User
 
Join Date: Dec 2005
Location: Germany
Posts: 1,795
Quote:
Originally Posted by WorBry View Post
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)

Code:
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}"
__________________
AVSRepoGUI // VSRepoGUI - Package Manager for AviSynth // VapourSynth
VapourSynth Portable FATPACK || VapourSynth Database

Last edited by ChaosKing; 28th January 2019 at 17:22.
ChaosKing is offline   Reply With Quote
Old 1st February 2019, 20:55   #98  |  Link
unix
Registered User
 
Join Date: Aug 2015
Posts: 47
Why I'm getting this error?!

Quote:
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:

Quote:
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()
unix is offline   Reply With Quote
Old 1st February 2019, 22:00   #99  |  Link
ChaosKing
Registered User
 
Join Date: Dec 2005
Location: Germany
Posts: 1,795
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)
__________________
AVSRepoGUI // VSRepoGUI - Package Manager for AviSynth // VapourSynth
VapourSynth Portable FATPACK || VapourSynth Database
ChaosKing is offline   Reply With Quote
Old 2nd February 2019, 08:16   #100  |  Link
unix
Registered User
 
Join Date: Aug 2015
Posts: 47
Quote:
Originally Posted by ChaosKing View Post
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.
unix is offline   Reply With Quote
Reply

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT +1. The time now is 01:27.


Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2024, vBulletin Solutions Inc.