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. |
10th September 2017, 16:10 | #2702 | Link |
Registered User
Join Date: Oct 2001
Location: Germany
Posts: 7,277
|
@mparade: Do you get an error when you open the script with inside the Vapoursynth editor, or through:
Code:
"C:\PROGRA~1\Hybrid\VAPOUR~1\vspipe.exe" --info "PATH to Script" |
10th September 2017, 16:35 | #2703 | Link | |
Registered User
Join Date: Nov 2013
Posts: 577
|
Quote:
In Windows command line I got: "No output file specified" |
|
10th September 2017, 17:03 | #2706 | Link | |||
Registered User
Join Date: Nov 2013
Posts: 577
|
Quote:
1. Message on command line: Quote:
Quote:
|
|||
10th September 2017, 17:10 | #2707 | Link | |
Registered User
Join Date: Oct 2001
Location: Germany
Posts: 7,277
|
Quote:
|
|
10th September 2017, 17:11 | #2708 | Link |
Registered User
Join Date: Jun 2002
Location: On thin ice
Posts: 6,837
|
I've tried:
Code:
import vapoursynth as vs core = vs.get_core() core.avs.LoadPlugin(r"D:\Software\Medien\DGDecNV\DGDecodeNV.dll") clip = core.avs.DGSource(r"D:\Video\Samples\4K\HEVC 10-bit_temp\HEVC 10-bit.dgi", fulldepth = True) clip.set_output() Unhandled exception at 0x00007FFB268634BE (ucrtbase.dll) in Veedub64.exe: Fatal program exit requested.
__________________
https://github.com/stax76/software-list https://www.youtube.com/@stax76/playlists |
12th September 2017, 20:06 | #2710 | Link |
Registered User
Join Date: Oct 2001
Location: Germany
Posts: 7,277
|
Problem is:
a. DG probably will not create a native Vapoursynth version of DGSource. b. I would understand the Vapoursynth developers when they say that they won't support anything but 8bit from Avisynth filters. -> I keep my fingers crossed. |
12th September 2017, 22:28 | #2711 | Link | |
Professional Code Monkey
Join Date: Jun 2003
Location: Kinnarps Chair
Posts: 2,555
|
Quote:
Let the butthurt commence!
__________________
VapourSynth - proving that scripting languages and video processing isn't dead yet |
|
13th September 2017, 16:15 | #2713 | Link |
Registered User
Join Date: Sep 2006
Posts: 1,657
|
How do I apply filter to a range of frames on a video? I have a list of range and a list of different setting of a filter, and have each setting applies to each range of frames.
Code:
ranges = [[0,100],[500,1000],[1500,10000]] settings = [1,2,3] clip = somefunc(setting=settings[0]) # applies to frame 0-100 clip = somefunc(setting=settings[1]) # applies to frame 500-1000 |
13th September 2017, 17:53 | #2714 | Link | |
Professional Code Monkey
Join Date: Jun 2003
Location: Kinnarps Chair
Posts: 2,555
|
Quote:
__________________
VapourSynth - proving that scripting languages and video processing isn't dead yet |
|
13th September 2017, 18:19 | #2715 | Link |
Registered User
Join Date: Oct 2010
Posts: 36
|
Yep, but unlike avisynth you can sprinkle some python magic (untested):
Code:
def gen_clip(clip, ranges, settings): i = 0 for rng, setting in ranges: start, end = rng if start > i: yield clip[i:start], None yield clip[start:end]), setting i = end if end < len(clip): yield clip[end:] clip = core.std.Splice([somefunc(c, setting=s) for c,s in gen_clip(clip, ranges, settings) if s is not None else c]) Last edited by splinter98; 13th September 2017 at 18:24. |
13th September 2017, 20:33 | #2716 | Link |
Moderator
Join Date: Oct 2001
Location: Hawaii
Posts: 7,406
|
Except AviSynth has ReplaceFramesSimple:
A=somefunc(settings) ReplaceFramesSimple(Last,A,Mappings="[0 500]") It is, admittedly, even more helpful when you have multiple instances of needing the same settings over a limited range of frames but I couldn't live without it and find the more traditional Trim/Splice method pretty clunky and completely unworkable when there are a lot of different filters with different settings to use over a limited range of frames. It won't work in Vapoursynth without changes being made? http://www.avisynth.nl/users/stickboy/ Last edited by manono; 14th September 2017 at 05:18. Reason: Fixed an incomplete ReplaceFramesSimple line. Can also add more frame ranges if needed. |
13th September 2017, 23:42 | #2717 | Link |
Registered User
Join Date: Jun 2012
Location: Ibiza, Spain
Posts: 321
|
And in vapoursynth you have https://github.com/Irrational-Encodi...th-RemapFrames and https://github.com/Irrational-Encodi...vsfunc.py#L825 and only god know how many more python functions scattered around the internet.
|
14th September 2017, 00:32 | #2718 | Link |
Excessively jovial fellow
Join Date: Jun 2004
Location: rude
Posts: 1,100
|
Yes. You have the Python standard library at your fingertips and the VS clips are list-like objects. There is absolutely no need for plugins to muck around with frame orders or applying filters to parts of clips.
If I read the original request correctly you just want to use zip() to pair up frame ranges with their arguments. That's pretty much a oneliner, something like Code:
ranges = [(0, 200), (300, 400)] settings = [{'argument': 3}, {'argument': 4}] clip = core.std.splice([core.foo.Bar(clip, **args)[start:end] for (start, end), args in zip(ranges, settings)]) Python syntax abuse used: - Double splat operator (**), or "argument dict unpacking": if you have a function in Python that takes two named arguments a and b, and a dict like {"a": 3, "b": 4}, calling func(**argsDict) will end up calling the function with the a parameter being 3 and the b parameter being 4. Very handy, that. Use single splat (*) for similarly translating a list to positional arguments. You can use both at the same time, as in func(*positional, **named). - List comprehensions, as in [str(x) for x in [0, 1, 2]] - a handy way to write oneliners and you should use them at every opportunity to make sure nobody can read your code. - Nested destructuring (or maybe it's more appropriately called "unpacking" in Python terminology?) assignment of iterator variables, as in: Code:
[str(c) for (b, c), a in [((3, 5), 6)]] # returns ['5'] Last edited by TheFluff; 14th September 2017 at 00:56. |
14th September 2017, 00:55 | #2719 | Link | |
Registered User
Join Date: Sep 2006
Posts: 1,657
|
Quote:
Reading through the filter description, looks like ReplaceFrames is the function for this task. |
|
14th September 2017, 15:30 | #2720 | Link |
Registered User
Join Date: Sep 2006
Posts: 1,657
|
Ok I got it working with ReplaceFramesSimple in the remapframes package
Code:
ranges = [[0,200],[300,400],[1000,10000]] settings = [1,2,3] for r, s in zip(ranges, settings): temp = somefunc(clip, setting=s) map_string = '[{} {}]'.format(r[0], r[1]) final_clip = core.remap.Rfs(clip, temp, mappings=map_string, mismatch=False) |
Tags |
speed, vaporware, vapoursynth |
Thread Tools | Search this Thread |
Display Modes | |
|
|