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 Display Modes
Old 3rd February 2025, 09:04   #4921  |  Link
Myrsloik
Professional Code Monkey
 
Myrsloik's Avatar
 
Join Date: Jun 2003
Location: Kinnarps Chair
Posts: 2,647
Quote:
Originally Posted by Selur View Post
@Myrsloik: Would be nice if core.text.Text would also support RGBH in the future, atm. it gives:
Code:
vapoursynth.Error: Text: Input clip must be 8..16 bit integer or 32 bit float, passed RGBH
so I have to convert to RGS and back
It's on the todo list. The reason it hasn't happened yet is that only some compilers support half precision types natively (gcc/clang both have the _Float16 and __fp16 extensions at least) and visual studio doesn't.

Software fp16 support is pointless since then single precision would be faster for all processing anyway. At best it would become a performance trap. Internally x86 cpus need to convert everything to single precision anyway.
__________________
VapourSynth - proving that scripting languages and video processing isn't dead yet
Myrsloik is offline   Reply With Quote
Old 12th February 2025, 09:05   #4922  |  Link
Myrsloik
Professional Code Monkey
 
Myrsloik's Avatar
 
Join Date: Jun 2003
Location: Kinnarps Chair
Posts: 2,647
Does anyone still use the Python 3.8 support? Are the windows 7 fanatics still around? It's now been quite a few years since my last check.
__________________
VapourSynth - proving that scripting languages and video processing isn't dead yet
Myrsloik is offline   Reply With Quote
Old 14th February 2025, 01:59   #4923  |  Link
_Al_
Registered User
 
Join Date: May 2011
Posts: 395
I use 3.8 because of using old opencv before opencv introduced a bug, reading wrong pixel information for a pixel (it is3/4 quadrant of pixel off), and they do not care to fix it. So forced to use older numpy, older python etc.
But do not mind me. Just saying, you do not have to be win7 fanatic to use older version. :-)
_Al_ is offline   Reply With Quote
Old 29th March 2025, 07:51   #4924  |  Link
Selur
Registered User
 
Selur's Avatar
 
Join Date: Oct 2001
Location: Germany
Posts: 7,842
Does anyone know how to do the same as Avisynth
Code:
overlay(o, t, mode="subtract", opacity=0.15)
in Vapoursynth?
The widely used Overlay function from havsfunc, does not work as the Avisynth function does.
see: https://forum.doom9.org/showthread.php?t=186264
Vapoursynth overlay uses
Code:
expr = f'x y -'
which seems the intuitive way, but that is not what Avisynth does.


Cu Selur

Ps.: is there an alternative port of Avisynths Overlay than the one in havsfunc, that I'm not aware of?
__________________
Hybrid here in the forum, homepage, its own forum

Last edited by Selur; 29th March 2025 at 07:56.
Selur is offline   Reply With Quote
Old 15th April 2025, 14:41   #4925  |  Link
Myrsloik
Professional Code Monkey
 
Myrsloik's Avatar
 
Join Date: Jun 2003
Location: Kinnarps Chair
Posts: 2,647
https://github.com/AviSynth/AviSynth...OF_add.cpp#L83
With of_add=false
Start transcribing into expr
__________________
VapourSynth - proving that scripting languages and video processing isn't dead yet
Myrsloik is offline   Reply With Quote
Old 15th April 2025, 17:03   #4926  |  Link
ChaosKing
Registered User
 
Join Date: Dec 2005
Location: Germany
Posts: 1,828
I asked chagpt for fun and it "corrected" it to
Code:
expr = 'x y - 0 max'
Should read as max(x - y, 0), but this is only a simple version of subtract.


Chatgpt: If your parser accepts this, you could use the following:

Code:
exprY = 'x y maskY * maskMode * y * (1 - maskMode) + -'
exprY = 'x (maskMode * y * maskY + (1 - maskMode) * y) -'
exprY = 'x (maskMode ? y * maskY : y) -'
For UV
Code:
exprU = 'xU (maskMode ? ((half * (1 - maskU) + maskU * yU)) : yU) - + half'
exprV = 'xV (maskMode ? ((half * (1 - maskV) + maskV * yV)) : yV) - + half'
Superdark-correction:
Code:
exprU = 'Yneg = max(0, -Y); mult = min(Yneg, over32); U = ((U * (over32 - mult)) + (half * mult)) >> shift'
ps I don't know what I'm doing
__________________
AVSRepoGUI // VSRepoGUI - Package Manager for AviSynth // VapourSynth
VapourSynth Portable FATPACK || VapourSynth Database
ChaosKing is offline   Reply With Quote
Old 16th April 2025, 12:24   #4927  |  Link
GeoffreyA
Registered User
 
Join Date: Jun 2024
Location: South Africa
Posts: 610
VSPipe from R71 detected as malware in AVG. I reported it as a false positive.
GeoffreyA is offline   Reply With Quote
Old 16th April 2025, 15:10   #4928  |  Link
Z2697
Registered User
 
Join Date: Aug 2024
Location: Between my two ears
Posts: 860
AVG is now owned by the "security giant" Gen Digital.
https://en.wikipedia.org/wiki/AVG_AntiVirus
https://en.wikipedia.org/wiki/Gen_Di...d_acquisitions

It's hard to imagine why they are taking such act. I mean look how many companies and softwares acquired! (and agreed to be acquired?)
Some stories say that those products are much worse after the merges or acquisitions.

It's almost like they are trying to dictate what's malware and what's not.
Z2697 is offline   Reply With Quote
Old 16th April 2025, 15:53   #4929  |  Link
GeoffreyA
Registered User
 
Join Date: Jun 2024
Location: South Africa
Posts: 610
Quote:
Originally Posted by Z2697 View Post
AVG is now owned by the "security giant" Gen Digital.
https://en.wikipedia.org/wiki/AVG_AntiVirus
https://en.wikipedia.org/wiki/Gen_Di...d_acquisitions

It's hard to imagine why they are taking such act. I mean look how many companies and softwares acquired! (and agreed to be acquired?)
Some stories say that those products are much worse after the merges or acquisitions.

It's almost like they are trying to dictate what's malware and what's not.
From Grisoft to Gen Digital! I find that AVG has always been a bit high on the false positives. When I compile FFmpeg occasionally, every second executable from the Media Autobuild Suite gets quarantined, likely owing to heuristics, so I've got to add the whole directory as an exception. With OCCT, the linpack executable gets blocked. Other than that, AVG Free has been all right for me. I've been using it since 2007.
GeoffreyA is offline   Reply With Quote
Old 17th April 2025, 13:05   #4930  |  Link
Myrsloik
Professional Code Monkey
 
Myrsloik's Avatar
 
Join Date: Jun 2003
Location: Kinnarps Chair
Posts: 2,647
This time I have something slightly different for you to test. This version should be functionally identical to the R71 release but with one important difference: Python 3.12 and later support. As in 3.13 and 3.14 as well.

Try it out and see if it works. The portable install script will probably download the wrong file or fail in some other hilarious way so install the portable version manually.

https://github.com/vapoursynth/vapou...ited-api-test1
__________________
VapourSynth - proving that scripting languages and video processing isn't dead yet
Myrsloik is offline   Reply With Quote
Old 17th April 2025, 14:53   #4931  |  Link
Z2697
Registered User
 
Join Date: Aug 2024
Location: Between my two ears
Posts: 860
Quote:
Originally Posted by Myrsloik View Post
This time I have something slightly different for you to test. This version should be functionally identical to the R71 release but with one important difference: Python 3.12 and later support. As in 3.13 and 3.14 as well.

Try it out and see if it works. The portable install script will probably download the wrong file or fail in some other hilarious way so install the portable version manually.

https://github.com/vapoursynth/vapou...ited-api-test1
It should also work for any version >= 3.8? (also combine the two separate wheels for 3.8 and newer?)

Last edited by Z2697; 17th April 2025 at 14:57.
Z2697 is offline   Reply With Quote
Old 17th April 2025, 15:29   #4932  |  Link
Myrsloik
Professional Code Monkey
 
Myrsloik's Avatar
 
Join Date: Jun 2003
Location: Kinnarps Chair
Posts: 2,647
Quote:
Originally Posted by Z2697 View Post
It should also work for any version >= 3.8? (also combine the two separate wheels for 3.8 and newer?)
No. Anything older than 3.12 (technically 3.11 if compiled for it but then it's slower) doesn't have a complete enough python version independent api.

So 3.8 support remains as it is for the windows 7 fans. In the future I probably won't drop support for python versions until they're end of life. So 3.12 is good until 2029 unless something unexpected happens.
__________________
VapourSynth - proving that scripting languages and video processing isn't dead yet
Myrsloik is offline   Reply With Quote
Old 17th April 2025, 17:18   #4933  |  Link
Z2697
Registered User
 
Join Date: Aug 2024
Location: Between my two ears
Posts: 860
Quote:
Originally Posted by Myrsloik View Post
No. Anything older than 3.12 (technically 3.11 if compiled for it but then it's slower) doesn't have a complete enough python version independent api.

So 3.8 support remains as it is for the windows 7 fans. In the future I probably won't drop support for python versions until they're end of life. So 3.12 is good until 2029 unless something unexpected happens.
Do you mean that 3.11 is generally slower for VapourSynth, or the version independent api of it is slower?
Z2697 is offline   Reply With Quote
Old 17th April 2025, 17:37   #4934  |  Link
Myrsloik
Professional Code Monkey
 
Myrsloik's Avatar
 
Join Date: Jun 2003
Location: Kinnarps Chair
Posts: 2,647
Quote:
Originally Posted by Z2697 View Post
Do you mean that 3.11 is generally slower for VapourSynth, or the version independent api of it is slower?
It's python 3.11. I also think most people already have migrated to 3.12.
__________________
VapourSynth - proving that scripting languages and video processing isn't dead yet
Myrsloik is offline   Reply With Quote
Old 17th April 2025, 18:38   #4935  |  Link
Z2697
Registered User
 
Join Date: Aug 2024
Location: Between my two ears
Posts: 860
Quote:
Originally Posted by Myrsloik View Post
It's python 3.11. I also think most people already have migrated to 3.12.
Somehow I'm still on 3.11 and think building new VS releases for 3.11 is easier than upgrading Python LOL
Better find some time to finally do it.

Last edited by Z2697; 17th April 2025 at 18:41.
Z2697 is offline   Reply With Quote
Old 17th April 2025, 19:37   #4936  |  Link
Selur
Registered User
 
Selur's Avatar
 
Join Date: Oct 2001
Location: Germany
Posts: 7,842
Quote:
In the future I probably won't drop support for python versions until they're end of life.
That lessens the burden of trying to get pytorch&co working with Vapoursynth a lot.

Cu Selur
__________________
Hybrid here in the forum, homepage, its own forum
Selur is offline   Reply With Quote
Old 20th April 2025, 23:29   #4937  |  Link
Selur
Registered User
 
Selur's Avatar
 
Join Date: Oct 2001
Location: Germany
Posts: 7,842
Using: https://github.com/Selur/Vapoursynth...icateFrames.py
with
Code:
FillDuplicateFrames(clip=clip, method="MV", thresh=0.030000).out
that calls:
Code:
  def interpolateWithMV(self, clip, n, start, end):   
    num = end - start
    sup = core.mv.Super(clip, pel=2, hpad=0, vpad=0)
    bvec = core.mv.Analyse(sup, blksize=16, isb=True, chroma=True, search=3, searchparam=1)
    fvec = core.mv.Analyse(sup, blksize=16, isb=False, chroma=True, search=3, searchparam=1)
    self.smooth = core.mv.FlowFPS(clip, sup, bvec, fvec, num=num, den=1, mask=2)
    self.smooth_start = start
    self.smooth_end   = end
    out = self.smooth[n-start]
    if self.debug:
      return out.text.Text(text="MV",alignment=9)
    return out
gives me tons of :
Code:
Explicitly instantiated a Cache. This is no longer possible and the original clip has been passed through instead.
and I'm wondering why?
Where am I explicitly instantiating a cache? How can I fix this?

Cu Selur
__________________
Hybrid here in the forum, homepage, its own forum
Selur is offline   Reply With Quote
Old 21st April 2025, 07:15   #4938  |  Link
Myrsloik
Professional Code Monkey
 
Myrsloik's Avatar
 
Join Date: Jun 2003
Location: Kinnarps Chair
Posts: 2,647
You probably have an old version of some plugin that does it internally. Or that's my guess.
__________________
VapourSynth - proving that scripting languages and video processing isn't dead yet
Myrsloik is offline   Reply With Quote
Old 21st April 2025, 07:57   #4939  |  Link
Selur
Registered User
 
Selur's Avatar
 
Join Date: Oct 2001
Location: Germany
Posts: 7,842
Since I this does not happen with other interpolation methods, it must be mvtools.
I checked, I'm using https://github.com/dubhater/vapoursy...leases/tag/v24 which seems to be the latest version.
Strangely using:
Code:
sup = core.mv.Super(clip, pel=2, hpad=0, vpad=0)
bvec = core.mv.Analyse(sup, blksize=16, isb=True, chroma=True, search=3, searchparam=1)
fvec = core.mv.Analyse(sup, blksize=16, isb=False, chroma=True, search=3, searchparam=1)
clip = core.mv.FlowFPS(clip, sup, bvec, fvec, num=50, den=1, mask=2)
instead of:
Code:
fdf = FillDuplicateFrames(clip=clip, method="MV")
clip = fdf.out
the problem does not occur.
So it must be something else in FillDuplicateFrames. Strange.
=> Thanks for the feedback, I'll try to figure out what is causing this.

Cu Selur
__________________
Hybrid here in the forum, homepage, its own forum
Selur is offline   Reply With Quote
Old 21st April 2025, 08:23   #4940  |  Link
Selur
Registered User
 
Selur's Avatar
 
Join Date: Oct 2001
Location: Germany
Posts: 7,842
Correction this is caused by mvtools!
I simplified the script to:
Code:
# Imports
import vapoursynth as vs
# getting Vapoursynth core
import sys
import os
core = vs.core
# Import scripts folder
scriptPath = 'F:/Hybrid/64bit/vsscripts'
sys.path.insert(0, os.path.abspath(scriptPath))

# loading plugins
core.std.LoadPlugin(path="F:/Hybrid/64bit/vsfilters/Support/libmvtools.dll")
core.std.LoadPlugin(path="F:/Hybrid/64bit/vsfilters/SourceFilter/LSmashSource/LSMASHSource.dll")

clip = core.lsmas.LWLibavSource(source="G:/TestClips&Co/files/test.avi", format="YUV420P8", stream_index=0, cache=0, prefer_hw=0)

sup = core.mv.Super(clip, pel=2, hpad=0, vpad=0)
bvec = core.mv.Analyse(sup, blksize=16, isb=True, chroma=True, search=3, searchparam=1)
fvec = core.mv.Analyse(sup, blksize=16, isb=False, chroma=True, search=3, searchparam=1)
clip = core.mv.FlowFPS(clip, sup, bvec, fvec, num=50, den=1, mask=2)

# output
clip.set_output()
and calling:
Code:
VSPipe.exe c:\Users\Selur\Desktop\FillDuplicateFrames_MV_Cache.vpy NUL -c y4m
gave me:
Code:
Warning: Explicitly instantiated a Cache. This is no longer possible and the original clip has been passed through instead.
Warning: Explicitly instantiated a Cache. This is no longer possible and the original clip has been passed through instead.
Warning: Explicitly instantiated a Cache. This is no longer possible and the original clip has been passed through instead.
Warning: Explicitly instantiated a Cache. This is no longer possible and the original clip has been passed through instead.
Output 857 frames in 0.44 seconds (1926.36 fps)
=> will report to dubhater => https://github.com/dubhater/vapoursy...ools/issues/87
__________________
Hybrid here in the forum, homepage, its own forum

Last edited by Selur; 21st April 2025 at 08:28.
Selur is offline   Reply With Quote
Reply

Tags
speed, vaporware, vapoursynth

Thread Tools
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 23:54.


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