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 19th July 2016, 20:12   #2121  |  Link
Mystery Keeper
Beyond Kawaii
 
Mystery Keeper's Avatar
 
Join Date: Feb 2008
Location: Russia
Posts: 724
Quote:
Originally Posted by Myrsloik View Post
I can't reproduce it so I'm not sure what it could be. Maybe you're using an older fmtconv?

It's probably not an out of memory error either since VS only uses 1GB of ram as cache at most by default.
Cache is one thing, but there's also memory, allocated by filters. Intermediate buffers and such. When these buffers need to be large for large frames - you can easily run out of continuous memory chunks to allocate them.
__________________
...desu!
Mystery Keeper is offline   Reply With Quote
Old 21st July 2016, 02:25   #2122  |  Link
cwk
Registered User
 
Join Date: Jan 2004
Location: earth, barely
Posts: 96
Howdy folks,

I'm having some difficulty getting qtgmc to work with r32. Here is my script:

Quote:
import vapoursynth as vs
import sys
sys.path.append("/usr/local/lib/python2.7/site-packages")
import mvsfunc
import adjust
import havsfunc as hf
import functools

core = vs.get_core()
core.std.LoadPlugin("/usr/local/lib/libffms2.so")
core.std.LoadPlugin("/usr/local/lib/libmvtools.so")
core.std.LoadPlugin("/usr/local/lib/libnnedi3.so")
core.std.LoadPlugin("/usr/local/lib/libfmtconv.so")
core.std.LoadPlugin("/usr/local/lib/libtemporalsoften.so")
#core.std.LoadPlugin("/usr/local/lib/vapoursynth/libremovegrain.so")

video = core.ffms2.Source('lossless.avi')

deint = hf.QTGMC(video, Preset='Medium', TFF=True)

deint.set_output()
and here is the error I'm receiving:
Quote:
vspipe --y4m 1.vpy - | ffmpeg -i - -c:v huffyuv qtgmc.avi
ffmpeg version N-81036-g2b14204 Copyright (c) 2000-2016 the FFmpeg developers
built with gcc 4.8 (Ubuntu 4.8.4-2ubuntu1~14.04.3)
configuration: --enable-gpl --enable-version3 --enable-shared --enable-nonfree --enable-postproc --enable-libfaac --enable-libmp3lame --enable-libopencore-amrnb --enable-libopencore-amrwb --enable-libtheora --enable-libvorbis --enable-libx264 --enable-libxvid
libavutil 55. 28.100 / 55. 28.100
libavcodec 57. 50.100 / 57. 50.100
libavformat 57. 42.100 / 57. 42.100
libavdevice 57. 0.102 / 57. 0.102
libavfilter 6. 47.100 / 6. 47.100
libswscale 4. 1.100 / 4. 1.100
libswresample 2. 1.100 / 2. 1.100
libpostproc 54. 0.100 / 54. 0.100
Script evaluation failed:
Python exception: No attribute with the name scd exists. Did you mistype a plugin namespace?
Traceback (most recent call last):
File "vapoursynth.pyx", line 1491, in vapoursynth.vpy_evaluateScript (src/cython/vapoursynth.c:24032)
File "1.vpy", line 19, in <module>
deint = hf.QTGMC(video, Preset='Medium', TFF=True)
File "/usr/local/lib/python2.7/site-packages/havsfunc.py", line 980, in QTGMC
if TR0 > 0: ts1 = TemporalSoften(bobbed, 1, 255 << shift, CMts << shift, 28 << shift, 2) # 0.00 0.33 0.33 0.33 0.00
File "/usr/local/lib/python2.7/site-packages/havsfunc.py", line 4330, in TemporalSoften
clip = set_scenechange(clip, scenechange)
File "/usr/local/lib/python2.7/site-packages/havsfunc.py", line 4362, in set_scenechange
sc = core.scd.Detect(sc, thresh)
File "vapoursynth.pyx", line 1105, in vapoursynth.Core.__getattr__ (src/cython/vapoursynth.c:18358)
AttributeError: No attribute with the name scd exists. Did you mistype a plugin namespace?
Any ideas why I can't find that module?
cwk is offline   Reply With Quote
Old 21st July 2016, 04:55   #2123  |  Link
VS_Fan
Registered User
 
Join Date: Jan 2016
Posts: 98
Quote:
Originally Posted by cwk View Post
Howdy folks,
Code:
sc = core.scd.Detect(sc, thresh) ...
AttributeError: No attribute with the name scd exists. Did you mistype a plugin namespace?
You're missing the SceneChange plugin.
VS_Fan is offline   Reply With Quote
Old 21st July 2016, 15:56   #2124  |  Link
cwk
Registered User
 
Join Date: Jan 2004
Location: earth, barely
Posts: 96
Thank you for the reply vs_fan.

I have downloaded the package, and see c code, but no configure or make file for compiling on Linux.

Those of you using Linux, how did you compile this plugin? My early attempts with gcc are failing.
cwk is offline   Reply With Quote
Old 21st July 2016, 18:39   #2125  |  Link
jackoneill
unsigned int
 
jackoneill's Avatar
 
Join Date: Oct 2012
Location: 🇪🇺
Posts: 760
Quote:
Originally Posted by cwk View Post
Thank you for the reply vs_fan.

I have downloaded the package, and see c code, but no configure or make file for compiling on Linux.

Those of you using Linux, how did you compile this plugin? My early attempts with gcc are failing.
Try this:
Code:
gcc -fPIC -O2 -msse2 -std=c99 -shared -I/usr/lib/vapoursynth -o libscenechange.so scenechange.c
__________________
Buy me a "coffee" and/or hire me to write code!
jackoneill is offline   Reply With Quote
Old 22nd July 2016, 17:25   #2126  |  Link
cwk
Registered User
 
Join Date: Jan 2004
Location: earth, barely
Posts: 96
Thanks jackoneill. That got me going. I had to do the same for the temporalsoften.c file that came with chikuzen's scene change package.
cwk is offline   Reply With Quote
Old 23rd July 2016, 06:48   #2127  |  Link
Selur
Registered User
 
Selur's Avatar
 
Join Date: Oct 2001
Location: Germany
Posts: 7,277
Quote:
Originally Posted by Myrsloik View Post
I can't reproduce it so I'm not sure what it could be. Maybe you're using an older fmtconv?
I'm using 64bit version for fmtconv r20 from https://github.com/EleonoreMizo/fmtconv/releases
Is there a newer version to try?
-> redownloaded the version, rebooted system cleared python cache and now it works

---------------

Just wondering:
Is there a IVTC filter for Vapoursynth with works with all color spaces?
(IT and VIVTC seem to only work with YUV420P8 from what I could gather.)
I was hoping to get rid of all the ConvertTo...-calls which I sometimes have to add to my AvisynthScripts to be able to use all filters.
__________________
Hybrid here in the forum, homepage

Last edited by Selur; 23rd July 2016 at 14:07.
Selur is offline   Reply With Quote
Old 24th July 2016, 15:19   #2128  |  Link
feisty2
I'm Siri
 
feisty2's Avatar
 
Join Date: Oct 2012
Location: void
Posts: 2,633
requested by @Mystery Keeper here
floating point TemporalSoften, don't wanna start another thread so I'll just post it here
src:https://github.com/IFeelBloated/TemporalSoften
bin:https://github.com/IFeelBloated/Temp...eleases/tag/r1
namespace changed to "tsoft"
luma/chroma_threshold, scenechange are all floating point parameters now and they range from 0.0 to 255.0 still for compatibility reasons.
edit:
uhmm, and the useless parameter "mode" got its ass kicked

Last edited by feisty2; 24th July 2016 at 15:22.
feisty2 is offline   Reply With Quote
Old 24th July 2016, 21:35   #2129  |  Link
Myrsloik
Professional Code Monkey
 
Myrsloik's Avatar
 
Join Date: Jun 2003
Location: Kinnarps Chair
Posts: 2,554
Quote:
Originally Posted by Selur View Post
I'm using 64bit version for fmtconv r20 from https://github.com/EleonoreMizo/fmtconv/releases
Is there a newer version to try?
-> redownloaded the version, rebooted system cleared python cache and now it works

---------------

Just wondering:
Is there a IVTC filter for Vapoursynth with works with all color spaces?
(IT and VIVTC seem to only work with YUV420P8 from what I could gather.)
I was hoping to get rid of all the ConvertTo...-calls which I sometimes have to add to my AvisynthScripts to be able to use all filters.
Nope, vivtc only does its decision in one colorspace. Use the clip2 argumebt to apply thr matches to the unconverted clip. It's slightly more awkward but there's just so little telecined material in higher bitdepths...
__________________
VapourSynth - proving that scripting languages and video processing isn't dead yet
Myrsloik is offline   Reply With Quote
Old 27th July 2016, 04:58   #2130  |  Link
aegisofrime
Registered User
 
Join Date: Apr 2009
Posts: 478
Hi all,

I'm wondering, is anyone actively developing a native Vapoursynth version of DGDecNV?

I somehow had a native version of DGDecNV (I think it was released by Donald Graft himself), but then I just upgraded to the GTX 1070. The older version of DGNV doesn't work at all with the Pascal cards, so I had to update my version to DGNV to the latest ones.

Now, the problem is that the older version of DGDecNV won't open an index file created by a newer version, and I can't import the AVS dll of DGDecNV because it's an Avisynth 2.5 plugin. So at this point it feels like I'm screwed. What are my options now?
aegisofrime is offline   Reply With Quote
Old 27th July 2016, 05:17   #2131  |  Link
Selur
Registered User
 
Selur's Avatar
 
Join Date: Oct 2001
Location: Germany
Posts: 7,277
Afaik. Donald Graft is the only one with the source code, so he is probably the only one with the means to implement a native Vapoursynth version of DGDecNV.
IIrc DG won't write a native version for Vapoursynth unless Vapoursynth changes, see: http://rationalqm.us/board/viewtopic.php?f=8&t=441
your options are probably:
a. hope the Vapoursynth developers change their code (Avisynth 2.5 filter support and/or handling the frame rate normalization)
b. hope that DG changes his code (dropping Avisynth 2.5 support or alternatively share a 2.5 and 2.6 filter and/or so the frame rate normalization)
c. you could try if it works to create an avisynth script where you use DGDecNV and then open that script as source using vsavsreader, but reading the end of http://forum.doom9.org/showthread.php?t=165957 that might also not work
d. forget DGDecNV in Vapoursynth for the time being
-> my guess is that if c. doesn't work you are stuck with d.

-----
Quote:
Use the clip2 argumebt to apply thr matches to the unconverted clip.
thanks, totally overlooked that parameter


Cu Selur
__________________
Hybrid here in the forum, homepage

Last edited by Selur; 27th July 2016 at 05:21.
Selur is offline   Reply With Quote
Old 27th July 2016, 10:59   #2132  |  Link
Mystery Keeper
Beyond Kawaii
 
Mystery Keeper's Avatar
 
Join Date: Feb 2008
Location: Russia
Posts: 724
Quote:
Originally Posted by feisty2 View Post
requested by @Mystery Keeper here
floating point TemporalSoften, don't wanna start another thread so I'll just post it here
src:https://github.com/IFeelBloated/TemporalSoften
bin:https://github.com/IFeelBloated/Temp...eleases/tag/r1
namespace changed to "tsoft"
luma/chroma_threshold, scenechange are all floating point parameters now and they range from 0.0 to 255.0 still for compatibility reasons.
edit:
uhmm, and the useless parameter "mode" got its ass kicked
Code:
	CMts = 255.0 if chromamotion else 0.0
	
	ts1 = core.tsoft.TemporalSoften(bob, 1, 255.0, CMts, 28.0)
	ts2 = core.tsoft.TemporalSoften(bob, 2, 255.0, CMts, 28.0)
Segfaults every time in temporalsoften_x64_avx2.dll

Code:
from __future__ import print_function

import vapoursynth as vs
core = vs.get_core(threads=8)
core.set_max_cache_size(8000)

#core.std.LoadPlugin(r'D:\Programming\vapoursynth-sandbox\build\release-64bit-gcc\vapoursynth-sandbox.dll')

import sys
sys.path.append('D:\\vapoursynth-plugins\\py\\')
import platform
architecture = platform.architecture()
if architecture[0] == '64bit':
	vapoursynth_plugins_path = 'D:\\vapoursynth-plugins\\64bit\\'
else:
	vapoursynth_plugins_path = 'D:\\vapoursynth-plugins\\32bit\\'
print('Plugins folder: ', vapoursynth_plugins_path, end='\n', file=sys.stderr)
import os
for filename in os.listdir(vapoursynth_plugins_path):
	if filename[-4:] != '.dll':
		continue
	try:
		core.std.LoadPlugin(vapoursynth_plugins_path + filename)
	except Exception as e:
		print('Error: ', e, end='\n', file=sys.stderr)

clip = core.ffms2.Source(r'F:\Video\Mystery Keeper\Sound Horizon - 石畳の緋き悪魔.mkv')

clip = core.resize.Spline16(clip, format=vs.YUV444PS)

clip = core.tsoft.TemporalSoften(clip, 1, 255.0, 255.0, 28.0)

clip.set_output()
Same. The script does evaluate in VSEdit. But segfaults on preview.
__________________
...desu!

Last edited by Mystery Keeper; 27th July 2016 at 11:08.
Mystery Keeper is offline   Reply With Quote
Old 27th July 2016, 12:47   #2133  |  Link
feisty2
I'm Siri
 
feisty2's Avatar
 
Join Date: Oct 2012
Location: void
Posts: 2,633
guess I messed "scenechange" up
investigating...
feisty2 is offline   Reply With Quote
Old 27th July 2016, 20:08   #2134  |  Link
kolak
Registered User
 
Join Date: Nov 2004
Location: Poland
Posts: 2,843
Could someone translate this into vs please:

changeFPS(60000, 1001)
assumeTFF()
separateFields()
selectEvery(4, 0, 3)
weave()

if it's actually possible. Thx!

Last edited by kolak; 27th July 2016 at 20:11.
kolak is offline   Reply With Quote
Old 27th July 2016, 21:35   #2135  |  Link
~SimpleX~
Registered User
 
Join Date: Feb 2010
Location: Saint-Petersburg, Russia
Posts: 38
Quote:
Originally Posted by kolak View Post
Could someone translate this into vs please:

changeFPS(60000, 1001)
assumeTFF()
separateFields()
selectEvery(4, 0, 3)
weave()

if it's actually possible. Thx!
Code:
import vapoursynth as vs
import havsfunc as haf
import mvsfunc as mvs

core = vs.get_core()

src = ...

last = src
last = haf.ChangeFPS(last, 60000, 1001)
last = mvs.AssumeTFF(last)  # Actually, not all filters support this, unfortunately
last = core.std.SeparateFields(last)
last = core.std.SelectEvery(last, 4, [0, 3])
last = haf.Weave(last, tff=True)  # this one doesn't
last.set_output()
This should do it. You need mvsfunc and havsfunc for this to work.
~SimpleX~ is offline   Reply With Quote
Old 27th July 2016, 22:14   #2136  |  Link
kolak
Registered User
 
Join Date: Nov 2004
Location: Poland
Posts: 2,843


I assume this won't support 8bit+ bit depths?
kolak is offline   Reply With Quote
Old 28th July 2016, 07:42   #2137  |  Link
feisty2
I'm Siri
 
feisty2's Avatar
 
Join Date: Oct 2012
Location: void
Posts: 2,633
Quote:
Originally Posted by Mystery Keeper View Post
Code:
	CMts = 255.0 if chromamotion else 0.0
	
	ts1 = core.tsoft.TemporalSoften(bob, 1, 255.0, CMts, 28.0)
	ts2 = core.tsoft.TemporalSoften(bob, 2, 255.0, CMts, 28.0)
Segfaults every time in temporalsoften_x64_avx2.dll

Code:
from __future__ import print_function

import vapoursynth as vs
core = vs.get_core(threads=8)
core.set_max_cache_size(8000)

#core.std.LoadPlugin(r'D:\Programming\vapoursynth-sandbox\build\release-64bit-gcc\vapoursynth-sandbox.dll')

import sys
sys.path.append('D:\\vapoursynth-plugins\\py\\')
import platform
architecture = platform.architecture()
if architecture[0] == '64bit':
	vapoursynth_plugins_path = 'D:\\vapoursynth-plugins\\64bit\\'
else:
	vapoursynth_plugins_path = 'D:\\vapoursynth-plugins\\32bit\\'
print('Plugins folder: ', vapoursynth_plugins_path, end='\n', file=sys.stderr)
import os
for filename in os.listdir(vapoursynth_plugins_path):
	if filename[-4:] != '.dll':
		continue
	try:
		core.std.LoadPlugin(vapoursynth_plugins_path + filename)
	except Exception as e:
		print('Error: ', e, end='\n', file=sys.stderr)

clip = core.ffms2.Source(r'F:\Video\Mystery Keeper\Sound Horizon - 石畳の緋き悪魔.mkv')

clip = core.resize.Spline16(clip, format=vs.YUV444PS)

clip = core.tsoft.TemporalSoften(clip, 1, 255.0, 255.0, 28.0)

clip.set_output()
Same. The script does evaluate in VSEdit. But segfaults on preview.
https://github.com/IFeelBloated/Temp...eleases/tag/r2

should work now, I wasn't cautious enough with all that pointer arithmetic stuff...
and added sanity check
feisty2 is offline   Reply With Quote
Old 28th July 2016, 08:43   #2138  |  Link
Mystery Keeper
Beyond Kawaii
 
Mystery Keeper's Avatar
 
Join Date: Feb 2008
Location: Russia
Posts: 724
Quote:
Originally Posted by feisty2 View Post
https://github.com/IFeelBloated/Temp...eleases/tag/r2

should work now, I wasn't cautious enough with all that pointer arithmetic stuff...
and added sanity check
It works! Thank you!
__________________
...desu!
Mystery Keeper is offline   Reply With Quote
Old 28th July 2016, 09:41   #2139  |  Link
feisty2
I'm Siri
 
feisty2's Avatar
 
Join Date: Oct 2012
Location: void
Posts: 2,633
Quote:
Originally Posted by Mystery Keeper View Post
It works! Thank you!
just out of curiosity, no offense, you obviously should be a much better programmer than me cuz you wrote vsedit, and making a floating point version of temporalsoften should be easy like a blink to you, right?
feisty2 is offline   Reply With Quote
Old 28th July 2016, 09:48   #2140  |  Link
Mystery Keeper
Beyond Kawaii
 
Mystery Keeper's Avatar
 
Join Date: Feb 2008
Location: Russia
Posts: 724
Quote:
Originally Posted by feisty2 View Post
just out of curiosity, no offense, you obviously should be a much better programmer than me cuz you wrote vsedit, and making a floating point version of temporalsoften should be easy like a blink to you, right?
If I knew how it was supposed to work - yes. If I would dedicate time to read and understand the original filter - sure, I could have rewritten it for float input. Or even simply upgrade the existing one. But I've got much on my plate. Not even working on vsedit as much as I'd like to.
__________________
...desu!
Mystery Keeper is offline   Reply With Quote
Reply

Tags
speed, vaporware, vapoursynth

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 22:39.


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