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. |
25th May 2018, 14:31 | #3041 | Link | |
Registered User
Join Date: Jun 2006
Posts: 452
|
Quote:
See https://forum.doom9.org/showthread.p...28#post1840628 See here for proof : HolyWu compiled a ffmpeg binary (https://forum.doom9.org/showthread.p...63#post1840663) He has also given a way how to create such binary : https://forum.doom9.org/showthread.p...03#post1840703 Or read the whole thread (only 2 pages) at https://forum.doom9.org/showthread.php?t=175341 I hope this makes you reconsider building ffmpeg with --enable-vapoursynth, because it works for all : VS installed, portable VS and without any VS. |
|
26th May 2018, 11:17 | #3042 | Link | |
Registered User
Join Date: Oct 2001
Location: Germany
Posts: 7,259
|
Got a small question, since my Vapoursynth/Python understanding is lacking. :/
I got the following script: Code:
# Imports import os import sys import vapoursynth as vs core = vs.get_core() # Import scripts folder scriptPath = 'G:/Hybrid/64bit/vsscripts' sys.path.append(os.path.abspath(scriptPath)) # Loading Plugins core.std.LoadPlugin(path="G:/Hybrid/64bit/vsfilters/SharpenFilter/AWarpSharp2/libawarpsharp2.dll") core.std.LoadPlugin(path="G:/Hybrid/64bit/vsfilters/SourceFilter/Imagemagick/libimwri.dll") # Import scripts import havsfunc import mvsfunc # Loading C:\Users\Selur\Desktop\Image sequence\%02d.png using vsImageReader clip = core.imwri.Read("C:/Users/Selur/Desktop/Image sequence/%02d.png", firstnum=1) clip = core.std.Trim(clip=clip, length=30) # making sure frame rate is set to 25/1 clip = core.std.AssumeFPS(clip, fpsnum=25, fpsden=1) # Making sure input color range is set to PC (full) range. clip = core.std.SetFrameProp(clip=clip, prop="_ColorRange", intval=0) original = clip # line darkening using Toon # adjusting color space from RGB24 to YUV444P16 for VsToon clip = core.resize.Bicubic(clip=clip, format=vs.YUV444P16, matrix_s="709") clip = havsfunc.Toon(input=clip) # adjusting output color from: YUV444P16 to YUV420P8 for x264Model (i420) clip = core.resize.Bicubic(clip=clip, format=vs.YUV420P8) # adjusting for FilterView; original is RGB24 and clip is YUV420P8 if original.format.id != clip.format.id: if (original.format.id == vs.RGB24 or original.format.id == vs.RGB32): original = core.resize.Bicubic(original, format=clip.format.id,matrix_s="709",matrix_in_s="709") else: original = core.resize.Bicubic(original, format=clip.format.id,matrix_in_s="709") clip = core.text.Text(clip,"Filtered") original = core.text.Text(original,"Original") interleaved = core.std.Interleave([clip, original]) # Output interleaved.set_output() Quote:
-> How to fix this? + Is there a way to check if original.format.id is inside vs.RGB ? Cu Selur Last edited by Selur; 26th May 2018 at 11:20. |
|
26th May 2018, 11:26 | #3043 | Link |
Professional Code Monkey
Join Date: Jun 2003
Location: Kinnarps Chair
Posts: 2,548
|
Check the color_family property instead. It indicates rgb/yuv/gray. I suspect that's what you want
__________________
VapourSynth - proving that scripting languages and video processing isn't dead yet |
26th May 2018, 11:38 | #3044 | Link |
Registered User
Join Date: Oct 2001
Location: Germany
Posts: 7,259
|
What I want is that in case the formats of original and clip differ, that original should be adjusted.
Since converting from RGB to YUV requires that matrix_s is specified I need some 'if'-block. How to get the frame propery? Code:
original.props['color_family'] |
26th May 2018, 11:48 | #3045 | Link | |
Registered User
Join Date: Oct 2001
Location: Germany
Posts: 7,259
|
okay it's original.format.color_family.
Problem is: Code:
# Imports import os import sys import vapoursynth as vs core = vs.get_core() # Import scripts folder scriptPath = 'G:/Hybrid/64bit/vsscripts' sys.path.append(os.path.abspath(scriptPath)) # Loading Plugins core.std.LoadPlugin(path="G:/Hybrid/64bit/vsfilters/SharpenFilter/AWarpSharp2/libawarpsharp2.dll") core.std.LoadPlugin(path="G:/Hybrid/64bit/vsfilters/SourceFilter/Imagemagick/libimwri.dll") # Import scripts import havsfunc import mvsfunc # Loading C:\Users\Selur\Desktop\Image sequence\%02d.png using vsImageReader clip = core.imwri.Read("C:/Users/Selur/Desktop/Image sequence/%02d.png", firstnum=1) clip = core.std.Trim(clip=clip, length=30) # making sure frame rate is set to 25/1 clip = core.std.AssumeFPS(clip, fpsnum=25, fpsden=1) # Making sure input color range is set to PC (full) range. clip = core.std.SetFrameProp(clip=clip, prop="_ColorRange", intval=0) original = clip # line darkening using Toon # adjusting color space from RGB24 to YUV444P16 for VsToon clip = core.resize.Bicubic(clip=clip, format=vs.YUV444P16, matrix_s="709") clip = havsfunc.Toon(input=clip) # adjusting output color from: YUV444P16 to YUV420P8 for x264Model (i420) clip = core.resize.Bicubic(clip=clip, format=vs.YUV420P8) # adjusting for FilterView if original.format.id != clip.format.id: if (original.format.color_family == vs.RGB and clip.format.color_family != vs.RGB): original = core.resize.Bicubic(original, format=clip.format.id,matrix_s="709",matrix_in_s="709") elif (original.format.color_family == clip.format.color_family): original = core.resize.Bicubic(original, format=clip.format.id) else: original = core.resize.Bicubic(original, format=clip.format.id,matrix_in_s="709") clip = core.text.Text(clip,"Filtered") original = core.text.Text(original,"Original") interleaved = core.std.Interleave([clip, original]) # Output interleaved.set_output() Quote:
I thought this should do the conversion and not add YUV matrix to RGB. Last edited by Selur; 26th May 2018 at 11:59. |
|
30th May 2018, 15:42 | #3047 | Link | |
Registered User
Join Date: Aug 2015
Posts: 47
|
Guys i got an error with some scripts
Quote:
any help! Last edited by unix; 31st May 2018 at 15:10. |
|
30th May 2018, 17:01 | #3049 | Link | |
Registered User
Join Date: Aug 2015
Posts: 47
|
I didn't get you!
this what inside the double quotation, the error message . Quote:
|
|
30th May 2018, 17:08 | #3050 | Link |
Pig on the wing
Join Date: Mar 2002
Location: Finland
Posts: 5,718
|
Have you checked that the file mvsfunc.py is not broken? I.e. open it in Notepad++ and see what that line shows.
__________________
And if the band you're in starts playing different tunes I'll see you on the dark side of the Moon... |
30th May 2018, 17:23 | #3052 | Link | |
Registered User
Join Date: Aug 2015
Posts: 47
|
Quote:
thank you every one |
|
31st May 2018, 07:51 | #3053 | Link |
Registered User
Join Date: Aug 2015
Posts: 47
|
Back
I got another an error Code:
Failed to evaluate the script: Python exception: module 'mvsfunc' has no attribute 'Depth' Traceback (most recent call last): File "src\cython\vapoursynth.pyx", line 1847, in vapoursynth.vpy_evaluateScript File "/XXXXX/Desktop/VapourSynthEditor-r16-64bit/Untitled.vpy", line 9, in AttributeError: module 'mvsfunc' has no attribute 'Depth' Last edited by unix; 31st May 2018 at 13:40. |
31st May 2018, 09:42 | #3054 | Link |
Pig on the wing
Join Date: Mar 2002
Location: Finland
Posts: 5,718
|
Did you try the latest version of mvsfunc? That file of yours doesn't have that function that is being called.
__________________
And if the band you're in starts playing different tunes I'll see you on the dark side of the Moon... |
31st May 2018, 10:47 | #3056 | Link |
Registered User
Join Date: Aug 2015
Posts: 47
|
Guys one more question, I just try to use the portable ver of VSynth
VSynth library paths should direct to python lib or what? & VP plugins paths should direct to plugins of VSynth (plugins64) right? Last edited by unix; 31st May 2018 at 21:25. |
31st May 2018, 13:55 | #3057 | Link |
German doom9/Gleitz SuMo
Join Date: Oct 2001
Location: Germany, rural Altmark
Posts: 6,752
|
No need for bold face.
You mean the "portable" version (without installing Python into the system)? And again, again, and again (Groundhog day): Prefer external image hosts over attaching images in the forum, because it takes time for a moderator to approve them. |
31st May 2018, 14:55 | #3058 | Link | ||
Registered User
Join Date: Aug 2015
Posts: 47
|
Quote:
Quote:
anyway I think it's better to ask in "VapourSynth Editor" not here. . Last edited by unix; 31st May 2018 at 21:34. |
||
8th June 2018, 15:03 | #3060 | Link | ||
Registered User
Join Date: Aug 2015
Posts: 47
|
I tried to used IVTC but I got an error
script: Quote:
Quote:
-VapourSynth-R39 |
||
Tags |
speed, vaporware, vapoursynth |
Thread Tools | Search this Thread |
Display Modes | |
|
|