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. |
11th September 2016, 00:31 | #2241 | Link | |
Registered User
Join Date: Sep 2012
Posts: 47
|
Quote:
You may want to use the mask parameter, specifying that you're allowing a change in the part where you're putting the logo (area where the mask is white), and not allowing a change elsewhere (area where the mask is black). # black clip the size of logo mask = core.std.BlankClip(logo) # now change to white mask = core.std.Invert(mask) # add black borders to right and bottom of the area (apply logo to upper-left) mask = core.std.AddBorders(mask, right=clip.width-logo.width, bottom=clip.height-logo.height) warning: didn't test; am not a regular user of these functions and not that familiar with VS Or I guess if you max out the alpha in the logo for the garbage/padding, it would be 100% transparent and not change the picture there. That's probably easier, actually. |
|
11th September 2016, 06:49 | #2242 | Link |
Registered User
Join Date: Oct 2001
Location: Germany
Posts: 7,277
|
@HolyWu: as I understood it alphy=True returns two clips, don't I need to take both?
Code:
[logo, alpha] = core.imwrif.Read(filename="F:/TestClips&Co/background.png", alpha=True) tried: Code:
# Imports import sys import os import vapoursynth as vs core = vs.get_core() # Import Scripts Folder scriptPath = 'G:/Hybrid/vsscripts' sys.path.append(os.path.abspath(scriptPath)) # Import havsfunc import havsfunc as havsfunc # Loading Plugins core.std.LoadPlugin(path="G:/Hybrid/Vapoursynth/vapoursynth64/plugins/SourceFilter/Imagemagick/libimwri.dll") core.std.LoadPlugin(path="G:/Hybrid/Vapoursynth/vapoursynth64/plugins/SourceFilter/LSmashSource/vslsmashsource.dll") core.std.LoadPlugin(path="G:/Hybrid/Vapoursynth/vapoursynth64/plugins/Support/fmtconv.dll") # Loading F:\TestClips&Co\test.avi using LWLibavSource clip = core.lsmas.LWLibavSource(source="F:/TestClips&Co/test.avi", cache=0) # adding 'F:\TestClips&Co\background.png' using Overlay [logo, alpha] = core.imwrif.Read(filename="F:/TestClips&Co/background.png", alpha=True) logo = core.resize.Bicubic(clip=logo, format=clip.format.id, matrix_s="709") alpha = core.fmtc.bitdepth(clip=alpha, bits=clip.format.bits_per_sample) clip=havsfunc.Overlay(clipa=clip, clipb=logo, mask=alpha) # Output clip.set_output() Last edited by Selur; 11th September 2016 at 07:02. |
11th September 2016, 10:19 | #2244 | Link |
Registered User
Join Date: Oct 2001
Location: Germany
Posts: 7,277
|
Thanks! That works!
Positioning and only showing the logo for a short time works fine too: Code:
# Imports import sys import os import vapoursynth as vs core = vs.get_core() # Import Scripts Folder scriptPath = 'G:/Hybrid/vsscripts' sys.path.append(os.path.abspath(scriptPath)) # Import havsfunc import havsfunc as havsfunc # Loading Plugins core.std.LoadPlugin(path="G:/Hybrid/Vapoursynth/vapoursynth64/plugins/SourceFilter/Imagemagick/libimwri.dll") core.std.LoadPlugin(path="G:/Hybrid/Vapoursynth/vapoursynth64/plugins/Support/fmtconv.dll") core.std.LoadPlugin(path="G:/Hybrid/Vapoursynth/vapoursynth64/plugins/SourceFilter/LSmashSource/vslsmashsource.dll") # Loading F:\TestClips&Co\test.avi using LWLibavSource clip = core.lsmas.LWLibavSource(source="F:/TestClips&Co/test.avi", cache=0) # adding 'F:\TestClips&Co\background.png' using Overlay [logo, alpha] = core.imwrif.Read(filename="F:/TestClips&Co/background.png", alpha=True) logo = core.resize.Bicubic(clip=logo, format=clip.format.id, matrix_s="709") alpha = core.fmtc.bitdepth(clip=alpha, bits=clip.format.bits_per_sample, fulld=True).std.Invert() beforeLogo = core.std.Trim(clip,last=49) selection = core.std.Trim(clip,first=50,last=100) afterLogo = core.std.Trim(clip,first=101) selection = havsfunc.Overlay(clipa=selection, clipb=logo, mask=alpha, x=20, y=40) clip = beforeLogo + selection + afterLogo # Output clip.set_output() Cu Selur Last edited by Selur; 11th September 2016 at 11:47. |
12th September 2016, 20:42 | #2245 | Link |
Registered User
Join Date: Oct 2010
Posts: 36
|
Try my crossfade function from: http://forum.doom9.org/showthread.ph...34#post1755234
|
13th September 2016, 11:37 | #2247 | Link |
Registered User
Join Date: May 2016
Posts: 7
|
Can't build VapourSynth
Can't build vapoursynth ( gcc (GCC) 6.2.1 20160830 )
VapourSynth ( latest git ) Code:
git describe --tags R33.1-18-gf65402b Code:
git describe --tags release-2.2.1-13-g1855661 Errors Code:
src/core/vsresize.cpp:33:2: error: #error zAPI v2 or greater required #error zAPI v2 or greater required ^~~~~ src/core/vsresize.cpp:121:23: error: ‘ZIMG_TRANSFER_ST2084’ was not declared in this scope { "st2084", ZIMG_TRANSFER_ST2084 }, ^~~~~~~~~~~~~~~~~~~~ src/core/vsresize.cpp:122:23: error: ‘ZIMG_TRANSFER_ARIB_B67’ was not declared in this scope { "std-b67", ZIMG_TRANSFER_ARIB_B67 }, ^~~~~~~~~~~~~~~~~~~~~~ src/core/vsresize.cpp:123:5: error: no matching function for call to ‘std::unordered_map<std::__cxx11::basic_string<char>, zimg_transfer_characteristics_e>::unordered_map(<brace-enclosed initializer list>)’ }; src/core/vsresize.cpp:760:26: error: ‘struct vszimgxx::zfilter_graph_builder_params’ has no member named ‘nominal_peak_luminance’ m_params.nominal_peak_luminance = propGetScalarDef<double>(in, "nominal_luminance", NAN, vsapi); Last edited by aculnaig; 13th September 2016 at 11:40. |
13th September 2016, 11:38 | #2248 | Link |
Professional Code Monkey
Join Date: Jun 2003
Location: Kinnarps Chair
Posts: 2,555
|
You need to use the hdr branch of zimg to build it.
__________________
VapourSynth - proving that scripting languages and video processing isn't dead yet |
13th September 2016, 13:15 | #2250 | Link |
Registered User
Join Date: Jul 2012
Posts: 94
|
Hello,
can you tell me if my guesses are true. Can I compile zimg on debian? if yes why can't I compile it? Not sure I actualy can. System: Debian wheezy x64 Here is my error code: http://paste2.org/tgXKhezc cheers in advance |
13th September 2016, 13:49 | #2251 | 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 |
|
14th September 2016, 23:06 | #2253 | Link | |
Registered User
Join Date: Jun 2012
Location: Ibiza, Spain
Posts: 321
|
Quote:
|
|
17th September 2016, 20:20 | #2255 | Link |
Registered User
Join Date: Oct 2001
Location: Germany
Posts: 7,277
|
I'm trying to get Vapoursynth working on mac, using:
Code:
# Imports import vapoursynth as vs core = vs.get_core() # Loading Plugins core.std.LoadPlugin(path="/Users/selur/build-Hybrid-Desktop-Release/Hybrid.app/Contents/MacOS/vsfilters/SourceFilter/FFMS2/ffms2.dylib") # Loading /Users/selur/Desktop/公演后感言.mp4 using FFMS2 clip = core.ffms2.Source(source="/Users/selur/Desktop/公演后感言.mp4",cachefile="/Users/selur/Desktop/temp/mp4_d59244d4d4de113a5823257ae88125fc_16807.ffindex") # Output clip.set_output() Code:
Failed to evaluate the script: Python exception: Failed to load /Users/selur/build-Hybrid-Desktop-Release/Hybrid.app/Contents/MacOS/vsfilters/SourceFilter/FFMS2/ffms2.dylib. Error given: dlopen(/Users/selur/build-Hybrid-Desktop-Release/Hybrid.app/Contents/MacOS/vsfilters/SourceFilter/FFMS2/ffms2.dylib, 1): image not found Traceback (most recent call last): File "src/cython/vapoursynth.pyx", line 1491, in vapoursynth.vpy_evaluateScript (src/cython/vapoursynth.c:26897) File "/Users/selur/Desktop/temp/tempPreviewVapoursynthFile21_04_39_802.vpy", line 5, in <module> core.std.LoadPlugin(path="/Users/selur/build-Hybrid-Desktop-Release/Hybrid.app/Contents/MacOS/vsfilters/SourceFilter/FFMS2/ffms2.dylib") File "src/cython/vapoursynth.pyx", line 1383, in vapoursynth.Function.__call__ (src/cython/vapoursynth.c:25204) vapoursynth.Error: Failed to load /Users/selur/build-Hybrid-Desktop-Release/Hybrid.app/Contents/MacOS/vsfilters/SourceFilter/FFMS2/ffms2.dylib. Error given: dlopen(/Users/selur/build-Hybrid-Desktop-Release/Hybrid.app/Contents/MacOS/vsfilters/SourceFilter/FFMS2/ffms2.dylib, 1): image not found (I'm on mac osx, vapoursynth was installed using homebrew, ffms2 was separately compiled and copied to '/Users/selur/build-Hybrid-Desktop-Release/Hybrid.app/Contents/MacOS/vsfilters/SourceFilter/FFMS2/ffms2.dylib' ) |
18th September 2016, 05:28 | #2260 | Link | ||
Registered User
Join Date: Oct 2001
Location: Germany
Posts: 7,277
|
Quote:
Quote:
+ There doesn't seem to be a way to uninstall it and it's r33 not r33.1 Last edited by Selur; 18th September 2016 at 06:47. |
||
Tags |
speed, vaporware, vapoursynth |
Thread Tools | Search this Thread |
Display Modes | |
|
|