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 27th April 2022, 21:28   #4701  |  Link
ChaosKing
Registered User
 
Join Date: Dec 2005
Location: Germany
Posts: 1,795
You could also try to set a high max_cache_size and see if it helps http://www.vapoursynth.com/doc/pytho...max_cache_size
__________________
AVSRepoGUI // VSRepoGUI - Package Manager for AviSynth // VapourSynth
VapourSynth Portable FATPACK || VapourSynth Database
ChaosKing is offline   Reply With Quote
Old 6th May 2022, 13:44   #4702  |  Link
Selur
Registered User
 
Selur's Avatar
 
Join Date: Oct 2001
Location: Germany
Posts: 7,259
Can someone compile https://github.com/Setsugennoao/VapourSynth-removedirt for Win 64bit?
I'd like to know whether the fixes and changes Setsugennoa made to the source fix the crashes I encountered.
__________________
Hybrid here in the forum, homepage
Selur is offline   Reply With Quote
Old 6th May 2022, 13:57   #4703  |  Link
kedautinh12
Registered User
 
Join Date: Jan 2018
Posts: 2,153
So simple if you ask author
kedautinh12 is offline   Reply With Quote
Old 6th May 2022, 14:31   #4704  |  Link
Selur
Registered User
 
Selur's Avatar
 
Join Date: Oct 2001
Location: Germany
Posts: 7,259
no issue tracker -> no clue how to contact the author
__________________
Hybrid here in the forum, homepage
Selur is offline   Reply With Quote
Old 6th May 2022, 14:47   #4705  |  Link
kedautinh12
Registered User
 
Join Date: Jan 2018
Posts: 2,153
Ask in another issues tab project and say sorry cause don't have issues tab in removedirt
https://github.com/Setsugennoao/vs-parsedvd/issues
kedautinh12 is offline   Reply With Quote
Old 6th May 2022, 16:56   #4706  |  Link
Selur
Registered User
 
Selur's Avatar
 
Join Date: Oct 2001
Location: Germany
Posts: 7,259
Got in touch with Setsugennoao, sadly his build also crashed the same way as https://github.com/handaimaoh/removedirtvs and https://github.com/pinterf/removedirtvs do.
__________________
Hybrid here in the forum, homepage
Selur is offline   Reply With Quote
Old 25th May 2022, 16:19   #4707  |  Link
stax76
Registered User
 
stax76's Avatar
 
Join Date: Jun 2002
Location: On thin ice
Posts: 6,837
A guide showing how to use VapourSynth in mpv.net:

https://github.com/stax76/mpv.net/wi...nth-in-mpv.net
stax76 is offline   Reply With Quote
Old 25th May 2022, 16:19   #4708  |  Link
stax76
Registered User
 
stax76's Avatar
 
Join Date: Jun 2002
Location: On thin ice
Posts: 6,837
A guide showing how to use VapourSynth in mpv.net:

https://github.com/stax76/mpv.net/wi...nth-in-mpv.net
stax76 is offline   Reply With Quote
Old 25th May 2022, 19:07   #4709  |  Link
Myrsloik
Professional Code Monkey
 
Myrsloik's Avatar
 
Join Date: Jun 2003
Location: Kinnarps Chair
Posts: 2,548
https://github.com/vapoursynth/vapoursynth/releases/tag/R59-RC1
Code:
r59:
fixed several convolution crashes
fixed averageframes weights with float input
fixed rare cython memory leak on error
__________________
VapourSynth - proving that scripting languages and video processing isn't dead yet
Myrsloik is online now   Reply With Quote
Old 26th May 2022, 15:10   #4710  |  Link
Selur
Registered User
 
Selur's Avatar
 
Join Date: Oct 2001
Location: Germany
Posts: 7,259
Thanks. (still hoping an option to disable 'auto loading' will come some time)
__________________
Hybrid here in the forum, homepage
Selur is offline   Reply With Quote
Old 5th June 2022, 11:50   #4711  |  Link
Myrsloik
Professional Code Monkey
 
Myrsloik's Avatar
 
Join Date: Jun 2003
Location: Kinnarps Chair
Posts: 2,548
R59 is out

Pure bug fix release.
__________________
VapourSynth - proving that scripting languages and video processing isn't dead yet
Myrsloik is online now   Reply With Quote
Old 16th June 2022, 07:00   #4712  |  Link
ChaosKing
Registered User
 
Join Date: Dec 2005
Location: Germany
Posts: 1,795
The link “Plugins and Scripts“ is still linked to the old page (which does not exist anymore) on vapoursynth.com
__________________
AVSRepoGUI // VSRepoGUI - Package Manager for AviSynth // VapourSynth
VapourSynth Portable FATPACK || VapourSynth Database
ChaosKing is offline   Reply With Quote
Old 21st June 2022, 14:17   #4713  |  Link
Yomiko
Registered User
 
Join Date: Aug 2021
Posts: 73
Any chance for an official audio visualization plugin?
Yomiko is offline   Reply With Quote
Old 25th June 2022, 07:10   #4714  |  Link
Selur
Registered User
 
Selur's Avatar
 
Join Date: Oct 2001
Location: Germany
Posts: 7,259
How would one port Avisynth: "mt_expand(y=3,u=-128,v=-128)" to Vapoursynth using core.std.Maximum ?
__________________
Hybrid here in the forum, homepage
Selur is offline   Reply With Quote
Old 25th June 2022, 19:26   #4715  |  Link
Greenhorn
Registered User
 
Join Date: Apr 2018
Posts: 61
Quote:
Originally Posted by Selur View Post
How would one port Avisynth: "mt_expand(y=3,u=-128,v=-128)" to Vapoursynth using core.std.Maximum ?
If I read that correctly, that call just processes the y plane normally and sets u and v to 128. (According to http://avisynth.nl/index.php/MaskTools2/mt_expand)

So I think you could do:

y, u, v = your_clip.std.SplitPlanes()
y = y.std.Maximum()
u = core.std.BlankClip(u, color=128)
v = core.std.BlankClip(v, color=128)
your_choice_of_name = core.std.ShufflePlanes([y,u,v], [0,0,0], vs.YUV)

Does that work? (If your clip isn't actually 8bpc, I suppose you'll need to scale 128 to an appropriate value with either simple algebra or one of the various helper functions out there.)

Last edited by Greenhorn; 25th June 2022 at 19:31.
Greenhorn is offline   Reply With Quote
Old 25th June 2022, 20:50   #4716  |  Link
Selur
Registered User
 
Selur's Avatar
 
Join Date: Oct 2001
Location: Germany
Posts: 7,259
I get:
Code:
ry, ru, rv = core.std.SplitPlanes(rainbow)
ValueError: too many values to unpack (expected 3))
Here's where I use this:
Code:
from vapoursynth import core
import vapoursynth as vs

# requires: 
# * BiFrost: https://github.com/dubhater/vapoursynth-bifrost
# * TemporalSoften: https://github.com/dubhater/vapoursynth-temporalsoften 
#   I think this could be replaced by TemporalSoften2 https://github.com/dubhater/vapoursynth-temporalsoften2

# raidus = temporal radius
# th = threshold
def ChubbyRain2(clip: vs.VideoNode, th: int= 0, radius: int=3, show: bool=False, interlaced: bool=False):
  if interlaced:
    es = core.std.SeparateFields(clip=clip)
  else:
    res = clip
	
  y = core.std.ShufflePlanes(res, planes=0, colorfamily=vs.GRAY)
  u = core.std.ShufflePlanes(res, planes=1, colorfamily=vs.GRAY)
  v = core.std.ShufflePlanes(res, planes=2, colorfamily=vs.GRAY)
	
  uc = core.std.Convolution(u, [1,-2,1], mode = "v")
  vc = core.std.Convolution(v, [1,-2,1], mode = "v")
	

  ucc = core.std.Convolution(u, [1,2,1], planes=0, mode = "v")
  vcc = core.std.Convolution(v, [1,2,1], planes=0, mode = "v")
	
  cc = core.std.ShufflePlanes([y,ucc,vcc], planes=[0, 0, 0], colorfamily=vs.YUV)
  cc = core.bifrost.Bifrost(cc)
  cc = core.focus.TemporalSoften(cc, radius=radius,luma_threshold=0, chroma_threshold=255,scenechange=2 , mode=2)
  
  expr = "x y + " + str(th) + " > " + str(256 << (clip.format.bits_per_sample - 8)) + " 0 ?"
  rainbow = core.std.Expr([uc,vc],expr)
  rainbow = core.resize.Point(rainbow, res.width, res.height)
  
  ry, ru, rv = core.std.SplitPlanes(rainbow)
  ry = std.Maximum(ry)
  ru = core.std.BlankClip(ru, color=128 << (clip.format.bits_per_sample - 8))
  rv = core.std.BlankClip(rv, color=128 << (clip.format.bits_per_sample - 8) )
  rainbow = core.std.ShufflePlanes([ry,ru,rv], [0,0,0], vs.YUV)
  
  resfinal = core.std.MaskedMerge(res, cc, rainbow)
  
  if show:
    output = rainbow
  else:
    if interlaced:
      output = core.std.DoubleWeave(resfinal)
      output = core.std.SelectEvery(output, 2, 0)
    else:
      output = resfinal

  return output
Original AviSynth version: http://avisynth.nl/images/ChubbyRain2.avsi
__________________
Hybrid here in the forum, homepage
Selur is offline   Reply With Quote
Old 25th June 2022, 22:28   #4717  |  Link
mastrboy
Registered User
 
Join Date: Sep 2008
Posts: 365
While I don't have a solution to your current issue, are you not missing the cnr2() function call? (http://avisynth.nl/index.php/Cnr2)

I doubt it would function the same without it?
__________________
(i have a tendency to drunk post)
mastrboy is offline   Reply With Quote
Old 26th June 2022, 05:13   #4718  |  Link
Selur
Registered User
 
Selur's Avatar
 
Join Date: Oct 2001
Location: Germany
Posts: 7,259
@mastrboy: yes, you are right I missed the cnr2 call.

---
Okay, I see why the ValueError happens rainbow is Gray8

Code:
def ChubbyRain2(clip: vs.VideoNode, th: int=10, radius: int=3, show: bool=False, sft: int=10, interlaced: bool=False):
  if interlaced:
    res = core.std.SeparateFields(clip=clip)
  else:
    res = clip
	
  y = core.std.ShufflePlanes(res, planes=0, colorfamily=vs.GRAY)
  u = core.std.ShufflePlanes(res, planes=1, colorfamily=vs.GRAY)
  v = core.std.ShufflePlanes(res, planes=2, colorfamily=vs.GRAY)
	
  uc = core.std.Convolution(u, [1,-2,1], mode = "v")
  vc = core.std.Convolution(v, [1,-2,1], mode = "v")
	

  ucc = core.std.Convolution(u, [1,2,1], planes=0, mode = "v")
  vcc = core.std.Convolution(v, [1,2,1], planes=0, mode = "v")
	
  cc = core.std.ShufflePlanes([y,ucc,vcc], planes=[0, 0, 0], colorfamily=vs.YUV)
  cc = core.bifrost.Bifrost(cc)
  cc = core.cnr2.Cnr2(cc)
  cc = core.focus.TemporalSoften(cc, radius=radius, luma_threshold=0, chroma_threshold=sft, scenechange=2 , mode=2)
  #cc = core.focus2.TemporalSoften2(cc, radius=radius, luma_threshold=0, chroma_threshold=sft, scenechange=2 , mode=2)
 
  shift = (clip.format.bits_per_sample - 8)
  expr = "x y + " + str(th) + " > " + str(256 << shift) + " 0 ?"
  rainbowMask = core.std.Expr([uc,vc],expr)
  rainbowMask = core.resize.Point(rainbowMask, res.width, res.height)
  rainbowMask = core.std.Maximum(rainbowMask)
  
  resfinal = core.std.MaskedMerge(res, cc, rainbowMask)
  
  if show:
    output = rainbowMask
  else:
    if interlaced:
      output = core.std.DoubleWeave(resfinal)
      output = core.std.SelectEvery(output, 2, 0)
    else:
      output = resfinal

  return output
doesn't crash, but the output is kind of broken. :/ doh "th: int=0" -> "th: int=10"
__________________
Hybrid here in the forum, homepage

Last edited by Selur; 26th June 2022 at 07:02.
Selur is offline   Reply With Quote
Old 26th June 2022, 06:57   #4719  |  Link
ChaosKing
Registered User
 
Join Date: Dec 2005
Location: Germany
Posts: 1,795
es = core.std.SeparateFields(clip=clip) should be res = ...
__________________
AVSRepoGUI // VSRepoGUI - Package Manager for AviSynth // VapourSynth
VapourSynth Portable FATPACK || VapourSynth Database
ChaosKing is offline   Reply With Quote
Old 26th June 2022, 07:02   #4720  |  Link
Selur
Registered User
 
Selur's Avatar
 
Join Date: Oct 2001
Location: Germany
Posts: 7,259
thanks, fixed.
__________________
Hybrid here in the forum, homepage
Selur 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 11:29.


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