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. |
|
|
Thread Tools | Search this Thread | Display Modes |
17th April 2019, 08:38 | #1 | Link |
Chiptuner & VapourSynther
Join Date: Mar 2019
Location: Scarlet Devil Mansion, Gensōkyō
Posts: 52
|
Fade-in, fade-out, crossfade/transition, and video overlay on VapourSynth?
How do I implement these video effects on VapourSynth?
|
17th April 2019, 09:20 | #2 | Link |
Registered User
Join Date: Dec 2005
Location: Germany
Posts: 1,821
|
A good start would be checking these out
- FadeEachFrame, FadeOut/In: https://github.com/jeremypoulter/vsutils - crossfade: https://github.com/Irrational-Encodi...ardry/kagefunc - colorfade: https://github.com/tormaid/colorfade - transition https://forum.doom9.org/showthread.php?t=172594 - Overlay https://github.com/HomeOfVapourSynth...sfunc.py#L5072 Can't provide a sample right now.
__________________
AVSRepoGUI // VSRepoGUI - Package Manager for AviSynth // VapourSynth VapourSynth Portable FATPACK || VapourSynth Database Last edited by ChaosKing; 17th April 2019 at 09:22. |
17th April 2019, 17:29 | #3 | Link |
Chiptuner & VapourSynther
Join Date: Mar 2019
Location: Scarlet Devil Mansion, Gensōkyō
Posts: 52
|
So they're Python-script libraries of functions which I would need to import into my script (with the import command?) before using them.
Thankee! This is a good start for now for a project of my own. As for other types of clip-to-clip (or image-to-image) transitions (like blinds, dissolve, shutter, etc.) usually offered by payware video editors (like CyberLink PowerDirector), any idea if some sort of genius managed to implement them in VS? I am also interested in some type of legacy crossfade technique used on some MS-DOS-era PC games (both IBM-PC/AT and NEC PC-9801 classes); an example of such crossfade can be found in the opening sequence of ZUN's 5th Toho game (Mystic Square), when a simple purple background (with a yin-yang orb) slowly transitions to a full artwork with the game title and a sitting miko to the left of the orb. |
17th April 2019, 19:12 | #4 | Link |
Registered User
Join Date: Dec 2011
Posts: 24
|
Have a look at the internal dissolve function in my colorfade script (linked above). It would work with static images looped over a range or a moving clip. Other implementations of this that I've looked at don't seem to align the input clips correctly so that the fade is linear across the entire transition (i.e. the first frame of the transition is 100% clip A and the last is 100% clip B).
|
29th April 2019, 21:12 | #5 | Link | ||
Chiptuner & VapourSynther
Join Date: Mar 2019
Location: Scarlet Devil Mansion, Gensōkyō
Posts: 52
|
Quote:
Code:
from vapoursynth import core import vsutils as vsu import functools # 24-bit RGB (RGB888); using most recent version of FFMS2 to open PNG image TSArawlogo = core.ffms2.Source(r'TeamShanghaiAlice.png') TSArawlogoseq = TSArawlogo.std.AssumeFPS(fpsnum=60000,fpsden=1001)*339 TSAfadeinlogo = vsu.FadeIn(TSArawlogoseq,1.685) TSAfadeoutlogo = vsu.FadeOut(TSAfadeinlogo,0.25) # Simulate 12-bit RGB (RGB444) by integer-dividing all RGB values by 16 (#10h) # then multiplying them by 17 (#11h) rgb444logo = TSAfadeinlogo.std.Expr(expr=["x 16 /", "x 16 /", "x 16 /"]) rgb888logo = rgb444logo.std.Expr(expr=["x 17 *", "x 17 *", "x 17 *"]) rgb888logo.set_output() Quote:
Last edited by SilSinn9801; 29th April 2019 at 21:33. Reason: After studying the HAvsFunc example by HolyWu (https://forum.doom9.org/showthread.php?t=166582), I revert the prior edit. |
||
29th April 2019, 21:27 | #6 | Link | |
Cary Knoop
Join Date: Feb 2017
Location: Newark CA, USA
Posts: 398
|
Quote:
I think what you need is an NLE. |
|
30th April 2019, 00:46 | #7 | Link |
Chiptuner & VapourSynther
Join Date: Mar 2019
Location: Scarlet Devil Mansion, Gensōkyō
Posts: 52
|
What kind of NLE are you talking about? Because if it doesn’t let me do vintage-PC-style transitions (or restrict colors to an archaic 12-bit RGB colorspace), then it is useless to me. I have been using CyberLink PowerDirector 15 for a few years and for one project in particular I don’t want to use it (because its transitions look way too modern to me)
Last edited by SilSinn9801; 30th April 2019 at 00:46. Reason: missing pronoun |
1st May 2019, 00:39 | #10 | Link | |
Registered User
Join Date: May 2011
Posts: 349
|
Quote:
import sys print(sys.path) it could be current directory and bunch of others. After you install Vapoursynth you have also Vapoursynth directory in site-packages directory, so it might be a good idea to always put those py moduls into that directory. On linux, like Ubuntu, you search for site-packages, it can be behind your home/username, down the path. |
|
2nd May 2019, 01:50 | #11 | Link | |
Chiptuner & VapourSynther
Join Date: Mar 2019
Location: Scarlet Devil Mansion, Gensōkyō
Posts: 52
|
Quote:
|
|
2nd May 2019, 02:18 | #12 | Link | |
Chiptuner & VapourSynther
Join Date: Mar 2019
Location: Scarlet Devil Mansion, Gensōkyō
Posts: 52
|
I put vsutils.py into the folder you told me. Now I get this new error:
Quote:
|
|
2nd May 2019, 03:45 | #13 | Link | ||
Registered User
Join Date: May 2011
Posts: 349
|
Quote:
But .py is not understood by VirtualDub2 for example, only .vpy . vspipe has no problem with .py Quote:
def FadeIn(....): is it in there? It is also case sensitive. edit: I just downloaded vsutils.py and that has a Class vsutils, so try to instantiate that Class first and then call it: my_edits = vsu.vsutils() TSAfadeinlogo = my_edits.FadeIn(TSArawlogoseq,1.685) Last edited by _Al_; 2nd May 2019 at 03:58. |
||
2nd May 2019, 04:58 | #14 | Link | |
Chiptuner & VapourSynther
Join Date: Mar 2019
Location: Scarlet Devil Mansion, Gensōkyō
Posts: 52
|
Quote:
|
|
Tags |
crossfade, fade-in, fade-out, overlay, transition |
Thread Tools | Search this Thread |
Display Modes | |
|
|