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

Closed Thread
 
Thread Tools Search this Thread Display Modes
Old 30th May 2019, 16:58   #461  |  Link
Selur
Registered User
 
Selur's Avatar
 
Join Date: Oct 2001
Location: Germany
Posts: 7,259
-> https://github.com/Helenerineium/G41...ster/G41Fun.py
__________________
Hybrid here in the forum, homepage
Selur is offline  
Old 5th July 2019, 16:03   #462  |  Link
HolyWu
Registered User
 
Join Date: Aug 2006
Location: Taiwan
Posts: 392
Quote:
Originally Posted by FortMax View Post
I was using Preset="slow", TFF=True, FPSDivisor=2.

It's more noticeable in animation, especially on thicker lines, than it is with live-action stuff. It also can mess with stuff like overlayed text that just appears and disappears as opposed to fading.
Hi, I need a short sample for investigation since you said that it's more noticeable in specific content type. 2-3 seconds are sufficient.
HolyWu is offline  
Old 7th July 2019, 16:35   #463  |  Link
HolyWu
Registered User
 
Join Date: Aug 2006
Location: Taiwan
Posts: 392
Quote:
Originally Posted by pcroland View Post
Dear HolyWu!

I really appreciate your work. Would you be so kind to add/port the following AviSynth script to your collection: FixRowBrightnessMod (and also its Column variant).
Here's the AVS code:

Thank you very much for your effort.
Hi, may I know where did you get this mod version? Essentially what's the difference or improvement compared to FixRowBrightnessProtect2? I can see the used expression is different though.
HolyWu is offline  
Old 9th July 2019, 12:31   #464  |  Link
pcroland
Registered User
 
Join Date: Mar 2014
Location: Hungary
Posts: 115
To be honest, I don't remember where I found the code. For me it is also perfect if you port the Protect2 version. I don't think it would make much difference. Thank you in advance.
pcroland is offline  
Old 1st August 2019, 15:44   #465  |  Link
Selur
Registered User
 
Selur's Avatar
 
Join Date: Oct 2001
Location: Germany
Posts: 7,259
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()
works fine.
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()
I get:
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
since when using:
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()
works fine, I don't think it's an issue of my DFTTest build.

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)
to make it working, or does anyone know what could be causing this?

Cu Selur
__________________
Hybrid here in the forum, homepage
Selur is offline  
Old 1st August 2019, 15:57   #466  |  Link
Myrsloik
Professional Code Monkey
 
Myrsloik's Avatar
 
Join Date: Jun 2003
Location: Kinnarps Chair
Posts: 2,548
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
Myrsloik is offline  
Old 2nd August 2019, 19:54   #467  |  Link
Selur
Registered User
 
Selur's Avatar
 
Join Date: Oct 2001
Location: Germany
Posts: 7,259
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
__________________
Hybrid here in the forum, homepage
Selur is offline  
Old 2nd August 2019, 21:48   #468  |  Link
Myrsloik
Professional Code Monkey
 
Myrsloik's Avatar
 
Join Date: Jun 2003
Location: Kinnarps Chair
Posts: 2,548
Quote:
Originally Posted by Selur View Post
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
It's all locale hell. There are many ways to get around it and use functions where you can specify the locale (sscanf_l instead of sscanf if available) or C++ streams or whatever.

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
Myrsloik is offline  
Old 3rd August 2019, 08:17   #469  |  Link
Selur
Registered User
 
Selur's Avatar
 
Join Date: Oct 2001
Location: Germany
Posts: 7,259
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)
should work as a workaround, but how to write this in python3 syntax?
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)
in MCTemporalDenoise
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)
in SMDegrain, seems to fix the issue
__________________
Hybrid here in the forum, homepage

Last edited by Selur; 3rd August 2019 at 09:17.
Selur is offline  
Old 3rd August 2019, 10:21   #470  |  Link
ChaosKing
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.
ChaosKing is offline  
Old 3rd August 2019, 12:15   #471  |  Link
Selur
Registered User
 
Selur's Avatar
 
Join Date: Oct 2001
Location: Germany
Posts: 7,259
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
__________________
Hybrid here in the forum, homepage

Last edited by Selur; 3rd August 2019 at 12:25.
Selur is offline  
Old 3rd August 2019, 15:50   #472  |  Link
Myrsloik
Professional Code Monkey
 
Myrsloik's Avatar
 
Join Date: Jun 2003
Location: Kinnarps Chair
Posts: 2,548
Quote:
Originally Posted by ChaosKing View Post
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': []}
That is a really horrible idea. Now imagine using VS from inside an application that itself sets the locale to something in order to work. You've now broken everything.

LIBRARIES MUST NEVER MODIFY GLOBAL APPLICATION STATE
__________________
VapourSynth - proving that scripting languages and video processing isn't dead yet
Myrsloik is offline  
Old 3rd August 2019, 15:57   #473  |  Link
ChaosKing
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
ChaosKing is offline  
Old 4th August 2019, 08:50   #474  |  Link
Selur
Registered User
 
Selur's Avatar
 
Join Date: Oct 2001
Location: Germany
Posts: 7,259
Holywo adjusted the library by changing the local to us and back,..
__________________
Hybrid here in the forum, homepage
Selur is offline  
Old 6th August 2019, 16:05   #475  |  Link
HolyWu
Registered User
 
Join Date: Aug 2006
Location: Taiwan
Posts: 392
Update r32:
  • MCTemporalDenoise: Add option edgeclean.
  • Add functions dec_txt60mc, ivtc_txt30mc, FixColumnBrightness, FixRowBrightness, FixColumnBrightnessProtect, FixRowBrightnessProtect, FixColumnBrightnessProtect2, FixRowBrightnessProtect2, and bbmod.
  • Keep up with the changes in DFTTest.
HolyWu is offline  
Old 16th August 2019, 18:15   #476  |  Link
Boulder
Pig on the wing
 
Boulder's Avatar
 
Join Date: Mar 2002
Location: Finland
Posts: 5,718
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...
Boulder is offline  
Old 16th August 2019, 19:33   #477  |  Link
poisondeathray
Registered User
 
Join Date: Sep 2007
Posts: 5,346
Quote:
Originally Posted by Boulder View Post
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.

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 ?
poisondeathray is offline  
Old 16th August 2019, 20:11   #478  |  Link
Boulder
Pig on the wing
 
Boulder's Avatar
 
Join Date: Mar 2002
Location: Finland
Posts: 5,718
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...
Boulder is offline  
Old 16th August 2019, 20:24   #479  |  Link
poisondeathray
Registered User
 
Join Date: Sep 2007
Posts: 5,346
Vapoursynth 47.2 ?

Also check your plugin/dependency versions
poisondeathray is offline  
Old 16th August 2019, 21:00   #480  |  Link
ChaosKing
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
ChaosKing is offline  
Closed Thread

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:49.


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