Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

libhistogram VSAPI4 error #1246

Open
DandyClubs opened this issue Feb 24, 2024 · 1 comment
Open

libhistogram VSAPI4 error #1246

DandyClubs opened this issue Feb 24, 2024 · 1 comment

Comments

@DandyClubs
Copy link

DandyClubs commented Feb 24, 2024

Describe the bug

import os, sys
import vapoursynth as vs
core = vs.core

sys.path.append(r"C:\StaxRip\Apps\Plugins\VS\Scripts")
import importlib.machinery
mvsfunc = importlib.machinery.SourceFileLoader('mvsfunc', r"C:\StaxRip\Apps\Plugins\VS\Scripts\mvsfunc.py").load_module()
adjust = importlib.machinery.SourceFileLoader('adjust', r"C:\StaxRip\Apps\Plugins\VS\Scripts\adjust.py").load_module()
havsfunc = importlib.machinery.SourceFileLoader('havsfunc', r"C:\StaxRip\Apps\Plugins\VS\Scripts\havsfunc.py").load_module()
muvsfunc = importlib.machinery.SourceFileLoader('muvsfunc', r"C:\StaxRip\Apps\Plugins\VS\Scripts\muvsfunc.py").load_module()
core.std.LoadPlugin(r"C:\StaxRip\Apps\Plugins\Dual\ffms2\ffms2.dll", altsearchpath=True)
core.std.LoadPlugin(r"C:\StaxRip\Apps\Plugins\VS\AWarpSharp2\libawarpsharp2.dll", altsearchpath=True)
core.std.LoadPlugin(r"C:\StaxRip\Apps\Plugins\VS\CTMF\CTMF.dll", altsearchpath=True)
core.std.LoadPlugin(r"C:\StaxRip\Apps\Plugins\VS\Descale\libdescale.dll", altsearchpath=True)
core.std.LoadPlugin(r"C:\StaxRip\Apps\Plugins\VS\DFTTest\DFTTest.dll", altsearchpath=True)
core.std.LoadPlugin(r"C:\StaxRip\Apps\Plugins\VS\EEDI2\EEDI2.dll", altsearchpath=True)
core.std.LoadPlugin(r"C:\StaxRip\Apps\Plugins\VS\fmtconv\fmtconv.dll", altsearchpath=True)
core.std.LoadPlugin(r"C:\StaxRip\Apps\Plugins\VS\AddGrain\AddGrain.dll", altsearchpath=True)
core.std.LoadPlugin(r"C:\StaxRip\Apps\Plugins\VS\CAS\CAS.dll", altsearchpath=True)
core.std.LoadPlugin(r"C:\StaxRip\Apps\Plugins\VS\DCTFilter\DCTFilter.dll", altsearchpath=True)
core.std.LoadPlugin(r"C:\StaxRip\Apps\Plugins\VS\Deblock\Deblock.dll", altsearchpath=True)
core.std.LoadPlugin(r"C:\StaxRip\Apps\Plugins\VS\EEDI3m\EEDI3m.dll", altsearchpath=True)
core.std.LoadPlugin(r"C:\StaxRip\Apps\Plugins\VS\FFT3DFilter\fft3dfilter.dll", altsearchpath=True)
core.std.LoadPlugin(r"C:\StaxRip\Apps\Plugins\Dual\flash3kyuu_deband\flash3kyuu_deband.dll", altsearchpath=True)
core.std.LoadPlugin(r"C:\StaxRip\Apps\Plugins\VS\FluxSmooth\libfluxsmooth.dll", altsearchpath=True)
core.std.LoadPlugin(r"C:\StaxRip\Apps\Plugins\VS\HQDN3D\libhqdn3d.dll", altsearchpath=True)
core.std.LoadPlugin(r"C:\StaxRip\Apps\Plugins\Dual\KNLMeansCL\KNLMeansCL.dll", altsearchpath=True)
core.std.LoadPlugin(r"C:\StaxRip\Apps\Plugins\VS\MiscFilters\MiscFilters.dll", altsearchpath=True)
core.std.LoadPlugin(r"C:\StaxRip\Apps\Plugins\VS\BM3D\BM3D.dll", altsearchpath=True)
core.std.LoadPlugin(r"C:\StaxRip\Apps\Plugins\VS\mvtools\libmvtools.dll", altsearchpath=True)
core.std.LoadPlugin(r"C:\StaxRip\Apps\Plugins\VS\nnedi3\libnnedi3.dll", altsearchpath=True)
core.std.LoadPlugin(r"C:\StaxRip\Apps\Plugins\VS\nnedi3\NNEDI3CL.dll", altsearchpath=True)
core.std.LoadPlugin(r"C:\StaxRip\Apps\Plugins\VS\RemoveGrainVS\RemoveGrainVS.dll", altsearchpath=True)
core.std.LoadPlugin(r"C:\StaxRip\Apps\Plugins\VS\Sangnom\libsangnom.dll", altsearchpath=True)
core.std.LoadPlugin(r"C:\StaxRip\Apps\Plugins\VS\scenechange\scenechange.dll", altsearchpath=True)
core.std.LoadPlugin(r"C:\StaxRip\Apps\Plugins\VS\SVPFlow\svpflow1_vs64.dll", altsearchpath=True)
core.std.LoadPlugin(r"C:\StaxRip\Apps\Plugins\VS\SVPFlow\svpflow2_vs64.dll", altsearchpath=True)
core.std.LoadPlugin(r"C:\StaxRip\Apps\Plugins\VS\TTempSmooth\TTempSmooth.dll", altsearchpath=True)
core.std.LoadPlugin(r"C:\StaxRip\Apps\Plugins\VS\nnedi3\vsznedi3.dll", altsearchpath=True)
core.std.LoadPlugin(r"C:\StaxRip\Apps\Plugins\VS\libhistogram\libhistogram.dll", altsearchpath=True)
core.std.LoadPlugin(r"C:\StaxRip\Apps\Plugins\VS\TCanny\TCanny.dll", altsearchpath=True)
core.std.LoadPlugin(r"C:\StaxRip\Apps\Plugins\VS\temporalsoften\temporalsoften.dll", altsearchpath=True)
core.std.LoadPlugin(r"C:\StaxRip\Apps\Plugins\VS\VIVTC\VIVTC.dll", altsearchpath=True)
core.std.LoadPlugin(r"C:\StaxRip\Apps\Plugins\Dual\VSFilterMod\VSFilterMod.dll", altsearchpath=True)
tcFile = r"C:\EncodingSSD\TEST_temp\TEST_timestamps.txt" # timestamps file path
clip = core.ffms2.Source(r"C:\EncodingSSD\TEST.mkv", cachefile=r"C:\EncodingSSD\TEST_temp\temp.ffindex", timecodes=tcFile) if os.path.exists(tcFile) else core.ffms2.Source(r"C:\EncodingSSD\TEST.mkv", cachefile=r"C:\EncodingSSD\TEST_temp\temp.ffindex")
clip = muvsfunc.DisplayHistogram(clip)
clip.set_output()

Script Error

Python exception: Crop: negative/zero cropping dimensions not allowed

Traceback (most recent call last):
  File "src\\cython\\vapoursynth.pyx", line 3124, in vapoursynth._vpy_evaluate
  File "src\\cython\\vapoursynth.pyx", line 3125, in vapoursynth._vpy_evaluate
  File "C:\EncodingSSD\300NTK-071_temp\300NTK-071-muxed.vpy", line 47, in <module>
    clip = muvsfunc.DisplayHistogram(clip)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "C:\StaxRip\Apps\Plugins\VS\Scripts\muvsfunc.py", line 2977, in DisplayHistogram
    histogram_h = TurnLeft(core.hist.Classic(clip.std.Transpose()).std.Crop(left=clip.height))
                           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "src\\cython\\vapoursynth.pyx", line 2860, in vapoursynth.Function.__call__
vapoursynth.Error: Crop: negative/zero cropping dimensions not allowed

Expected behavior
libhistogram VSAPI4
https://github.com/gundamftw/vapoursynth-histogram

this included staxrip 2.36

muvsfunc.DisplayHistogram error

Provide information
https://github.com/dubhater/vapoursynth-histogram

i change dubhater's libhistogram.dll

@Dendraspis
Copy link
Collaborator

libhistogram is the right one and it works as intended, the problem seems to be the script.... 🤔

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants