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. |
29th November 2019, 21:54 | #3561 | Link |
Registered User
Join Date: Oct 2001
Posts: 454
|
I just stumpled across this:
https://forum.doom9.org/showthread.php?t=176961 Could this be implemented in Hybrid? I know, Iīd be needing a bigger GPU, but I have some personal rare footage Iīd like to throw at it.. |
1st December 2019, 09:50 | #3562 | Link |
Registered User
Join Date: Oct 2001
Location: Germany
Posts: 7,277
|
Hybrid rev 2019.12.01.1:
*fixed*
-> downloads: http://www.selur.de/downloads ---- Last I checked the main problem with lots of these neural network solutions is finding the tools and the dependencies that need to be available to incorporate them into Hybrid. Often the dependencies are huge (in file size) and some times they are by their license not allowed to be distributed in parts or in a whole through others. -> so if you can list a tool with its dependencies and those dependencies can be shipped with Hybrid and are not humongous I could add that tool/filter to Hybrid, atm. there are no plans for this. "With waifu2x enabled, range is altered automaticaly. " Hybrid only sets the range detected by the analysis. Cu Selur |
1st December 2019, 13:00 | #3563 | Link |
Registered User
Join Date: Apr 2009
Location: Gurupi, Tocantins, Brasil
Posts: 205
|
I some time without converting files, but experiencing this version, I realized that does not carry the QSVEnc profiles, I create one and try to match a aac audio, but always carries the codec x264.
|
2nd December 2019, 07:47 | #3564 | Link |
Registered User
Join Date: Oct 2001
Location: Germany
Posts: 7,277
|
I don't really understand what you are speaking of.
In case QSVEnc isn't snown in case: a. no Intel CPU is detected b. 'QSVEncC --check-features' reports 'QSV unavailable.' or nor H.264 and H.265 features. Usually this is due to conflict of QSVEncC with the CPU drivers. -> What does 'QSVEncC --check-features' report on your system ? Cu Selur |
2nd December 2019, 10:05 | #3565 | Link | |
Registered User
Join Date: Apr 2009
Location: Gurupi, Tocantins, Brasil
Posts: 205
|
Quote:
|
|
2nd December 2019, 15:06 | #3566 | Link | ||
Registered User
Join Date: Oct 2001
Posts: 454
|
Thanx for the updates!!
Quote:
https://github.com/imPRAGMA/VSGAN simply seems to be a vapourynth port of ESRGAN. Reading through the install-files, it looks straight forward to me - all tthatīs needed to add is the model which calculations are done with. Some are found here: https://upscale.wiki/wiki/Model_Database which seem to work, according to some forum members... I wouldnīt mind downloading these manualy Quote:
Does Hybrid do a different analsys if wafu2x is enabled? If I leave eveyrthing unchanged and simply turn waifu2x on or off, I get different colour ranges, so my assumption is, that it has something to do with waifu2x, not hybrids interpretation of the source file analysis. |
||
6th December 2019, 20:05 | #3567 | Link | ||
Registered User
Join Date: Oct 2001
Location: Germany
Posts: 7,277
|
Quote:
(Haven't used QSVEnc for ages since my encoding machine uses an AMD CPU and my other machines only have older Intel CPUs where GPU encoding wasn't that appealing,..) -> will fix, happens not only with QSVEnc, so it's easier to reproduce and fix. Quote:
In case a rgb <> yuv conversion is used the assumed color matrix will be used during that conversion. Here's an example: Code:
# Imports import vapoursynth as vs core = vs.get_core() import ctypes # Loading Support Files Dllref = ctypes.windll.LoadLibrary("I:/Hybrid/64bit/vsfilters/ResizeFilter/Waifu2x/w2xc.dll") # 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 source using FFMS2K clip = core.ffms2.Source(source="F:/TESTCL~1/files/test.avi",cachefile="E:/Temp/avi_078c37f69bb356e7b5fa040c71584c40_853323747.ffindex",format=vs.YUV420P8,alpha=False) # making sure input color matrix is set as 470bg clip = core.resize.Point(clip, matrix_in_s="470bg",range_s="limited") # making sure frame rate is set to 25 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 color space from YUV420P8 to RGB48 for Waifu2x-w2xc clip = core.resize.Bicubic(clip=clip, format=vs.RGB48, matrix_in_s="470bg", range_s="limited") # current color sampling: RGB48 # adjusting bit depth to 32bit clip = core.fmtc.bitdepth(clip=clip,bits=32) # resizing using Waifu2x clip = core.w2xc.Waifu2x(clip=clip, scale=2) # current color sampling: RGB48 # adjusting output color from: RGB48 to YUV420P8 for x264Model (i420) clip = core.resize.Bicubic(clip=clip, format=vs.YUV420P8, matrix_s="470bg", range_s="limited") # Output clip.set_output() Cu Selur Last edited by Selur; 6th December 2019 at 20:27. |
||
7th December 2019, 00:29 | #3568 | Link |
Registered User
Join Date: Oct 2001
Posts: 454
|
Hi Selur,
thank you for your answers. I tried some stuff and found it: After setting range conversion to "limited->full" in Filtering-vs-colour, the colors stay the same. The script looks like this now: Code:
# Imports import vapoursynth as vs core = vs.get_core() import ctypes # Loading Support Files Dllref = ctypes.windll.LoadLibrary("C:/Program Files/Hybrid/64bit/vsfilters/ResizeFilter/Waifu2x/w2xc.dll") # Loading Plugins core.std.LoadPlugin(path="C:/Program Files/Hybrid/64bit/vsfilters/ResizeFilter/Waifu2x/Waifu2x-w2xc.dll") core.std.LoadPlugin(path="C:/Program Files/Hybrid/64bit/vsfilters/Support/fmtconv.dll") core.std.LoadPlugin(path="C:/Program Files/Hybrid/64bit/vsfilters/SourceFilter/LSmashSource/vslsmashsource.dll") # Loading G:\video\test.mkv using LWLibavSource clip = core.lsmas.LWLibavSource(source="G:/video/test.mkv", format="YUV420P8", cache=0, prefer_hw=3) # making sure input color matrix is set as 470bg clip = core.resize.Point(clip, matrix_in_s="470bg",range_s="limited") # making sure frame rate is set to 24 clip = core.std.AssumeFPS(clip, fpsnum=24, fpsden=1) # Setting color range to TV (limited) range. clip = core.std.SetFrameProp(clip=clip, prop="_ColorRange", intval=1) clip = core.resize.Point(clip, range_in_s="limited", range_s="full") # Setting color range to PC (full) range. clip = core.std.SetFrameProp(clip=clip, prop="_ColorRange", intval=0) # resizing clip to 1280x960 # adjusting color space from YUV420P8 to RGB48 for Waifu2x-w2xc clip = core.resize.Bicubic(clip=clip, format=vs.RGB48, matrix_in_s="470bg", range_s="full") # current color sampling: RGB48 # adjusting bit depth to 32bit clip = core.fmtc.bitdepth(clip=clip,bits=32) # resizing using Waifu2x clip = core.w2xc.Waifu2x(clip=clip, scale=2, noise=0, block=1024) # current color sampling: RGB48 # adjusting resizing clip = core.fmtc.resample(clip=clip, w=1280, h=960, kernel="lanczos", interlaced=False, interlacedd=False) # adjusting output color from: RGB48 to YUV420P8 for FFvHuffModel (i420) clip = core.resize.Bicubic(clip=clip, format=vs.YUV420P8, matrix_s="470bg", range_s="full") # Output clip.set_output() when using wafu2x in Foto mode while keeping the resize factor to 1, itīs sometimes possible to clear up files with real life footage from noise, blocking, artefacts... In Hybrid, only upscaling is possible, as soon as the resizer is set to the input size, it leaves out waifu2x in the qeue. Could you implement "keep the resolution but still run it through waifu2x" please? Ah, on the download page I still get the previous version, although its named different. Another thing I noticed: While trying to distribute work onto cpu/gpus, I wanted to switch to qsv decoding. But no matter what I select in the config-input-decoding section, itīs always the nvidia card decoding. Thanx for your help! Last edited by ReinerSchweinlin; 7th December 2019 at 00:37. |
7th December 2019, 06:55 | #3569 | Link | ||
Registered User
Join Date: Oct 2001
Location: Germany
Posts: 7,277
|
Quote:
Quote:
It might be possible if I change the HW decoding support Hybrid uses with LibavSMASHSource, atm. Hybrid uses either "prefer_hw=0", or "prefer_hw=3", but I could extend this to : Code:
- 0 : Use default software decoder. - 1 : Use NVIDIA CUVID acceleration for supported codec, otherwise use default software decoder. - 2 : Use Intel Quick Sync Video acceleration for supported codec, otherwise use default software decoder. - 3 : Try hardware decoder in the order of CUVID->QSV. If none is available then use default software decoder. |
||
7th December 2019, 07:45 | #3570 | Link | |
Registered User
Join Date: Oct 2001
Location: Germany
Posts: 7,277
|
Looked into https://github.com/imPRAGMA/VSGAN from what I gather Hybrid would need to install:
* PyTorch * Numpy * mvsfunc * CUDA (NVIDIA GPU Support, optional but without this everything will be extremely slow) * vsgan -> unless there is a portable package I could ship with Hybrid or provide as a separate download I won't write support for this. Will send you a PM in regard to LibavSMASHSource 'prefer_hw' and allowing waifu2x while no real resizing is done,... Quote:
Cu Selur |
|
7th December 2019, 12:04 | #3571 | Link | |||
Registered User
Join Date: Oct 2001
Posts: 454
|
Quote:
Quote:
Quote:
in Video2x, The speed difference on my system is between 50% and 80% speedup when using RGB24 instead of RGB48 (temp on SATA SSD).. I could try to test this myself - my amateur skills give me the idea to tap into the skript of hybrid, play around with the settings and run it manualy to measure the speed difference. Iīd have to do some digging, did some avisynth back in the days... Maybe I get it done - do you think this could be an approach to test it (so I can contribute a little work to the topic) ? |
|||
7th December 2019, 18:29 | #3572 | Link | |
Registered User
Join Date: Oct 2001
Location: Germany
Posts: 7,277
|
Quote:
Code:
VSPipe.exe -p <PATH TO SCRIPT> NUL Code:
Frame: 115/5000 (2.62 fps) Cu Selur |
|
8th December 2019, 00:19 | #3573 | Link |
Registered User
Join Date: Oct 2001
Posts: 454
|
Thanx!
Report: using RGB24 instead of RGB48 has almost no effect with my examples - maybe upscaling HD->4K would benefit more, but my GFX Card is too small and slow - with SD Sources I see no speed difference Using Waifu2x with scale 1 ("enhance, no upscale") uses Code:
# resizing using Waifu2x clip = core.w2xc.Waifu2x(clip=clip, scale=2, block=1024) Would it be possible to set # resizing using Waifu2x clip = core.w2xc.Waifu2x(clip=clip, scale=1, block=1024) ? Thanx to your hint above on how to call vspipe manualy, I did a speedtest: # resizing using Waifu2x 0,95fps <- clip = core.w2xc.Waifu2x(clip=clip, scale=2) 4,33fps <- clip = core.w2xc.Waifu2x(clip=clip, scale=1, block=1024) Regarding HW-Decode with QSV: So far no luck, have to investigate more, seems decoding is still done in SW or Nvidia Card. Last edited by ReinerSchweinlin; 8th December 2019 at 00:21. |
8th December 2019, 06:03 | #3574 | Link |
Registered User
Join Date: Oct 2001
Location: Germany
Posts: 7,277
|
Looking into it.
--- HW decoding requires LWLibAVSource (or DGDecNV) to be used and for QSV prefer_hw should be set to 2, script wise Hybrid seems to properly allow to set the value, so if QSV isn't used working it might be a driver problem or a bug in LWLibAVSource. Last edited by Selur; 8th December 2019 at 06:10. |
18th December 2019, 10:49 | #3575 | Link |
Registered User
Join Date: Oct 2001
Posts: 454
|
Hey. Waifu works fine now, many thanks for looking into this! The colour issue is gone and scale=1 works, too
Assigning all the GPU Power still is a little bumpy - when doing NVENC (RTX 2060) Encodes, I assign NLMEANS CL to the same card (CUDA) and decoding to QSV - which won`t work. In Handbrake, it works right away and with others, too, so drivers etc.. seem to be ok.. I have to do some more testing on this to give a clearer report - for the meantime, this is no problem, since the speed difference is small. Christmas probably kicking in @all, so time will be spent elsewhere |
11th January 2020, 09:50 | #3576 | Link |
Registered User
Join Date: Oct 2001
Location: Germany
Posts: 7,277
|
Hybrid rev 2020.01.11.1:
*fixed*
-> downloads: http://www.selur.de/downloads Cu Selur |
11th January 2020, 10:52 | #3577 | Link |
Registered User
Join Date: Apr 2009
Location: Gurupi, Tocantins, Brasil
Posts: 205
|
I already made the request to the StaxRip, do the same for the Hybrid now automatically import the Hybrid is possible tags/fields nfo files (https://kodi.wiki/view/NFO_files) when the support such target format information?
|
11th January 2020, 15:02 | #3578 | Link |
Registered User
Join Date: Oct 2001
Location: Germany
Posts: 7,277
|
Not totally sure I get that.
Do you want Hybrid to: a. create kodi-NFO-files from the tags of a file, or b. import tag information from an NFO file, or c. do something different I totally missed? Cu Selur |
11th January 2020, 16:12 | #3580 | Link |
Registered User
Join Date: Oct 2001
Location: Germany
Posts: 7,277
|
Hmm, looking at what tags Hybrid supports (for the main containers):
I don't see anything for Copyright in the movie info and the Cover info would probably best match to the 'thumb' info, but to be useful Hybrid would need to download stuff (not likely to happen). I see the following mapping: Container->Name <=> movie->title Container->Genre <=> movie->genre Container->Comments <=> movie->plot and for audio streams: Stream->Title <=> movie->fileinfo->streamdetails->audio->language There is no language for video streams. Since normally at least the audio language tags are usually properly flagged in the files itself, the only real gain from this would be to import the container tags. (Importing the audio language could also be done, but probably not worth the trouble.) -> don't really think that it importing the container tags is worth the effort, but if you find a few other users which think this is a nice feature I can probably write some code for it. Cu Selur Ps.: for mkv output adding a 'import for nfo' under 'Config->Output->MKV Tags' might be more useful, since there would be a bigger overlap of the kodi-NFO data and the mkv tags. |
Thread Tools | Search this Thread |
Display Modes | |
|
|