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. |
8th August 2017, 09:27 | #2601 | Link | |
Registered User
Join Date: Sep 2006
Posts: 1,657
|
Quote:
|
|
8th August 2017, 09:34 | #2602 | Link |
Excessively jovial fellow
Join Date: Jun 2004
Location: rude
Posts: 1,100
|
http://www.vapoursynth.com/doc/apire...ame-properties
I'm not sure if there's a standard for anything else. The props are just a key-value map that can contain anything though so just iterate over the keys and all secrets will be revealed to you. Maybe. |
8th August 2017, 22:35 | #2603 | Link | |
Registered User
Join Date: Sep 2006
Posts: 1,657
|
Quote:
|
|
11th August 2017, 17:26 | #2605 | Link |
Professional Code Monkey
Join Date: Jun 2003
Location: Kinnarps Chair
Posts: 2,555
|
Sure is. Trim and splice.
__________________
VapourSynth - proving that scripting languages and video processing isn't dead yet |
12th August 2017, 09:39 | #2606 | Link | |
Registered User
Join Date: Sep 2006
Posts: 1,657
|
Quote:
|
|
12th August 2017, 15:28 | #2607 | Link | |
Registered User
Join Date: Oct 2016
Posts: 111
|
I'm new to vapoursynth, Can someone help me?
I need to change this line in Aviysnth with aWarpSharp filter to Vapoursynth with aWarpSharp2. I haven't used aWarpSharp2 filter with Avisynth yet Quote:
|
|
12th August 2017, 18:52 | #2608 | Link | |
Registered User
Join Date: Jan 2016
Posts: 162
|
Quote:
Code:
aWarpSharp(depth=12, thresh=0.2, cm=1) Code:
aWarpSharp2(depth=12, thresh=51, chroma=4) Code:
last = core.warp.AWarpSharp2(last, depth=12, thresh=51, chroma=0) Last edited by WolframRhodium; 12th August 2017 at 18:54. |
|
12th August 2017, 18:55 | #2609 | Link | ||
Registered User
Join Date: Dec 2005
Location: Germany
Posts: 1,795
|
Quote:
Quote:
Code:
aWarpSharp(depth=12, thresh=0.2, cm=1)
__________________
AVSRepoGUI // VSRepoGUI - Package Manager for AviSynth // VapourSynth VapourSynth Portable FATPACK || VapourSynth Database |
||
13th August 2017, 09:45 | #2614 | Link |
Registered User
Join Date: Sep 2006
Posts: 1,657
|
How do I overlay text on the frame, like showing frame number of every frame? I can only think of this, but it's certainly a wrong way to do it because it ate up all my ram until the program crashed on longer videos.
Code:
for i in range (len(clip)): if (i==0): sub_clip = core.sub.Subtitle(clip[i], text=str(i)) else: sub_clip += core.sub.Subtitle(clip[i], text=str(i)) |
13th August 2017, 13:59 | #2617 | Link |
Excessively jovial fellow
Join Date: Jun 2004
Location: rude
Posts: 1,100
|
The use of the word "print" in the docs is a bit confusing, yes. It should probably clarify that it refers to printing on the video frame.
Either way though, requesting all frames in the input clip in Python and splicing one frame at a time is an extremely awkward way of doing things in VS. If you ever find yourself writing a loop that requests frames in Python, you're probably doing things wrong. Yes, iterating over a sequence is intuitive for most programmers, but in the VS world, you need to stop thinking imperative programming and start thinking functional. What you want to write is a composition of functions that does what you want, handling one or at most a few frames at a time, and leave invoking that function chain up to the client application (usually vspipe). Or in other words, start attaching callbacks to things. One more idiomatic way of reimplementing the equivalent of what core.text.FrameNum does yourself is by using FrameEval (example stolen from the docs and slightly modified): Code:
import vapoursynth as vs import functools core = vs.get_core() base_clip = core.std.BlankClip(format=vs.YUV420P8, length=1000, color=[255, 128, 128]) def PrintFrameNumber(n, clip): return core.sub.Subtitle(clip, text=str(n)) number_clip = core.std.FrameEval(base_clip, functools.partial(PrintFrameNumber, clip=base_clip)) Last edited by TheFluff; 13th August 2017 at 14:03. |
14th August 2017, 01:25 | #2618 | Link |
Registered User
Join Date: Sep 2006
Posts: 1,657
|
Thanks for the explanation, that's really clear. I practiced with a few simple function, [s]but I got the error "BuildSCClip() missing 1 required positional argument: 'f'", what does it mean?[/s]
update: I figured out the last problem. And for this one, why didn't it return a delete even clip back to me? Code:
import vapoursynth as vs import functools core = vs.get_core(accept_lowercase=True) source = abc.avi def DeleteEven(n, clip): if n % 2 ==0: return core.std.DeleteFrames(clip, n) return clip odd = core.std.FrameEval(source, functools.partial(DeleteEven, clip=source)) odd.set_output() Last edited by lansing; 14th August 2017 at 07:53. Reason: update |
14th August 2017, 06:17 | #2619 | Link |
Registered User
Join Date: Oct 2016
Posts: 111
|
Can someone give me an example of using TCanny to create a mask and apply it to keep detail in dark area?
I tried it myself but the output turn on black and mask Here's my output: http://i.imgur.com/yBgilc4.png Last edited by tuanden0; 14th August 2017 at 07:47. |
14th August 2017, 22:25 | #2620 | Link | |
Excessively jovial fellow
Join Date: Jun 2004
Location: rude
Posts: 1,100
|
Quote:
|
|
Tags |
speed, vaporware, vapoursynth |
Thread Tools | Search this Thread |
Display Modes | |
|
|