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. |
|
|
#41 | Link |
|
Registered User
Join Date: Oct 2001
Location: Germany
Posts: 7,855
|
I thing the point is that https://gist.github.com/4re/8676fd350d4b5b223ab9 works and https://gist.github.com/chikuzen/6103665 doesn't
![]() Whether another sharpener (minsharp, AWarpSharp2) might be better suited for whatever sharpening hydra3333 wants to perform shouldn't really matter,.. |
|
|
|
|
|
#42 | Link |
|
Registered User
Join Date: Jun 2012
Location: Ibiza, Spain
Posts: 322
|
finesharp 2016.08.21, updated for Vapoursynth R33, ~10% faster for 8bit input, no difference for 16bit.
Last edited by Wilbert; 21st August 2016 at 18:21. |
|
|
|
|
|
#44 | Link | |
|
Registered User
Join Date: Oct 2009
Location: crow-land
Posts: 544
|
Thank you.
Quote:
|
|
|
|
|
|
|
#45 | Link | |
|
Registered User
Join Date: Oct 2009
Location: crow-land
Posts: 544
|
Quote:
edit: no it doesn't. Code:
T:\HDTV\WDTVlive\MP4-VS\1>"C:\SOFTWARE\Vapoursynth\VSPipe.exe" "T:\HDTV\WDTVlive\MP4-VS\1\test.mpg.2016.08.22.01.28.50.60.vpy" - --y4m | "C:\SOFTWARE\ffmpeg\0-homebuilt-x64\x264-mp4.exe" - --stdin y4m --thread-input --frames 45810 --profile high --level 4.1 --preset slow --interlaced --tff --no-cabac --crf 14 --sar 64:45 --colormatrix bt470bg -o "s:\HDTV\WDTVlive\MP4-VS\1\test-temp.2016.08.22.01.28.50.60.h264"
Script evaluation failed:
Python exception: VapourSynth version should be 33 or greater.
Traceback (most recent call last):
File "src\cython\vapoursynth.pyx", line 1491, in vapoursynth.vpy_evaluateScript (src\cython\vapoursynth.c:26897)
File "T:\HDTV\WDTVlive\MP4-VS\1\test.mpg.2016.08.22.01.28.50.60.vpy", line 469, in <module>
main()
File "T:\HDTV\WDTVlive\MP4-VS\1\test.mpg.2016.08.22.01.28.50.60.vpy", line 154, in main
video = finesharp.sharpen(video,mode=1,sstr=1.0)
File "C:\SOFTWARE\Vapoursynth\finesharp.py", line 109, in sharpen
raise EnvironmentError('VapourSynth version should be 33 or greater.')
OSError: VapourSynth version should be 33 or greater.
Last edited by hydra3333; 21st August 2016 at 17:10. |
|
|
|
|
|
|
#48 | Link |
|
Registered User
Join Date: Oct 2001
Location: Germany
Posts: 7,855
|
Haven't used finesharp for a while, but calling:
Code:
# Imports
import os
import sys
import vapoursynth as vs
core = vs.get_core()
# Import scripts folder
scriptPath = 'G:/Hybrid/vsscripts'
sys.path.append(os.path.abspath(scriptPath))
# Loading Plugins
core.std.LoadPlugin(path="G:/Hybrid/vsfilters/Support/fmtconv.dll")
core.avs.LoadPlugin(path="G:/Hybrid/vsfilters/SourceFilter/DGDecNV/DGDecodeNV.dll")
# Import scripts
import finesharp as finesharp
# Loading H:\to convert\test.mkv using DGSource
clip = core.avs.DGSource("H:/Temp/mkv_7ddb2a359f7f3ecc066d816f3985a1f6_14604.dgi")
# sharpening using FineSharp
clip = finesharp.sharpen(clip=clip, mode=3)
# Output
clip.set_output()
I get: Code:
Failed to evaluate the script:
Python exception: float() argument must be a string or a number, not 'vapoursynth.VideoNode'
Traceback (most recent call last):
File "src\cython\vapoursynth.pyx", line 1830, in vapoursynth.vpy_evaluateScript (src\cython\vapoursynth.c:36860)
File "H:\Temp\tempPreviewVapoursynthFile19_09_28_896.vpy", line 17, in <module>
clip = finesharp.sharpen(clip=clip, mode=3)
File "G:\Hybrid\vsscripts\finesharp.py", line 155, in sharpen
c2 = core.std.Median(clip).std.Convolution(clip, matrix=[1, 2, 1, 2, 4, 2, 1, 2, 1])
File "src\cython\vapoursynth.pyx", line 1702, in vapoursynth.Function.__call__ (src\cython\vapoursynth.c:34634)
File "src\cython\vapoursynth.pyx", line 530, in vapoursynth.typedDictToMap (src\cython\vapoursynth.c:12921)
TypeError: float() argument must be a string or a number, not 'vapoursynth.VideoNode'
-> tested a bit more and when I'm not using 'mode=..' it works, but using mode = 2 or mode = 3 causes the crash. Did I miss something or did this never work? ![]() Cu Selur |
|
|
|
|
|
#50 | Link |
|
Registered User
Join Date: Oct 2001
Location: Germany
Posts: 7,855
|
Found it, changing line 155, from
Code:
c2 = core.std.Median(clip).std.Convolution(clip, matrix=[1, 2, 1, 2, 4, 2, 1, 2, 1]) Code:
c2 = core.std.Median(clip).std.Convolution(matrix=[1, 2, 1, 2, 4, 2, 1, 2, 1]) Thanks for fixing. Cu Selur Last edited by Selur; 17th December 2017 at 09:12. |
|
|
|
|
|
#52 | Link | |
|
Registered User
Join Date: Sep 2007
Posts: 5,669
|
I get error with some sstr values like 0.1, 0.2
But 0.25, or 0.3, or 1, or 1.2 etc... will work Quote:
https://gist.github.com/4re/8676fd350d4b5b223ab9 Code:
clip = core.std.BlankClip(width=640, height=480, format=vs.YUV420P8, fpsnum=24, fpsden=1, length=240, color=[128, 128, 128]) fs = finesharp.sharpen(clip, sstr=0.2) |
|
|
|
|
|
|
#53 | Link |
|
Registered User
Join Date: Jun 2012
Location: Ibiza, Spain
Posts: 322
|
Avisynth version doesn't return an error there? (No windows right here so I can't check it).
I don't know anything about math, but at some point in the code cstr becomes a complex number, and that is a problem for the rest of the script. I think the proper solution is to put a check somewhere to tell you not to go so low with sstr if cstr is not defined. |
|
|
|
|
|
#54 | Link | |
|
Registered User
Join Date: Sep 2007
Posts: 5,669
|
Quote:
|
|
|
|
|
![]() |
| Thread Tools | |
| Display Modes | |
|
|