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. |
![]() |
#2901 | Link | |
Registered User
Join Date: Sep 2006
Posts: 849
|
Quote:
|
|
![]() |
![]() |
![]() |
#2902 | Link |
Registered User
Join Date: Sep 2006
Posts: 849
|
Updating on my issue with loading multiple instances of a virtualdub filters. I did more testings on a few more vd filters, the problem should be coming from either avisynth or virtualdub. (I highly believe that it's avisynth)
Loading multiple instance of any vd filter in an avs script will result in an "out-of-bound memory access" crash on program close, which is the same behavior I had in vapoursynth earlier. This will crash in avisynth: Code:
LoadVirtualDubPlugin("Autolevels.vdf", "Autolevels", 0) src = AVISource("sample.avi").ConvertToRGB32() a = src.Autolevels(40, 46, 50, 0, 0, 0, 0, 0) b = src.Autolevels(40, 80, 50, 0, 0, 0, 0, 0) a+b Code:
LoadVirtualDubPlugin("Autolevels.vdf", "Autolevels", 0) LoadVirtualDubPlugin("Autolevels_copy.vdf", "Autolevels_copy", 0) src = AVISource("sample.avi").ConvertToRGB32() a = src.Autolevels(40, 46, 50, 0, 0, 0, 0, 0) b = src.Autolevels_copy(40, 80, 50, 0, 0, 0, 0, 0) a+b |
![]() |
![]() |
![]() |
#2903 | Link | |
Registered User
Join Date: Jan 2014
Posts: 928
|
Quote:
__________________
My AviSynth+ repo on github, Other repos: RgTools, Masktools2, MvTools2, TIVTC, Average, FFT3DFilter Last edited by pinterf; 6th December 2017 at 08:55. Reason: Quote too long |
|
![]() |
![]() |
![]() |
#2905 | Link |
Registered User
Join Date: Sep 2006
Posts: 849
|
Is there a function that can replace a range of frames with another range of frame of the same clip?
I want to replace frame 200-250 with frame 0-150. It's not remapping, the length of the resulting clip should be different to the original. I looked into remapframes but it doesn't have it. |
![]() |
![]() |
![]() |
#2907 | Link | |
Registered User
Join Date: Sep 2006
Posts: 849
|
Quote:
I have another question about slicing, is there a short form to get a clip of N frame to the end of the clip? "clip[50, -1]" only gets frame 50 to the second to the last frame, is there a flag that represent the last frame of the clip? |
|
![]() |
![]() |
![]() |
#2908 | Link |
Registered User
Join Date: Oct 2007
Posts: 126
|
clip[50:]
Of course [:-1] is only giving the second to last. That's what negative slice indexes do. As for wrapping three trims and a splice to do arbitrary replacement of unrelated clips, that kind of really small helper function isn't the sort of thing people share libraries of. A naive implementation is probably about five lines. It's barely even syntactic sugar if you have to define the trim points of the input and replacement separately. |
![]() |
![]() |
![]() |
#2909 | Link |
Registered User
Join Date: Sep 2006
Posts: 849
|
Reporting a memory leak on ModifyFrame as I found it here earlier.
Memory will not flush after I closed preview in vs editor. Using the sample script from the document will cause the leak: Code:
def set_frame_number(n, f): fout = f.copy() fout.props['FrameNumber'] = n return fout clip = core.std.ModifyFrame(clip=clip, clips=clip, selector=set_frame_number) |
![]() |
![]() |
![]() |
#2910 | Link | |
Professional Code Monkey
Join Date: Jun 2003
Location: Ikea Chair
Posts: 1,755
|
Quote:
__________________
VapourSynth - proving that scripting languages and video processing isn't dead yet |
|
![]() |
![]() |
![]() |
#2911 | Link |
Professional Code Monkey
Join Date: Jun 2003
Location: Ikea Chair
Posts: 1,755
|
R41-test1
Some of the fixes required fairly big changes in the cython code so test as many scripts as possible. This binary should be considered alpha quality. Code:
r41: updated to zimg v2.7 removed dependency on the now deprecated codecvt header fixed memory leak where modifyframe wouldn't release the function reference when done fixed a rare memory leak that could happen if the core was freed before the last frame fixed a memory leak that would happen if a python videoframe object was instantiated improved imwri's input and output format guessing, now integer and float image formats will most likely be returned in native precision imwri now requires hdri support since it's now enabled by default stackvertical now properly rejects compat formats instead of producing unexpected output the default initial cache size now also depends on the number of threads used fixed negative frame request error listing the parent node name instead of the correct name fixed expr clamping of 9-15 bit output, previously it would clamp to 16bit fixed corrupted output in expr when mixing int and float for input and output (pinterf)
__________________
VapourSynth - proving that scripting languages and video processing isn't dead yet Last edited by Myrsloik; 12th December 2017 at 17:12. |
![]() |
![]() |
![]() |
#2912 | Link | ||
Registered User
Join Date: Sep 2006
Posts: 849
|
Thank you, the leak is now gone, memory usage drops back to 30MB after preview close.
Quote:
Code:
from functools import partial img_dir = r"F:\temp_img_w\{}.png" def set_frame_number(n, f): fout = f.copy() fout.props.FrameNumber = n return fout clip = core.std.ModifyFrame(clip=clip, clips=clip, selector=set_frame_number) def writeimgfn(n, f, clip, path): num = f.props.FrameNumber rgb_clip = core.resize.Bicubic(clip, matrix_in_s="709", format=vs.RGB24) return core.imwrif.Write(rgb_clip, imgformat="PNG", filename=path.format(n)) clip = core.std.FrameEval(clip, partial(writeimgfn, clip=clip, path=img_dir), prop_src=clip) clip.set_output() Last edited by lansing; 12th December 2017 at 22:24. |
||
![]() |
![]() |
![]() |
#2913 | Link | |
Professional Code Monkey
Join Date: Jun 2003
Location: Ikea Chair
Posts: 1,755
|
Quote:
__________________
VapourSynth - proving that scripting languages and video processing isn't dead yet |
|
![]() |
![]() |
![]() |
#2914 | Link | |
Registered User
Join Date: Sep 2006
Posts: 849
|
Quote:
By tagging and saving a frame number onto each output image instead of the sequence counter will help to back track if something went wrong. For example, if one of the images gives poor matching result, I would know exactly where to look for that scene. |
|
![]() |
![]() |
![]() |
#2915 | Link | ||
Registered User
Join Date: Jul 2012
Location: Scarborough, Canada
Posts: 769
|
Using Vapoursynth to try to process a UHD video
script is Quote:
Code:
Error Video encoding using NVEnc 3.23 (1.7.0.4) Video encoding using NVEnc 3.23 failed with exit code: -1073741819 (0xC0000005) The exit code might be a system error code: The instruction at 0xp referenced memory at 0xp. The memory could not be s. ------------------- Video encoding using NVEnc 3.23 ------------------- "C:\Program Files (Portable)\StaxRip\Apps\NVEnc\NVEncC64.exe" --vbrhq 38400 --codec h265 --preset quality --level 5.1 --output-depth 10 --weightp --ref 5 --gop-len 24 --lookahead 32 --qp-init 1 --max-bitrate 38400 --vbr-quality 25 --aq --cuda-schedule auto --colormatrix bt2020nc --colorprim bt2020 --transfer smpte2084 --mv-precision q-pel --cabac -i "W:\TEMP\KONG SKULL ISLAND_temp\KONG SKULL ISLAND.vpy" -o "W:\TEMP\KONG SKULL ISLAND_temp\KONG SKULL ISLAND_out.h265" StaxRip.ErrorAbortException: Video encoding using NVEnc 3.23 failed with exit code: -1073741819 (0xC0000005) The exit code might be a system error code: The instruction at 0xp referenced memory at 0xp. The memory could not be s. ------------------- Video encoding using NVEnc 3.23 ------------------- "C:\Program Files (Portable)\StaxRip\Apps\NVEnc\NVEncC64.exe" --vbrhq 38400 --codec h265 --preset quality --level 5.1 --output-depth 10 --weightp --ref 5 --gop-len 24 --lookahead 32 --qp-init 1 --max-bitrate 38400 --vbr-quality 25 --aq --cuda-schedule auto --colormatrix bt2020nc --colorprim bt2020 --transfer smpte2084 --mv-precision q-pel --cabac -i "W:\TEMP\KONG SKULL ISLAND_temp\KONG SKULL ISLAND.vpy" -o "W:\TEMP\KONG SKULL ISLAND_temp\KONG SKULL ISLAND_out.h265" at StaxRip.Proc.Start() in D:\Projekte\VS\VB\StaxRip\General\Proc.vb:line 338 at StaxRip.NVEnc.Encode() in D:\Projekte\VS\VB\StaxRip\Encoding\NVEnc.vb:line 82 at StaxRip.GlobalClass.ProcessVideo() in D:\Projekte\VS\VB\StaxRip\General\GlobalClass.vb:line 225 at System.Threading.Tasks.Parallel.<>c__DisplayClass4_0.<Invoke>b__0() --- End of stack trace from previous location where exception was thrown --- at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw() at StaxRip.GlobalClass.ProcessJob(String jobPath) in D:\Projekte\VS\VB\StaxRip\General\GlobalClass.vb:line 137 Quote:
Any ideas? |
||
![]() |
![]() |
![]() |
#2916 | Link |
Registered User
Join Date: Jul 2016
Posts: 37
|
I'm trying to use vapoursynth's avs.LoadPlugin(string path) to load some avisynth filters, however whenever I try to load almost any filter I will get the error:
Code:
Failed to evaluate the script: Python exception: Avisynth Loader: failed to load module Traceback (most recent call last): File "src\cython\vapoursynth.pyx", line 1830, in vapoursynth.vpy_evaluateScript (src\cython\vapoursynth.c:36860) File "", line 4, in File "src\cython\vapoursynth.pyx", line 1722, in vapoursynth.Function.__call__ (src\cython\vapoursynth.c:35000) vapoursynth.Error: Avisynth Loader: failed to load module Thanks! |
![]() |
![]() |
![]() |
#2917 | Link | |
Professional Code Monkey
Join Date: Jun 2003
Location: Ikea Chair
Posts: 1,755
|
Quote:
__________________
VapourSynth - proving that scripting languages and video processing isn't dead yet |
|
![]() |
![]() |
![]() |
#2919 | Link |
German doom9/Gleitz SuMo
Join Date: Oct 2001
Location: Germany, rural Altmark
Posts: 5,248
|
I believe VapourSynth may not be able to load AviSynth plugins with the ancient v2.0 or v2.5 interfaces, but require v2.6... so: Do you have a few examples which plugins load and which don't?
|
![]() |
![]() |
![]() |
#2920 | Link |
Registered User
Join Date: Jul 2016
Posts: 37
|
I've only tested a few, I remember that TIVTC v1.0.5 didn't work, but v1.0.9 worked. Neither Deen or eDeen have worked for me, however I've seen that in https://github.com/vapoursynth/vapou...nth_compat.cpp there are the lines:
PREFETCHR1(deen) PREFETCHR0(eDeen) so I assume that there is compatibility? Also someone used Deen in their vapoursynth script here: https://gist.github.com/4re/bba3f65469acfe0ec08a EDIT: I tested a few avisynth plugins at random to see which ones worked, and can confirm that I got the same error message when trying to load Average, BlendWeight, ColorBalance, FFT3DFilter, and Vinverse. I have recently reinstalled both Avisynth and Vapoursynth and am having the same error. Last edited by kriNon; 14th December 2017 at 15:16. |
![]() |
![]() |
![]() |
Tags |
speed, vaporware, vapoursynth |
Thread Tools | Search this Thread |
Display Modes | |
|
|