13.03.2021, 14:27
Hab glaub ich ne Methode gefunden wie es geht und sie mal für die Color Filter implementiert (8 Stunden später, kaum getestet).
Lies Dir mal [INFO] About Vapoursynth Filter Order/Queue durch, damit Du weißt wie die Vapoursynth FilterQueue benutzt werden kann.
Wenn Du z.B.
Die FilterQueue sieht dann in etwa so aus:
und Hybrid würde dann etwas wie:
erzeugen. Ist zwar nicht wirklich 'schön', aber sollte funktionieren.
-> Habe Dir mal nen Link zu ner dev Version (per PM) zum Testen geschickt.
Cu Selur
Lies Dir mal [INFO] About Vapoursynth Filter Order/Queue durch, damit Du weißt wie die Vapoursynth FilterQueue benutzt werden kann.
Wenn Du z.B.
- Tweak mit Gamma 2 auf alle cycle=2, offsets=[0], und
- Tweak mit Gamma 0.5 auf alle cycle=2, offsets=[1]
Die FilterQueue sieht dann in etwa so aus:
Code:
Deinterlace:*,*:QTGMC (Vapoursynth):*,*:vsQTGMCBob;false:*,*:vsQTGMCSelect;Even:*,*:vsQTGMCPadToMod16;false:*,*:vsQTGMCPreset;Fast:*,*:vsQTGMCCPreset;Slower:*,*:vsQTGMCDenoiser;auto:*,*:vsQTGMCInputTyp;0:*,*:vsQTGMCOrder;-1:*,*:vsQTGMCInputTyp;0:*,*:vsQTGMCTr2;1:*,*:vsQTGMCSharpness;1.0:*,*:vsQTGMCSourceMatch;off:*,*:vsQTGMCNoisePreset;Fast:*,*:vsQTGMCShow;false:*,*:vsQTGMCShowNoise;false:*,*:vsQTGMCUseEzd;false:*,*:vsQTGMCUseEzk;false:*,*:vsQTGMCEzdValue;0.00:*,*:vsQTGMCEzkValue;0.00:*,*:vsQTGMCLossless;off:*,*:vsQTGMCOpenCL;false:*,*:vsQTGMCMatchEnhance;0.50:*,*:vsQTGMCMatchPreset;default:*,*:vsQTGMCMatchPreset2;default
Crop:*,*:nonea
Rotation:*,*:flipVideo;false:*,*:flipVideoHorizontal;false:*,*:rotate;false:*,*:rotateValue;off
Frameinterpolation:*,*:none
Resize:*,*:none
Letterboxing:*,*:none
AddingSubtitle
Color - Levels:*,*:vsLevels;true:*,*:vsLevelsMinIn;16:*,*:vsLevelsMaxIn;235:*,*:vsLevelsMinOut;16:*,*:vsLevelsMaxOut;235:*,*:vsLevelsPlanes;luma only:*,*:vsLevelsGamma;2.00:*,*:vsLevelsFrame;false:*,*:vsLevelsUseRGB;true:*,*:vsLevelsApplyOnlyToEvery;true:*,*:vsLevelsApplyOnlyToEveryCycle;2:*,*:vsLevelsApplyOnlyToEveryOffsets;0:*,*:vsLevelsOnlyRange;false:*,*:vsLevelsRanges;
Color - Levels:*,*:vsLevels;true:*,*:vsLevelsMinIn;16:*,*:vsLevelsMaxIn;235:*,*:vsLevelsMinOut;16:*,*:vsLevelsMaxOut;235:*,*:vsLevelsPlanes;luma only:*,*:vsLevelsGamma;0.50:*,*:vsLevelsFrame;false:*,*:vsLevelsUseRGB;true:*,*:vsLevelsApplyOnlyToEvery;true:*,*:vsLevelsApplyOnlyToEveryCycle;2:*,*:vsLevelsApplyOnlyToEveryOffsets;1:*,*:vsLevelsOnlyRange;false:*,*:vsLevelsRanges;
Code:
# Imports
import vapoursynth as vs
core = vs.get_core()
# Loading Plugins
core.std.LoadPlugin(path="I:/Hybrid/64bit/vsfilters/SourceFilter/FFMS2/ffms2.dll")
# source: 'F:\TestClips&Co\files\test.avi'
# current color space: YUV420P8, bit depth: 8, resolution: 640x352, fps: 25, color matrix: 470bg, yuv luminance scale: limited, scanorder: progressive
# Loading source using FFMS2
clip = core.ffms2.Source(source="F:/TestClips&Co/files/test.avi",cachefile="E:/Temp/avi_078c37f69bb356e7b5fa040c71584c40_853323747.ffindex",format=vs.YUV420P8,alpha=False)
# making sure input color matrix is set as 470bg
clip = core.resize.Point(clip, matrix_in_s="470bg",range_s="limited")
# making sure frame rate is set to 25
clip = core.std.AssumeFPS(clip=clip, fpsnum=25, fpsden=1)
# Setting color range to TV (limited) range.
clip = core.std.SetFrameProp(clip=clip, prop="_ColorRange", intval=1)
# adjusting color space from YUV420P8 to RGB24 for vsLevels
clip = core.resize.Bicubic(clip=clip, format=vs.RGB24, matrix_in_s="470bg", range_s="limited")
# Color Adjustment
clipA = core.std.SelectEvery(clip = core.std.Levels(clip=clip, min_in=16, max_in=235, min_out=16, max_out=235, gamma=2.00), cycle=2, offsets=[0])
clipB = core.std.SelectEvery(clip=clip, cycle=2, offsets=[1])
clipA0 = clipA
clipB1 = clipB
clip = core.std.Interleave(clips=[clipA0,clipB1])
# Color Adjustment
clipA = core.std.SelectEvery(clip = core.std.Levels(clip=clip, min_in=16, max_in=235, min_out=16, max_out=235, gamma=0.50), cycle=2, offsets=[1])
clipB = core.std.SelectEvery(clip=clip, cycle=2, offsets=[0])
clipA1 = clipA
clipB0 = clipB
clip = core.std.Interleave(clips=[clipB0,clipA1])
# adjusting output color from: RGB24 to YUV420P8 for x264Model (i420@8)
clip = core.resize.Bicubic(clip=clip, format=vs.YUV420P8, matrix_s="470bg", range_s="limited")
# set output frame rate to 25.000fps
clip = core.std.AssumeFPS(clip=clip, fpsnum=25, fpsden=1)
# Output
clip.set_output()
-> Habe Dir mal nen Link zu ner dev Version (per PM) zum Testen geschickt.
Cu Selur