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

Reply
 
Thread Tools Search this Thread Display Modes
Old 21st August 2016, 10:34   #41  |  Link
Selur
Registered User
 
Selur's Avatar
 
Join Date: Oct 2001
Location: Germany
Posts: 5,867
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,..
__________________
Hybrid here in the forum, homepage
Selur is offline   Reply With Quote
Old 21st August 2016, 13:05   #42  |  Link
Are_
Registered User
 
Join Date: Jun 2012
Location: Ibiza, Spain
Posts: 279
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.
Are_ is offline   Reply With Quote
Old 21st August 2016, 13:11   #43  |  Link
Selur
Registered User
 
Selur's Avatar
 
Join Date: Oct 2001
Location: Germany
Posts: 5,867
Thanks.
__________________
Hybrid here in the forum, homepage
Selur is offline   Reply With Quote
Old 21st August 2016, 16:54   #44  |  Link
hydra3333
Registered User
 
Join Date: Oct 2009
Location: crow-land
Posts: 530
Thank you.
Quote:
Originally Posted by ~SimpleX~ View Post
This script needs an upgrade, it uses avisynth functions instead of VS equivalents. Why do you even need finesharp? It's designed for realtime sharpening of upscaled (720 -> 1080) videos. Not quite suitable for video processing.
Was just comparing it to LSFmod's output, however with the default settings it appears to be a tad brutal for my needs. Oh well. I see some posts spelling is about as fine as my lazy efforts
hydra3333 is offline   Reply With Quote
Old 21st August 2016, 16:58   #45  |  Link
hydra3333
Registered User
 
Join Date: Oct 2009
Location: crow-land
Posts: 530
Quote:
Originally Posted by Are_ View Post
fiensharp 2016.08.21, updated for Vapoursynth R33, ~10% faster for 8bit input, no difference for 16bit.
Thanks. R33 hasn't a formal release. Does it work with R32 ?

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.
hydra3333 is offline   Reply With Quote
Old 21st August 2016, 17:44   #46  |  Link
Are_
Registered User
 
Join Date: Jun 2012
Location: Ibiza, Spain
Posts: 279
This version of finesharp would be too slow on vapoursynth 32
Are_ is offline   Reply With Quote
Old 24th August 2016, 10:30   #47  |  Link
hydra3333
Registered User
 
Join Date: Oct 2009
Location: crow-land
Posts: 530
OK, am trying x64 VS R33 (it released today)
hydra3333 is offline   Reply With Quote
Old 16th December 2017, 18:25   #48  |  Link
Selur
Registered User
 
Selur's Avatar
 
Join Date: Oct 2001
Location: Germany
Posts: 5,867
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()
(using VS R40)
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'
The finesharp script I use is Rev 2016-08-21.
-> 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
__________________
Hybrid here in the forum, homepage
Selur is offline   Reply With Quote
Old 16th December 2017, 18:51   #49  |  Link
Are_
Registered User
 
Join Date: Jun 2012
Location: Ibiza, Spain
Posts: 279
Yeah, brainfart, try it again.
Are_ is offline   Reply With Quote
Old 17th December 2017, 07:54   #50  |  Link
Selur
Registered User
 
Selur's Avatar
 
Join Date: Oct 2001
Location: Germany
Posts: 5,867
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])
to
Code:
        c2 = core.std.Median(clip).std.Convolution(matrix=[1, 2, 1, 2, 4, 2, 1, 2, 1])
fixes the issue.
Thanks for fixing.

Cu Selur
__________________
Hybrid here in the forum, homepage

Last edited by Selur; 17th December 2017 at 08:12.
Selur is offline   Reply With Quote
Old 17th December 2017, 11:12   #51  |  Link
Are_
Registered User
 
Join Date: Jun 2012
Location: Ibiza, Spain
Posts: 279
I meant I brainfarted while coding that part and already fixed it in the gist, sorry for the misunderstanding.
Are_ is offline   Reply With Quote
Reply

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 00:15.


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