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. |
1st August 2019, 15:44 | #465 | Link |
Registered User
Join Date: Oct 2001
Location: Germany
Posts: 7,277
|
I got a problem on Linux using MCTemporalDenoise
on Windows: Code:
# Imports import os import sys import ctypes # Loading Support Files Dllref = ctypes.windll.LoadLibrary("I:/Hybrid/64bit/vsfilters/Support/libfftw3f-3.dll") import vapoursynth as vs core = vs.get_core() # 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/DenoiseFilter/TTempSmooth/TTempSmooth.dll") core.std.LoadPlugin(path="I:/Hybrid/64bit/vsfilters/DenoiseFilter/DFTTest/DFTTest.dll") core.std.LoadPlugin(path="I:/Hybrid/64bit/vsfilters/DenoiseFilter/FFT3DFilter/fft3dfilter.dll") core.std.LoadPlugin(path="I:/Hybrid/64bit/vsfilters/Support/DCTFilter.dll") core.std.LoadPlugin(path="I:/Hybrid/64bit/vsfilters/DeblockFilter/Deblock/Deblock.dll") core.std.LoadPlugin(path="I:/Hybrid/64bit/vsfilters/Support/libmvtools.dll") core.std.LoadPlugin(path="I:/Hybrid/64bit/vsfilters/SourceFilter/FFMS2/ffms2k.dll") # Import scripts import havsfunc # 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/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) # denoising using MCTemporalDenoise clip = havsfunc.MCTemporalDenoise(i=clip, settings="low") # Output clip.set_output() On Linux (Ubuntu 19.04) calling: Code:
# Imports import os import sys import vapoursynth as vs core = vs.get_core() # Import scripts folder scriptPath = '/home/selur/opt/hybrid/vsscripts' sys.path.append(os.path.abspath(scriptPath)) # Loading Plugins core.std.LoadPlugin(path="/home/selur/opt/hybrid/vsfilters/libttempsmooth.so") core.std.LoadPlugin(path="/home/selur/opt/hybrid/vsfilters/libdfttest.so") core.std.LoadPlugin(path="/home/selur/opt/hybrid/vsfilters/libfft3dfilter.so") core.std.LoadPlugin(path="/home/selur/opt/hybrid/vsfilters/libdctfilter.so") core.std.LoadPlugin(path="/home/selur/opt/hybrid/vsfilters/libdeblock.so") core.std.LoadPlugin(path="/home/selur/opt/hybrid/vsfilters/libmvtools.so") core.std.LoadPlugin(path="/home/selur/opt/hybrid/vsfilters/libffms2.so") # Import scripts import havsfunc # Loading source using FFMS2 clip = core.ffms2.Source(source="/home/selur/Schreibtisch/test.avi",cachefile="/home/selur/Schreibtisch/HybridTemp/avi_77c74b7b15937c7267959c738c5ee2fa_936145377.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/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) # denoising using MCTemporalDenoise clip = havsfunc.MCTemporalDenoise(i=clip, settings="low") # Output clip.set_output() Code:
Failed to evaluate the script: Python exception: DFTTest: invalid entry in sigma string Traceback (most recent call last): File "src/cython/vapoursynth.pyx", line 1942, in vapoursynth.vpy_evaluateScript File "src/cython/vapoursynth.pyx", line 1943, in vapoursynth.vpy_evaluateScript File "/home/selur/Schreibtisch/HybridTemp/tempPreviewVapoursynthFile16_39_42_491.vpy", line 28, in <module> clip = havsfunc.MCTemporalDenoise(i=clip, settings="low") File "/home/selur/opt/hybrid/vsscripts/havsfunc.py", line 2784, in MCTemporalDenoise p = core.dfttest.DFTTest(i, tbsize=1, sstring='0.0:4.0 0.2:9.0 1.0:15.0', planes=planes) File "src/cython/vapoursynth.pyx", line 1848, in vapoursynth.Function.__call__ vapoursynth.Error: DFTTest: invalid entry in sigma string Code:
# Imports import vapoursynth as vs core = vs.get_core() # Loading Plugins core.std.LoadPlugin(path="/home/selur/opt/hybrid/vsfilters/libdfttest.so") core.std.LoadPlugin(path="/home/selur/opt/hybrid/vsfilters/libffms2.so") # Loading source using FFMS2 clip = core.ffms2.Source(source="/home/selur/Schreibtisch/test.avi",cachefile="/home/selur/Schreibtisch/HybridTemp/avi_77c74b7b15937c7267959c738c5ee2fa_936145377.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/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) # denoising using DFTTest clip = core.dfttest.DFTTest(clip=clip) # Output clip.set_output() The python version on my linux system is "Python 3.7.3 (default, Apr 3 2019, 05:39:12)" in case it matters. Is there some way I need to modify: Code:
p = core.dfttest.DFTTest(i, tbsize=1, sstring='0.0:4.0 0.2:9.0 1.0:15.0', planes=planes) Cu Selur |
1st August 2019, 15:57 | #466 | Link |
Professional Code Monkey
Join Date: Jun 2003
Location: Kinnarps Chair
Posts: 2,555
|
Could the decimal separator by any chance be , instead of . on your linux system?
__________________
VapourSynth - proving that scripting languages and video processing isn't dead yet |
2nd August 2019, 19:54 | #467 | Link |
Registered User
Join Date: Oct 2001
Location: Germany
Posts: 7,277
|
Yes,... but that's also true for my Window system.
I assumed, like in C++ it's a thing defined by the language not the current 'local' or similar. (that's really scary,...) -> you are right, when I replace the dots with commas it works. There must be a way to write such code dependent of the 'local' of the system |
2nd August 2019, 21:48 | #468 | Link | |
Professional Code Monkey
Join Date: Jun 2003
Location: Kinnarps Chair
Posts: 2,555
|
Quote:
It's also blindingly obvious dfttest got a lazy port. The arguments sstring, ssx, ssy and sst should simply be arrays of float in VS.
__________________
VapourSynth - proving that scripting languages and video processing isn't dead yet |
|
3rd August 2019, 08:17 | #469 | Link |
Registered User
Join Date: Oct 2001
Location: Germany
Posts: 7,277
|
opened an issue over at https://github.com/HomeOfVapourSynth...TTest/issues/8
Something like (I don't know how to do the 'if' part properly): Code:
if float('1.0') != float('1') p = core.dfttest.DFTTest(i, tbsize=1, sstring='0,0:4,0 0,2:9,0 1,0:15,0', planes=planes) else p = core.dfttest.DFTTest(i, tbsize=1, sstring='0.0:4.0 0.2:9.0 1.0:15.0', planes=planes) Git it using: Code:
if (float("1.0") != float("1")): p = core.dfttest.DFTTest(i, tbsize=1, sstring='0.0:4.0 0.2:9.0 1.0:15.0', planes=planes) else: p = core.dfttest.DFTTest(i, tbsize=1, sstring='0,0:4,0 0,2:9,0 1,0:15,0', planes=planes) and Code:
if (float("1.0") != float("1")): pref = core.std.MaskedMerge(core.dfttest.DFTTest(inputP, tbsize=1, sstring='0.0:4.0 0.2:9.0 1.0:15.0', planes=planes), inputP, core.std.Expr([mvf.GetPlane(inputP, 0)], [expr]), planes=planes)[ else: pref = core.std.MaskedMerge(core.dfttest.DFTTest(inputP, tbsize=1, sstring='0,0:4,0 0,2:9,0 1,0:15,0', planes=planes), inputP, core.std.Expr([mvf.GetPlane(inputP, 0)], [expr]), planes=planes) Last edited by Selur; 3rd August 2019 at 09:17. |
3rd August 2019, 10:21 | #470 | Link |
Registered User
Join Date: Dec 2005
Location: Germany
Posts: 1,795
|
Maybe it is easier to use locale https://docs.python.org/2/library/locale.html -> locale.setlocale(locale.LC_ALL, 'en_us')
Python returns this on a german Windows 10: python -c "import locale; print(locale.localeconv())" Code:
{'int_curr_symbol': '', 'currency_symbol': '', 'mon_decimal_point': '', 'mon_thousands_sep': '', 'mon_grouping': [], 'positive_sign': '', 'negative_sign': '', 'int_frac_digits': 127, 'frac_digits': 127, 'p_cs_precedes': 127, 'p_sep_by_space': 127, 'n_cs_precedes': 127, 'n_sep_by_space': 127, 'p_sign_posn': 127, 'n_sign_posn': 127, 'decimal_point': '.', 'thousands_sep': '', 'grouping': []}
__________________
AVSRepoGUI // VSRepoGUI - Package Manager for AviSynth // VapourSynth VapourSynth Portable FATPACK || VapourSynth Database Last edited by ChaosKing; 3rd August 2019 at 10:23. |
3rd August 2019, 12:15 | #471 | Link |
Registered User
Join Date: Oct 2001
Location: Germany
Posts: 7,277
|
I don't like the idea of switching the locale since loading different sub-scripts from different authors inside a script that might also contain some code written by me I hate the idea that the last script that changed the locale changes the local not just for the sub-script but for the all the scripts,..
So if you change the locale it should be changed per function and restored to the previous value. best solution would be if: dfttest adjusts the interface to use float arrays and MCTemporalDenoise&SMDegrain would be adjusted accordingly. -> hoping HolyWu will adjust DFTTest Last edited by Selur; 3rd August 2019 at 12:25. |
3rd August 2019, 15:50 | #472 | Link | |
Professional Code Monkey
Join Date: Jun 2003
Location: Kinnarps Chair
Posts: 2,555
|
Quote:
LIBRARIES MUST NEVER MODIFY GLOBAL APPLICATION STATE
__________________
VapourSynth - proving that scripting languages and video processing isn't dead yet |
|
3rd August 2019, 15:57 | #473 | Link |
Registered User
Join Date: Dec 2005
Location: Germany
Posts: 1,795
|
In my head it was only for a script and not global...
But you could change it back at the end of the script.
__________________
AVSRepoGUI // VSRepoGUI - Package Manager for AviSynth // VapourSynth VapourSynth Portable FATPACK || VapourSynth Database |
6th August 2019, 16:05 | #475 | Link |
Registered User
Join Date: Aug 2006
Location: Taiwan
Posts: 392
|
Update r32:
|
16th August 2019, 18:15 | #476 | Link |
Pig on the wing
Join Date: Mar 2002
Location: Finland
Posts: 5,731
|
I have a weird issue with QTGMC. If I use it to get a double-rate output out of this clip here, there are some weird vertical artifacts. I tested both presets very slow and very fast, and the same issue is there.
Take a closer look at the bass player in the screenshot. https://drive.google.com/open?id=1Bu...DEDEu7ZuaM9NQV (sample m2ts) https://drive.google.com/open?id=1AM...IEF71cFbl-fcJl (screenshot) If I just separate the fields, there's nothing strange there.
__________________
And if the band you're in starts playing different tunes I'll see you on the dark side of the Moon... |
16th August 2019, 19:33 | #477 | Link | |
Registered User
Join Date: Sep 2007
Posts: 5,374
|
Quote:
I cannot reproduce with vapoursynth , using lsmash as the source filter . Looks ok in avisynth too. Perhaps it's a source filter issue ? Check that it's decoding correctly Your screenshot looks lossy despite being a PNG. Perhaps it's an encoder/encoding settings issue ? |
|
16th August 2019, 20:11 | #478 | Link |
Pig on the wing
Join Date: Mar 2002
Location: Finland
Posts: 5,731
|
The source filter is DGDecNV, and there's no problem if I just separate the fields. I'd assume that a decoding issue would also show up there. I also tried bobbing with TDeintMod and it doesn't cause the artifacts.
__________________
And if the band you're in starts playing different tunes I'll see you on the dark side of the Moon... |
16th August 2019, 21:00 | #480 | Link |
Registered User
Join Date: Dec 2005
Location: Germany
Posts: 1,795
|
Can not reproduce. Tested with R47.2, DGDecNV + lsmas and latest havsfunc.
haf.QTGMC(dgi, Preset="slower", TFF=True)
__________________
AVSRepoGUI // VSRepoGUI - Package Manager for AviSynth // VapourSynth VapourSynth Portable FATPACK || VapourSynth Database |
Thread Tools | Search this Thread |
Display Modes | |
|
|