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. |
11th December 2018, 00:31 | #22 | Link |
Registered User
Join Date: Mar 2017
Posts: 2
|
Hi, sorry if this is the wrong place to be posting this, but I'm having some trouble with this plugin. There's a good chance that my vapoursynth script is simply wrong, since I only started using it yesterday. (I used Avisynth for years; finally made the switch for this plugin).
Vapoursynth Script: Code:
import vapoursynth as vs core = vs.get_core() vid = core.ffms2.Source(source=r'D:\path\to\source.vob') #vid = core.std.Trim(vid, 0, 238) #vid = core.nnedi3.nnedi3(vid, field=1, dh=False, nsize=6, nns=1, qual=1, etype=0, pscrn=2, opt=True, int16_prescreener=True, int16_predictor=True, exp=2, show_mask=False, combed_only=False) vid = core.fmtc.bitdepth(vid, bits=32) vid = core.w2xc.Waifu2x(vid, noise=0, scale=2, block=512, photo=False, gpu=1, processor=-1, list_proc=False, log=False) vid = core.fmtc.bitdepth(vid, bits=16) vid = core.std.AssumeFPS(vid, fpsnum=30000, fpsden=1001) vid.set_output() Code:
for %%f in (*.vpy) do START "vspipe" /B /BELOWNORMAL /WAIT "C:\Program Files (x86)\VapourSynth\core64\vspipe.exe" "%%f" - | "C:\Program Files\x265\x265.exe" --input - --input-depth 16 --fps 30000/1001 --input-res 1440x960 --output-depth 10 --level-idc 5.0 --no-high-tier --profile main10 -preset slow --psy-rd 0.4 --aq-strength 0.6 --crf 23 --ref 6 -o "converted/%%~nf_slow_10bit_crf23_vs.hevc" Code:
ID : 224 (0xE0) Format : MPEG Video Format version : Version 2 Format profile : Main@Main Format settings : CustomMatrix / BVOP Format settings, BVOP : Yes Format settings, Matrix : Custom Format settings, GOP : Variable Format settings, picture structure : Frame Duration : 26 min 35 s Bit rate mode : Variable Bit rate : 7 641 kb/s Maximum bit rate : 8 000 kb/s Width : 720 pixels Height : 480 pixels Display aspect ratio : 4:3 Frame rate : 29.970 (30000/1001) FPS Standard : NTSC Color space : YUV Chroma subsampling : 4:2:0 Bit depth : 8 bits Scan type : Interlaced Scan order : Top Field First Compression mode : Lossy Bits/(Pixel*Frame) : 0.738 Time code of first frame : 00:00:00:00 Time code source : Group of pictures header GOP, Open/Closed : Open GOP, Open/Closed of first frame : Closed Stream size : 1.42 GiB (88%) The two commented-out lines don't seem to matter whether they're included or not. Commenting out the Waifu2x line and halving the resolution in the command-line works as expected. With GPU=1, the whole thing terminates rather abruptly with x265 simply stating "encoded 0 frames". With GPU=0, it runs, but the output is garbage, a technicolor silhouette of the original source. Sorry about the lack of a log; I can't figure out how to produce one with vspipe. Setting log=True in Waifu2x doesn't appear to do anything. Edit: Forgot to mention that I tried lowering the blocksize, but that didn't improve anything. Also I have gotten the old x32 Waifu2x for Avisynth to run, but it's incredibly slow. Edit2: So, I discovered VSEdit. GPU=1 causes VSEdit to immediately close itself. GPU=0 will actually display a preview that looks pretty good, though the colors are off compared to source/avisynth-w2x. I tested with just the fmtc bit-depth conversions, commenting out w2x, and the colors come out fine that way. It was also surprisingly fast. GPU=2 also works, but is about as fast as GPU=0 and has the same color issue. Last edited by 2gig; 11th December 2018 at 08:06. |
11th December 2018, 15:39 | #23 | Link | |
Registered User
Join Date: Aug 2006
Location: Taiwan
Posts: 392
|
Quote:
Update r12 by the way.
Last edited by HolyWu; 11th December 2018 at 15:47. |
|
12th December 2018, 01:28 | #24 | Link | |
Registered User
Join Date: Mar 2017
Posts: 2
|
Quote:
Edit: Actually I was wrong. The color-changing issue still exists. The changes in color appear identical to those of the last example I linked, even though that one was made with w2xc. Edit2: Changing block_w=512, block_h=512 to block_w=720, block_h=480 (source dimensions) and cropping after w2x improved speed considerably. Colors are still off. Edit3: I found the source of my confusion regarding the color-change. The color change does not appear in VSEdit, only VSPipe. So I guess that probably means it's not anything to do with this plugin. I also didn't know that telecine was a thing. I've only worked on Blu-Ray/UHD stuff until recently. I looked it up and I am fairly certain that my source is indeed telecine. Quite confusing when mediainfo tells me interlaced. So I am now using vivtc instead of a deinterlacer. I will also look up and add to my plugins znedi3 for when I need to work on interlaced content in the future. Thank you. You have been extremely helpful. (Edited) Current VPY for reference: Code:
import vapoursynth as vs core = vs.get_core() vid = core.ffms2.Source(source=r'D:\path\to\source.vob') vid = core.vivtc.VFM(vid, order=1, mode=0) vid = core.vivtc.VDecimate(vid) vid = core.fmtc.resample (clip=vid, css="444") vid = core.fmtc.matrix (clip=vid, mat="601", col_fam=vs.RGB) vid = core.fmtc.bitdepth (clip=vid, bits=32) vid = core.caffe.Waifu2x(vid, noise=-1, scale=4, block_w=720, block_h=480, model=6, cudnn=True, tta=False) vid = core.fmtc.matrix (clip=vid, mat="601", col_fam=vs.YUV, bits=32) vid = core.fmtc.resample (clip=vid, css="420") vid = core.fmtc.bitdepth (clip=vid, bits=8) vid = core.std.Crop(vid, 24, 24, 24, 8) vid = core.resize.Lanczos(vid, 1440, 1080) vid = core.std.AssumeFPS(vid, fpsnum=24000, fpsden=1001) vid.set_output() Last edited by 2gig; 12th December 2018 at 07:12. |
|
30th January 2019, 05:23 | #25 | Link |
Registered User
Join Date: Aug 2006
Location: Taiwan
Posts: 392
|
Update r12.
Update r13.
|
8th April 2019, 12:51 | #26 | Link | |
Registered User
Join Date: Jan 2018
Posts: 3
|
Not sure if this is a VS or waifu2x caffe thing, but using scripts with caffe seems to cause large amounts of virtual memory to be committed, even with core.max_cache_size set to 5124. Physical memory use seems to adhere to the memory limit, though, even if there's about 6gb of extra "available" physical memory and 3gb free VRAM.
I'd just ignore it since memory is meant to be used anyway but when it hits my commit cap virtualdub64 crashes. Video output before the crash is fine and cunet denoiser seems much more accurate than upconv. Example script (source res is 720x480): Quote:
|
|
8th April 2019, 16:02 | #27 | Link | |
Registered User
Join Date: Aug 2006
Location: Taiwan
Posts: 392
|
Quote:
|
|
8th April 2019, 22:52 | #28 | Link |
Registered User
Join Date: Jan 2018
Posts: 3
|
Batch 1 does drop ram use by about 3gb. Looking at it again in perfmon it seems windows commits the total local and VRAM use combined, so when a script uses 5gb and waifu uses 6gb VRAM the commit charge rises by 11gb. Seems to consider VRAM use part of the total but crashes at the regular motherboard + virtual memory limit.
|
11th October 2019, 17:39 | #29 | Link |
Registered User
Join Date: Dec 2005
Location: Germany
Posts: 1,795
|
There is a much faster Waifu2x "anime" version available on https://github.com/aka-katto/dandere2x
It is faster because it processes only the changed parts of the next frame https://github.com/aka-katto/dandere...andere2x-Works Maybe this could also be ported to VS? p.s. There is also a vulkan version of Waifu2x (for AMD users) https://github.com/nihui/waifu2x-ncnn-vulkan
__________________
AVSRepoGUI // VSRepoGUI - Package Manager for AviSynth // VapourSynth VapourSynth Portable FATPACK || VapourSynth Database |
12th October 2019, 12:50 | #30 | Link | |
Registered User
Join Date: Aug 2006
Location: Taiwan
Posts: 392
|
Quote:
|
|
12th October 2019, 12:53 | #31 | Link |
Registered User
Join Date: Dec 2005
Location: Germany
Posts: 1,795
|
That's great news
__________________
AVSRepoGUI // VSRepoGUI - Package Manager for AviSynth // VapourSynth VapourSynth Portable FATPACK || VapourSynth Database |
4th December 2019, 08:32 | #32 | Link | |
Registered User
Join Date: Oct 2001
Posts: 454
|
Quote:
|
|
12th December 2019, 23:02 | #33 | Link | |
Registered User
Join Date: Oct 2019
Posts: 3
|
Quote:
Some of the older 2x mxnet models are pretty quick in Kice's MXNet plugin as well. Unfortunately, neither is particularly easy to set up :/ |
|
13th December 2019, 00:04 | #34 | Link |
Registered User
Join Date: Dec 2005
Location: Germany
Posts: 1,795
|
This one is easy https://github.com/Nlzy/vapoursynth-...x-ncnn-vulkan/
Also available via vsrepo
__________________
AVSRepoGUI // VSRepoGUI - Package Manager for AviSynth // VapourSynth VapourSynth Portable FATPACK || VapourSynth Database |
15th December 2019, 19:04 | #35 | Link | |
Registered User
Join Date: Apr 2015
Posts: 163
|
Quote:
Python exception: Core only supports API r3.5 but the loaded plugin requires API r3.6 How do I fix ? I have python 3.7.4 and Vapoursynth 45 installed |
|
15th December 2019, 19:44 | #36 | Link |
Registered User
Join Date: Dec 2005
Location: Germany
Posts: 1,795
|
Update vapoursynth.
__________________
AVSRepoGUI // VSRepoGUI - Package Manager for AviSynth // VapourSynth VapourSynth Portable FATPACK || VapourSynth Database |
15th December 2019, 23:50 | #38 | Link | |
Registered User
Join Date: Oct 2001
Posts: 454
|
Quote:
https://github.com/ptrsuder/IEU.Winforms which uses esrgan. From my limited knowledge, I figured ESRGAN is able of better foto upscaling than waifu2x, so I installed ESRGAN - none of my testfiles look "good" right now (Topaz Gigapixel works much better at this point).. So much to lurn, will take a look at your links. |
|
30th December 2019, 19:21 | #39 | Link | |
Registered User
Join Date: Sep 2016
Posts: 67
|
Quote:
https://upscale.wiki/wiki/Model_Database Otherwise Gigapixel usually ends up looking better. There are also some "video" networks out there, but theyre tricky to set up, even trickier to train and tend to benefit live action the most. |
|
Thread Tools | Search this Thread |
Display Modes | |
|
|