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. |
15th March 2019, 13:16 | #3281 | Link | |
unsigned int
Join Date: Oct 2012
Location: 🇪🇺
Posts: 760
|
Quote:
There was a bit of code in clip.output() which assumed that the width multiplied by bytes_per_sample is the same as the stride. This is only true when the width multiplied by bytes_per_sample is a multiple of 32. This is why you have a problem with 720x___ but not with 1280x___, 1440x____ or 1920x____. 720 / 32 = 22.5; 1280 / 32 = 40; 1440 / 32 = 45; 1920 / 32 = 60. The stride (the distance between two consecutive rows) is not always the same as the width multiplied by bytes_per_sample in order to make every row start at a memory location which is a multiple of 32. (The first row starts at a multiple of 32 because that's what VapourSynth requests from the memory allocator.) This apparently makes filters run faster. The extra (stride - width * bytes_per_sample) bytes are left unused.
__________________
Buy me a "coffee" and/or hire me to write code! |
|
15th March 2019, 18:50 | #3282 | Link |
Registered User
Join Date: May 2011
Posts: 321
|
Thank you for explanation, now when it is clear it is even workable.
Width for output() function now has to be any even number x 32. Multiple of odd number would not work. So any width divided by 32 with even result would work. Thank you. |
15th March 2019, 21:24 | #3283 | Link |
Professional Code Monkey
Join Date: Jun 2003
Location: Kinnarps Chair
Posts: 2,548
|
This will be fixed in the next release
__________________
VapourSynth - proving that scripting languages and video processing isn't dead yet |
16th March 2019, 01:02 | #3286 | Link |
Registered User
Join Date: May 2011
Posts: 321
|
Not sure if I understand, do you want to give it output name as script name?
You'd use __file__ variable, if you want just basename, you'd do something like: import os output_dir = r'F:\Destination' output = os.path.join(output_dir, os.path.basename(__file__)+'.264') In practical terms you'd perhaps always import your modul for encoding, you'd put that encoding part as a separate py file and put it in Python\Lib\vapoursynth directory and just import it as a modul in each script and run it. You couldpass the whole cmd line as a variable string and let that sorted out in that modul with shlex.split(cmd as a string) etc. Last edited by _Al_; 16th March 2019 at 01:07. |
16th March 2019, 01:38 | #3287 | Link | |
Registered User
Join Date: May 2005
Posts: 1,462
|
Quote:
__________________
Gorgeous, delicious, deculture! Last edited by asarian; 16th March 2019 at 02:11. |
|
16th March 2019, 11:16 | #3288 | Link | |
Registered User
Join Date: May 2005
Posts: 1,462
|
Quote:
'VSPipe f:\jobs\test.vpy' It tells me 'No output file specified' I must be doing it wrong.
__________________
Gorgeous, delicious, deculture! |
|
16th March 2019, 20:22 | #3289 | Link |
Registered User
Join Date: May 2011
Posts: 321
|
vspipe is another (perhaps preferred) way how to encode your script. It pipes frames into an encoder of your choice from OUTSIDE of vapoursynth script *.vpy or *.py,
but method from above, vapoursynth outpus raw frames directly from script itself, you bypass vspipe, but you need to have *.py, not *.vpy because you run Python basically , vapoursynth does its wrapping part in Python and serving frames with clip.output(). You just run script itself with this method and it will start encoding, you can choose a python consol of your choice (IDLE for example came with Python, so you should have it) and pressing F5 or even using VSEditor, but VS Editor needs clip.set_output(), otherwise it would not let script run, therefore encode (and then showing preview). If you want to avoid preview popup after encoding, you'd just evaluate script. if you do not use a console and prefer windows command line, you'd need to run: python3 "test.py" or python "test.py" Last edited by _Al_; 16th March 2019 at 20:34. |
17th March 2019, 14:36 | #3290 | Link |
Registered User
Join Date: Dec 2005
Location: Germany
Posts: 1,795
|
Why is the avisynth RemoveDirt.dll only availible if the RemoveDirtVS_x64.dll is not autoloaded.
My steps core.avs.LoadPlugin(r"D:\avs_plugins64\RemoveDirt.dll") # no loading error But clip = core.avs.RestoreMotionBlocks(clip) is not availible Checking with print(core.get_plugins()) confirms that com.fakeurl.removedirtvs is loaded but nothing with avisynth. Now without RemoveDirtVS_x64.dll core.avs.LoadPlugin(r"D:\avs_plugins64\RemoveDirt.dll") print(core.get_plugins()) -> RestoreMotionBlocks is available Code:
'com.vapoursynth.avisynth': {'namespace': 'avs', 'identifier': 'com.vapoursynth.avisynth', 'name': 'VapourSynth Avisynth Compatibility', 'functions': {'LoadPlugin': 'path:data;', 'RestoreMotionBlocks': 'c1:clip;c2:clip ... VS and AVS dlls: https://www.dropbox.com/s/nkho8s2pje...irtVS.zip?dl=1
__________________
AVSRepoGUI // VSRepoGUI - Package Manager for AviSynth // VapourSynth VapourSynth Portable FATPACK || VapourSynth Database |
18th March 2019, 10:39 | #3292 | Link |
Professional Code Monkey
Join Date: Jun 2003
Location: Kinnarps Chair
Posts: 2,548
|
There are no exported version numbers
__________________
VapourSynth - proving that scripting languages and video processing isn't dead yet |
18th March 2019, 22:47 | #3293 | Link | |
Registered User
Join Date: May 2005
Posts: 1,462
|
Quote:
Thank you!
__________________
Gorgeous, delicious, deculture! |
|
19th March 2019, 01:16 | #3294 | Link |
Registered User
Join Date: Dec 2005
Location: Germany
Posts: 1,795
|
I have this "prop transfer" code:
Code:
def _Transfer(n, f): fout = f[0].copy() fout.props['_Diff'] = f[1].props['_Diff'] return fout alt_clip = core.std.ModifyFrame(alt_clip, [alt_clip, alt_clip_butt], selector=_Transfer) @Myrsloik have you seen my RemoveDirt post? https://forum.doom9.org/showthread.p...51#post1869151
__________________
AVSRepoGUI // VSRepoGUI - Package Manager for AviSynth // VapourSynth VapourSynth Portable FATPACK || VapourSynth Database Last edited by ChaosKing; 19th March 2019 at 01:42. |
19th March 2019, 05:13 | #3295 | Link | |
Registered User
Join Date: Jan 2016
Posts: 162
|
Quote:
Code:
from functools import partial def _Transfer(n, f, prop_name): fout = f[0].copy() fout.props[prop_name] = f[1].props[prop_name] return fout alt_clip = core.std.ModifyFrame(alt_clip, [alt_clip, alt_clip_butt], selector=partial(_Transfer, prop_name="_Diff")) |
|
19th March 2019, 10:44 | #3296 | Link |
Registered User
Join Date: Dec 2005
Location: Germany
Posts: 1,795
|
Exactly what I wanted, perfect
__________________
AVSRepoGUI // VSRepoGUI - Package Manager for AviSynth // VapourSynth VapourSynth Portable FATPACK || VapourSynth Database |
19th March 2019, 15:07 | #3297 | Link |
Registered User
Join Date: Sep 2006
Posts: 1,657
|
When I try to extract planes and merge them back together, I got error "ShufflePlanes: Plane 1 and 2 are not subsampled multiples of first plane"?
Code:
clip_yuv16 = core.resize.Bicubic(clip, format=vs.YUV420P16) y_clip = core.std.ShufflePlanes(clip_yuv16 , planes=0, colorfamily=vs.YUV) u_clip = core.std.ShufflePlanes(clip_yuv16 , planes=1, colorfamily=vs.YUV) v_clip = core.std.ShufflePlanes(clip_yuv16 , planes=2, colorfamily=vs.YUV) yuv16_new = core.std.ShufflePlanes(clips=[y_clip, u_clip, v_clip], planes=[0,0,0], colorfamily=vs.YUV) |
19th March 2019, 15:35 | #3298 | Link | |
Helenium(Easter)
Join Date: Aug 2017
Location: Hsinchu, Taiwan
Posts: 99
|
Quote:
__________________
Monochrome Anomaly |
|
27th March 2019, 20:17 | #3300 | Link |
Registered User
Join Date: Oct 2001
Location: Germany
Posts: 7,259
|
I'm wondering could someone adjust https://github.com/HENDRIX-ZT2/Deep-Video-Deinterlacing to be used as a Vapoursynth filter? sounds interesting,..
|
Tags |
speed, vaporware, vapoursynth |
Thread Tools | Search this Thread |
Display Modes | |
|
|