10.10.2021, 02:47
Pages: 1 2
10.10.2021, 08:28
Code:
# Imports
import vapoursynth as vs
# getting Vapoursynth core
import ctypes
# Loading Support Files
Dllref = ctypes.windll.LoadLibrary("C:/Program Files/Hybrid/64bit/vsfilters/Support/libfftw3f-3.dll")
core = vs.core
# Loading Plugins
core.std.LoadPlugin(path="C:/Program Files/Hybrid/64bit/vsfilters/DenoiseFilter/NEO_FFT3DFilter/neo-fft3d.dll")
core.std.LoadPlugin(path="C:/Program Files/Hybrid/64bit/vsfilters/SourceFilter/LSmashSource/vslsmashsource.dll")
# source: 'C:\Users\Michael\Desktop\New folder\Scenes From a Marriage S01E01.mkv'
# current color space: YUV420P8, bit depth: 8, resolution: 1920x1080, fps: 23.976, color matrix: 709, yuv luminance scale: limited, scanorder: progressive
# Loading C:\Users\Michael\Desktop\New folder\Scenes From a Marriage S01E01.mkv using LWLibavSource
clip = core.lsmas.LWLibavSource(source="C:/Users/Michael/Desktop/New folder/Scenes From a Marriage S01E01.mkv", format="YUV420P8", cache=0, prefer_hw=0)
# making sure input color matrix is set as 709
clip = core.resize.Bicubic(clip, matrix_in_s="709",range_s="limited")
# making sure frame rate is set to 23.976
clip = core.std.AssumeFPS(clip=clip, fpsnum=24000, fpsden=1001)
# Setting color range to TV (limited) range.
clip = core.std.SetFrameProp(clip=clip, prop="_ColorRange", intval=1)
# denoising using Neo-FFT3D
clip = core.neo_fft3d.FFT3D(clip=clip, bw=16, bh=16)
# Loading image based subtitle C:\Video\Hybrid Output\Scenes From a Marriage S01E01_id_2_lang_en.sup using Subtitle
subs = core.sub.ImageFile(clip=clip, file="C:/Video/Hybrid Output/Scenes From a Marriage S01E01_id_2_lang_en.sup", blend=False)
alpha = core.std.PropToClip(subs)
subs = core.resize.Bicubic(subs, width=clip.width, height=clip.height, format=clip.format.id, matrix_s="709", range_s="limited")
gray_format = core.register_format(vs.GRAY, clip.format.sample_type, clip.format.bits_per_sample, 0, 0)
alpha = core.resize.Bicubic(alpha, width=clip.width, height=clip.height, format=gray_format.id, range_s="limited")
clip = core.std.MaskedMerge(clip, subs, alpha)
# adjusting output color from: RGB24 to YUV420P8 for x264Model
clip = core.resize.Bicubic(clip=clip, format=vs.YUV420P8, matrix_s="709", range_s="limited")
# set output frame rate to 23.976fps
clip = core.std.AssumeFPS(clip=clip, fpsnum=24000, fpsden=1001)
# Output
clip.set_output()
Encoding call, also looks fine:
[code]"C:\Program Files\Hybrid\64bit\Vapoursynth\vspipe.exe" "C:\Users\Michael\AppData\Local\Temp\encodingTempSynthSkript_2021-10-09@19_37_17_8510.vpy" - --y4m | "C:\Program Files\Hybrid\64bit\x264.exe" --preset slow --crf 24.00 --profile high --sync-lookahead 18 --psy-rd 1.00:0.15 --sar 1:1 --qpfile "C:\Users\Michael\AppData\Local\Temp\Scenes From a Marriage S01E01_2021-10-09@19_37_17_8510_05.qp" --deblock -1:-1 --non-deterministic --range tv --colormatrix bt709 --demuxer y4m --input-range tv --fps 24000/1001 --output-depth 8 --output "C:\Users\Michael\AppData\Local\Temp\2021-10-09@19_37_17_8510_06.264" -
but directly aborts. :/
What happens if you call the encoding call inside a 'Windows Command Prompt'-window?
Does the Vapoursynth Preview work properly or does is show an error with you settings?
Cu Selur
10.10.2021, 16:32
Here's the message
Code:
x264 [error]: No input file. Run x264 --help for a list of options.
Error: Failed to retrieve frame 0 with error: Resize error: Resize error 3074: no path between colorspaces (2/2/2 => 1/2/2). May need to specify additional colorspace parameters.
Output 0 frames in 3.82 seconds (0.00 fps)
10.10.2021, 16:37
What about the preview?
Quote:x264 [error]: No input file. Run x264 --help for a list of options.should only happen if you forgot the last ' - ' at the end.
Quote:Error: Failed to retrieve frame 0 with error: Resize error: Resize error 3074: no path between colorspaces (2/2/2 => 1/2/2). May need to specify additional colorspace parameters.is probably a problem with the Vapoursynth script
10.10.2021, 16:45
Sorry, didn't think that was part of it
Preview is a grey box
Edit: Woops I just noticed I left 'level' as unrestricted, I'm changing it to 4.1
Code:
Error: Failed to retrieve frame 0 with error: Resize error: Resize error 3074: no path between colorspaces (2/2/2 => 1/2/2). May need to specify additional colorspace parameters.
Output 0 frames in 4.00 seconds (0.00 fps)
y4m [info]: 1920x1080p 1:1 @ 24000/1001 fps (cfr)
x264 [info]: using SAR=1/1
x264 [info]: using cpu capabilities: MMX2 SSE2Fast SSSE3 SSE4.2 AVX FMA3 BMI2 AVX2
x264 [info]: profile High, level 5.0, 4:2:0, 8-bit
Preview is a grey box
Edit: Woops I just noticed I left 'level' as unrestricted, I'm changing it to 4.1
10.10.2021, 16:51
Problem is related to Neo-fft3d, with it disabled handling works fine.
Seems like it does some color space conversion I was not aware of.
-> looking into it.
(no, not neo-fft3d, but the subtitle adding)
Cu Selur
Seems like it does some color space conversion I was not aware of.
-> looking into it.
(no, not neo-fft3d, but the subtitle adding)
Cu Selur
10.10.2021, 17:32
Send you a link to a dev verison which hopefully fixes the issue.
Cu Selur
Cu Selur
10.10.2021, 18:06
New error!
This one is with MCDegrainSharp
This one is with MCDegrainSharp
10.10.2021, 18:09
Does the Vapoursynth Preview show an error?
10.10.2021, 18:11
Code:
# Imports
import os
import sys
import vapoursynth as vs
# getting Vapoursynth core
core = vs.core
# Import scripts folder
scriptPath = 'C:/Program Files/Hybrid/64bit/vsscripts'
sys.path.insert(0, os.path.abspath(scriptPath))
# Loading Plugins
core.std.LoadPlugin(path="C:/Program Files/Hybrid/64bit/vsfilters/SubtitleFilter/SubText/SubText.dll")
core.std.LoadPlugin(path="C:/Program Files/Hybrid/64bit/vsfilters/Support/libmvtools.dll")
core.std.LoadPlugin(path="C:/Program Files/Hybrid/64bit/vsfilters/Support/TCanny.dll")
core.std.LoadPlugin(path="C:/Program Files/Hybrid/64bit/vsfilters/SourceFilter/LSmashSource/vslsmashsource.dll")
# Import scripts
import mcdegrainsharp
# source: 'C:\Users\Michael\Desktop\New folder\Scenes From a Marriage S01E01.mkv'
# current color space: YUV420P8, bit depth: 8, resolution: 1920x1080, fps: 23.976, color matrix: 709, yuv luminance scale: limited, scanorder: progressive
# Loading C:\Users\Michael\Desktop\New folder\Scenes From a Marriage S01E01.mkv using LWLibavSource
clip = core.lsmas.LWLibavSource(source="C:/Users/Michael/Desktop/New folder/Scenes From a Marriage S01E01.mkv", format="YUV420P8", cache=0, prefer_hw=0)
# making sure input color matrix is set as 709
clip = core.resize.Bicubic(clip, matrix_in_s="709",range_s="limited")
# making sure frame rate is set to 23.976
clip = core.std.AssumeFPS(clip=clip, fpsnum=24000, fpsden=1001)
# Setting color range to TV (limited) range.
clip = core.std.SetFrameProp(clip=clip, prop="_ColorRange", intval=1)
# removing grain using MCDegrain
clip = mcdegrainsharp.mcdegrainsharp(clip=clip)
# Loading image based subtitle C:\Video\Hybrid Output\Scenes From a Marriage S01E01_id_2_lang_en.sup using Subtitle
subs = core.sub.ImageFile(clip=clip, file="C:/Video/Hybrid Output/Scenes From a Marriage S01E01_id_2_lang_en.sup", blend=False)
alpha = core.std.PropToClip(subs)
subs = core.resize.Bicubic(subs, width=clip.width, height=clip.height, format=clip.format.id, matrix_s="709", range_s="limited")
gray_format = core.register_format(vs.GRAY, clip.format.sample_type, clip.format.bits_per_sample, 0, 0)
alpha = core.resize.Bicubic(alpha, width=clip.width, height=clip.height, format=gray_format.id, range_s="limited")
clip = core.std.MaskedMerge(clip, subs, alpha)
# set output frame rate to 23.976fps
clip = core.std.AssumeFPS(clip=clip, fpsnum=24000, fpsden=1001)
# Output
clip.set_output()
Code:
Failed to evaluate the script:
Python exception: module 'vapoursynth' has no attribute 'get_core'
Traceback (most recent call last):
File "src\cython\vapoursynth.pyx", line 2756, in vapoursynth._vpy_evaluate
File "src\cython\vapoursynth.pyx", line 2757, in vapoursynth._vpy_evaluate
File "C:\Users\Michael\AppData\Local\Temp\tempPreviewVapoursynthFile11_10_00_658.vpy", line 28, in
clip = mcdegrainsharp.mcdegrainsharp(clip=clip)
File "C:\Program Files\Hybrid\64bit\vsscripts\mcdegrainsharp.py", line 42, in mcdegrainsharp
core = vs.get_core()
AttributeError: module 'vapoursynth' has no attribute 'get_core'
Pages: 1 2