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 13th February 2019, 16:00   #3241  |  Link
Selur
Registered User
 
Selur's Avatar
 
Join Date: Oct 2001
Location: Germany
Posts: 7,277
assuming you named the file DUMMY.py and placed int into the autoloading folder (http://www.vapoursynth.com/doc/autoloading.html),
Code:
# Import the script
import DUMMY
# ... whatever you do otherwise in your script
# call the script
clip = DUMMY.bbmod(c=clip, cTop = 0, cBottom = 0, cLeft = 0, cRight = 0, thresh = 128, blur = 999)
if you keep the file inside another folder than the autoload folder for example e:/vsfilters you need to to use something like:
Code:
# Imports
import os
import sys
# Import scripts folder
scriptPath = 'e:/vsfilters'
sys.path.append(os.path.abspath(scriptPath))
# Import script
import DUMMY
# ... whatever you do otherwise in your script
# call the script
clip = DUMMY.bbmod(c=clip, cTop = 0, cBottom = 0, cLeft = 0, cRight = 0, thresh = 128, blur = 999)
__________________
Hybrid here in the forum, homepage

Last edited by Selur; 13th February 2019 at 16:45.
Selur is offline   Reply With Quote
Old 13th February 2019, 16:22   #3242  |  Link
DJATOM
Registered User
 
DJATOM's Avatar
 
Join Date: Sep 2010
Location: Ukraine, Bohuslav
Posts: 377
It should be DUMMY.py, not vpy.
__________________
Me on GitHub
PC Specs: Ryzen 5950X, 64 GB RAM, RTX 2070
DJATOM is offline   Reply With Quote
Old 13th February 2019, 16:45   #3243  |  Link
Selur
Registered User
 
Selur's Avatar
 
Join Date: Oct 2001
Location: Germany
Posts: 7,277
Yup, fixed
__________________
Hybrid here in the forum, homepage
Selur is offline   Reply With Quote
Old 13th February 2019, 19:51   #3244  |  Link
Mystery Keeper
Beyond Kawaii
 
Mystery Keeper's Avatar
 
Join Date: Feb 2008
Location: Russia
Posts: 724
Quote:
Originally Posted by hydra3333 View Post
Intel claim to speed up python runtime by 20x, for free
https://www.infoworld.com/article/33...lq_cid=4495538


I suppose this does not have any relevance to vapoursynth ?

Cheers
No, it does not. Python scripts are used to build the filters graph and pretty much for nothing else. VapourSynth doesn't really depend on Python. Someone could make a new language for it. But it would be hard to beat Python's vast infrastructure.
__________________
...desu!
Mystery Keeper is offline   Reply With Quote
Old 16th February 2019, 08:17   #3245  |  Link
Selur
Registered User
 
Selur's Avatar
 
Join Date: Oct 2001
Location: Germany
Posts: 7,277
Is there something like Wavefront for Vapoursynth?

I'd like to do something along the (Avisynth) lines of:
Code:
LoadPlugin("I:\MkvCutter\ffms2.dll")
LoadPlugin("I:\MkvCutter\waveform.dll")
function m4(float x) {return(x<16?16:int(round(x/4.0)*4))}
V = FFVideoSource("F:\Family.mkv", cachefile="F:\Family.ffindex", threads=1).ConvertToYv12()
A = FFAudioSource("F:\Family.mkv", cache=false).ConvertToMono
V = V.BicubicResize(Ceil(V.Width*1)-(Ceil(V.Width*1)) % 4, V.Height)
AudioDub(V,A).WaveForm(window=1, height=m4(V.Height/4.0))
which is
a. taking audio and video from a source
b. converting the audio to mono
c. overlaying the audio wavefront onto the video

Did some googling, but couldn't find anything.
So does someone know how to do this with Vapoursynth or is it simply not possible atm. ?

Cu Selur
__________________
Hybrid here in the forum, homepage

Last edited by Selur; 16th February 2019 at 09:47.
Selur is offline   Reply With Quote
Old 16th February 2019, 21:39   #3246  |  Link
Mystery Keeper
Beyond Kawaii
 
Mystery Keeper's Avatar
 
Join Date: Feb 2008
Location: Russia
Posts: 724
Quote:
Originally Posted by Selur View Post
Is there something like Wavefront for Vapoursynth?

I'd like to do something along the (Avisynth) lines of:
Code:
LoadPlugin("I:\MkvCutter\ffms2.dll")
LoadPlugin("I:\MkvCutter\waveform.dll")
function m4(float x) {return(x<16?16:int(round(x/4.0)*4))}
V = FFVideoSource("F:\Family.mkv", cachefile="F:\Family.ffindex", threads=1).ConvertToYv12()
A = FFAudioSource("F:\Family.mkv", cache=false).ConvertToMono
V = V.BicubicResize(Ceil(V.Width*1)-(Ceil(V.Width*1)) % 4, V.Height)
AudioDub(V,A).WaveForm(window=1, height=m4(V.Height/4.0))
which is
a. taking audio and video from a source
b. converting the audio to mono
c. overlaying the audio wavefront onto the video

Did some googling, but couldn't find anything.
So does someone know how to do this with Vapoursynth or is it simply not possible atm. ?

Cu Selur
Likely not done by anyone. Implementable by making a source filter that reads audio from media files and generates the waveform video.
__________________
...desu!
Mystery Keeper is offline   Reply With Quote
Old 17th February 2019, 13:12   #3247  |  Link
tebasuna51
Moderator
 
tebasuna51's Avatar
 
Join Date: Feb 2005
Location: Spain
Posts: 6,914
@Selur, remember than VapourSynth don't support audio.

Don't exist any xxAudioSource() or AudioDub().
waveform.dll can't read audio data inside VapourSynth.

Like Mystery Keeper say a new source filter must do all the job:

a. taking audio from a source
b. converting the audio to mono
c. supply the waveform converted to video
__________________
BeHappy, AviSynth audio transcoder.
tebasuna51 is offline   Reply With Quote
Old 17th February 2019, 13:18   #3248  |  Link
Selur
Registered User
 
Selur's Avatar
 
Join Date: Oct 2001
Location: Germany
Posts: 7,277
Yeah, I hoped I missed something and that there already were filters to do all this.
-> Thanks for confirming, that there currently isn't a filter in Vapoursynth to do what I wanted.
__________________
Hybrid here in the forum, homepage
Selur is offline   Reply With Quote
Old 17th February 2019, 16:11   #3249  |  Link
asarian
Registered User
 
Join Date: May 2005
Posts: 1,462
Quote:
Originally Posted by tebasuna51 View Post
@Selur, remember than VapourSynth don't support audio.
Nor should it, IMHO. There's absolutely no point letting VS do audio conversions, when you can just use eac3to to convert/extract your audio outside the VS process.
__________________
Gorgeous, delicious, deculture!
asarian is offline   Reply With Quote
Old 17th February 2019, 20:44   #3250  |  Link
lansing
Registered User
 
Join Date: Sep 2006
Posts: 1,657
Quote:
Originally Posted by asarian View Post
Nor should it, IMHO. There's absolutely no point letting VS do audio conversions, when you can just use eac3to to convert/extract your audio outside the VS process.
There can a point when he's trimming the video in the script, there he would have to set the same trim on the audio as well so they can be in sync.

Some audio trimming programs can takes in a cut_list file and trim the audio according to the cut points in that file. It would be nice to have vapoursynth or vs editor to output these cut_list file as well according to the trimming in the script.
lansing is offline   Reply With Quote
Old 18th February 2019, 20:14   #3251  |  Link
Selur
Registered User
 
Selur's Avatar
 
Join Date: Oct 2001
Location: Germany
Posts: 7,277
@asrain:
a. for me it's not about doing a conversion, but seeing the wave front in a preview to make decisions about cutting and chapter points.
b. last I checked eac3to is Windows only and only support a few audio formats and no filtering, so at least for me it's hardly useful. (ffmpeg and sox are way more useful for me)
__________________
Hybrid here in the forum, homepage
Selur is offline   Reply With Quote
Old 19th February 2019, 17:04   #3252  |  Link
sl1pkn07
Pajas Mentales...
 
Join Date: Dec 2004
Location: Spanishtán
Posts: 496
eac3to works almost good with wine
__________________
[AUR] Vapoursynth Stuff
[AUR] Avisynth Stuff
sl1pkn07 is offline   Reply With Quote
Old 20th February 2019, 17:49   #3253  |  Link
poisondeathray
Registered User
 
Join Date: Sep 2007
Posts: 5,371
avfs x64 issue with certain x64 avs scripts ? R45

A simple TIVTC script works ok through avisynth+ x64 , verified in avspmod x64, or vdub2 x64 . But when run though avfs x64, it produces "green screen" . avfs x86 ok

Code:
MPEG2Source()
TFM().TDecimate()
YV12 working for both avfs x86, x64 with version yv12, and blankclip yv12
Code:
version()
converttoyv12()
Code:
blankclip(pixel_type="YV12")


Why does avfs x64 TIVTC script in YV12 not work ? But simple "version" or "blankclip" in YV12 work ?

Even if I remove the x86 dgdecode.dll, tivtc.dll from the avisynth x86 plugins folder to "force" x64 pathway, still
does not work

But different source filter works in x64, TIVTC works, so this suggests the x64 dgdecode compatibility issue with avfs ?

dgdecode.dll x64 was from here
https://www.mediafire.com/download/c..._3-19-2010.rar
http://avisynth.nl/index.php/AviSynth%2B_x64_plugins

Code:
FFVideoSource()
TFM().TDecimate()
poisondeathray is offline   Reply With Quote
Old 20th February 2019, 17:56   #3254  |  Link
Selur
Registered User
 
Selur's Avatar
 
Join Date: Oct 2001
Location: Germany
Posts: 7,277
@poisondeathray: I don't see the connection between Avisynth and Vapoursynth here,... (this is the Vapoursynth thread,..)
__________________
Hybrid here in the forum, homepage
Selur is offline   Reply With Quote
Old 20th February 2019, 17:57   #3255  |  Link
poisondeathray
Registered User
 
Join Date: Sep 2007
Posts: 5,371
Quote:
Originally Posted by Selur View Post
@poisondeathray: I don't see the connection between Avisynth and Vapoursynth here,... (this is the Vapoursynth thread,..)
newer avfs versions are from vapoursynth . It's distributed that way. Myrsloik updates and compiles it now. If it's more appropriate, perhaps move discussion over to the avfs thread if some mod wants to move it

Last edited by poisondeathray; 20th February 2019 at 18:01.
poisondeathray is offline   Reply With Quote
Old 20th February 2019, 18:45   #3256  |  Link
Selur
Registered User
 
Selur's Avatar
 
Join Date: Oct 2001
Location: Germany
Posts: 7,277
ah okay,...
__________________
Hybrid here in the forum, homepage
Selur is offline   Reply With Quote
Old 21st February 2019, 04:02   #3257  |  Link
VS_Fan
Registered User
 
Join Date: Jan 2016
Posts: 98
Quote:
Originally Posted by poisondeathray View Post
avfs x64 issue with certain x64 avs scripts ? R45

Why does avfs x64 TIVTC script in YV12 not work ?
Have you tried:
  • Mpeg2DecPlus (source binary) instead of DGdecode?
  • The latest TIVTC v1.0.14 from pinterf ?
  • Setting fps with AssumeFPS("ntsc_video") before TFM ?
VS_Fan is offline   Reply With Quote
Old 21st February 2019, 04:16   #3258  |  Link
poisondeathray
Registered User
 
Join Date: Sep 2007
Posts: 5,371
Quote:
Originally Posted by VS_Fan View Post
Have you tried:[LIST][*]Mpeg2DecPlus (source binary) instead of DGdecode?
Thanks, it works ok now with this version

The problem was the version of dgdecode.dll x64 I linked to earlier
poisondeathray is offline   Reply With Quote
Old 23rd February 2019, 08:45   #3259  |  Link
Selur
Registered User
 
Selur's Avatar
 
Join Date: Oct 2001
Location: Germany
Posts: 7,277
Using a 1280x720 source and:
Code:
# Imports
import os
import sys
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/Support/libmvtools.dll")
core.std.LoadPlugin(path="I:/Hybrid/64bit/vsfilters/DeCrawlFilter/DotKill/dotkill64.dll")
core.std.LoadPlugin(path="I:/Hybrid/64bit/vsfilters/SourceFilter/LSmashSource/vslsmashsource.dll")
# Import scripts
import hysteria
import hnwvsfunc
import mvsfunc
# Loading E:\to convert\test.mkv using LWLibavSource
clip = core.lsmas.LWLibavSource(source="E:\to convert\test.mkv", format="YUV420P8", cache=0)
# making sure input color matrix is set as unspec
clip = core.resize.Point(clip, matrix_in_s="unspec",range_s="limited")
# making sure frame rate is set to 24000/1001
clip = core.std.AssumeFPS(clip, fpsnum=24000, fpsden=1001)
# Setting color range to TV (limited) range.
clip = core.std.SetFrameProp(clip=clip, prop="_ColorRange", intval=1)
# DeCrawling using DotKill
clip = core.dotkill.DotKill(clip=clip, napply=3)
# removing grain using MLDegrain
clip = hnwvsfunc.MLDegrain(clip=clip, soft=[0,0,0])
# sharpening using FineSharp
clip = hnwvsfunc.FineSharp(clip=clip)
 # line darkening using Hysteria
clip = hysteria.Hysteria(clip=clip,highthresh=10)
# Output
clip.set_output()
the memory usage is sky rocketing,... after ~10min, the RAM usage is > 11 GB and still increasing (15min 13GB+, 20min 16G+).
Is this something on my system, a known problem, or should I do some more testing and test these filters one by one?


Cu Selur

Ps.: What's the recommend way to limit the RAM usage?
PPs.: With growing memory usage 18GB+ now the CPU usage also drops, so this probably is one of the filters using more and more RAM and slowing down while handling that RAM.


=> GOT IT, problem is with DotKill, updating to the latest version of DotKill fixed it.
__________________
Hybrid here in the forum, homepage

Last edited by Selur; 23rd February 2019 at 08:57.
Selur is offline   Reply With Quote
Old 24th February 2019, 01:46   #3260  |  Link
_Al_
Registered User
 
Join Date: May 2011
Posts: 321
Same is hapening with QTGMC (havsfunc) and there might be others. I just simply tell Vapoursynth to limit RAM,
some cross platform method, like in python:
mem = psutil.virtual_memory()
available = int(mem.available/1024/1024) #MB
cache = available - some_wiggle_room_value
core.max_cache_size = cache
Vapoursynth then releases RAM, if I watch usage it goes all the way to the limit and then it is drastically released. It cycles like that for a some short time - filled/released,filled/released but strangely, after some short time, it settles somewhere underneath that set limit. Almost like someone wrote that in some intelligent way, or it is a coincidence, not sure.
_Al_ 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 20:03.


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