02.02.2021, 06:05
(02.02.2021, 05:49)Selur Wrote:Well, I just want to be able to achieve the same result in Hybrid, that I can achieve using 2 lines of the Avisynth script posted above. What I have to do?Quote:Have no issues to process this video using just 2 lines with AvsPmod and VirtualDub2, regardless input filter (FFmpegSource2(), LSMASHVideoSource(), LWLibavVideoSource()) :Sadly, that does not help at all, since thaos two lines are no where near the script Hybrid uses.
Using:
Vapoursynth Preview works fine here.# Imports import os import sys import vapoursynth as vs core = vs.get_core() # Import scripts folder scriptPath = 'I:/Hybrid/64bit/vsscripts' sys.path.append(os.path.abspath(scriptPath)) # Loading Plugins core.std.LoadPlugin(path="I:/Hybrid/64bit/vsfilters/ResizeFilter/nnedi3/vsznedi3.dll") core.std.LoadPlugin(path="I:/Hybrid/64bit/vsfilters/DeinterlaceFilter/Yadifmod/Yadifmod.dll") core.std.LoadPlugin(path="I:/Hybrid/64bit/vsfilters/SourceFilter/LSmashSource/vslsmashsource.dll") # Import scripts import havsfunc # source: 'C:\Users\Selur\Desktop\hotel._10bit.mov' # current color space: YUV422P10, bit depth: 10, resolution: 720x486, fps: 29.97, color matrix: 470bg, yuv luminance scale: limited, scanorder: bottom field first # Loading C:\Users\Selur\Desktop\hotel._10bit.mov using LWLibavSource clip = core.lsmas.LWLibavSource(source="C:/Users/Selur/Desktop/hotel._10bit.mov", format="YUV422P10", cache=0, fpsnum=30000, fpsden=1001, prefer_hw=0) # 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 29.97 clip = core.std.AssumeFPS(clip=clip, fpsnum=30000, fpsden=1001) # Setting color range to TV (limited) range. clip = core.std.SetFrameProp(clip=clip, prop="_ColorRange", intval=1) # deinterlacing using YadifMod clip = core.yadifmod.Yadifmod(clip=clip, edeint=core.znedi3.nnedi3(clip=clip,field=2), order=0, mode=1) # new fps: 59.94 # adjusting frame count and rate with sRestore clip = havsfunc.srestore(source=clip, frate=23.976, omode=6, speed=9, thresh=16, mode=2) # adjusting output color from: YUV422P10 to YUV420P8 for x264Model (i420@10) clip = core.resize.Bicubic(clip=clip, format=vs.YUV420P8, range_s="limited") # set output frame rate to 23.976fps clip = core.std.AssumeFPS(clip=clip, fpsnum=24000, fpsden=1001) # Output clip.set_output()
Vapoursynth Filter Preview works fine here too.
Using:
Avisynth Preview works fine.ClearAutoloadDirs() SetFilterMTMode("DEFAULT_MT_MODE", MT_MULTI_INSTANCE) LoadPlugin("I:\Hybrid\32bit\AVISYN~1\LSMASHSource.dll") LoadPlugin("I:\Hybrid\32bit\AVISYN~1\yadifmod2.dll") LoadPlugin("I:\Hybrid\32bit\AVISYN~1\nnedi3.dll") LoadPlugin("I:\Hybrid\32bit\AVISYN~1\RgTools.dll") LoadPlugin("I:\Hybrid\32bit\AVISYN~1\mvtools2.dll") LoadPlugin("I:\Hybrid\32bit\AVISYN~1\masktools2.dll") LoadPlugin("I:\Hybrid\32bit\AVISYN~1\TIVTC.dll") LoadPlugin("I:\Hybrid\32bit\AVISYN~1\Average.dll") LoadPlugin("I:\Hybrid\32bit\AVISYN~1\GRunT.dll") LoadPlugin("I:\Hybrid\32bit\AVISYN~1\MedianBlur2.dll") Import("I:\Hybrid\32bit\avisynthPlugins\Zs_RF_Shared.avsi") Import("I:\Hybrid\32bit\avisynthPlugins\Srestore.avsi") # loading source: C:\Users\Selur\Desktop\hotel._10bit.mov # color sampling YUY2@10, matrix: bt601, scantyp: bottom field first, luminance scale: limited LWLibavVideoSource("C:\Users\Selur\Desktop\HOTEL_~1.MOV",cache=false,format="YUV422P16", prefer_hw=0) # current resolution: 720x486 # deinterlacing Yadifmod2(order=-1,mode=1,edeint=nnedi3(field=-2)) # removing ghosting srestore(frate=23.976,omode=6) # filtering # Dithering from 16 to 8bit for encoder ConvertBits(8) # adjust color to YV12 (color matrix: Rec601) ConvertToYV12() # setting output fps to 23.976fps AssumeFPS(24000,1001) # output: color sampling YV16@8, matrix: bt601, scantyp: progressive, luminance scale: limited return last
Avisynth Filter Preview works fine too.
Comparing the Avisynth scripts used for the filter preview:
From your debug output:
on my system:ClearAutoloadDirs() SetFilterMTMode("DEFAULT_MT_MODE", MT_MULTI_INSTANCE) LoadPlugin("C:\PROGRA~1\Hybrid\32bit\AVISYN~1\LSMASHSource.dll") LoadPlugin("C:\PROGRA~1\Hybrid\32bit\AVISYN~1\yadifmod2.dll") LoadPlugin("C:\PROGRA~1\Hybrid\32bit\AVISYN~1\nnedi3.dll") # loading source: D:\Hybrid_test\Gill\hotel_10bit.mov # color sampling YUY2@10, matrix: bt601, scantyp: bottom field first, luminance scale: limited Source = LWLibavVideoSource("D:\HYBRID~1\Gill\HOTEL_~1.MOV",cache=false,format="YUV422P16", prefer_hw=0) # current resolution: 720x486 # deinterlacing SourceFiltered = Source Source = Source.Yadifmod2(order=-1,mode=1,edeint=Source.nnedi3(field=-2)) SourceFiltered = SourceFiltered.Yadifmod2(order=-1,mode=1,edeint=SourceFiltered.nnedi3(field=-2)) # filtering # stacking horizontal for filter preview # adjust color to RGB32 (for preview) SourceFiltered = SourceFiltered.ConvertToRGB32(matrix="Rec601") # adjust color to RGB32 (for preview) Source = Source.ConvertToRGB32(matrix="Rec601") StackHorizontal(Source, SourceFiltered) PreFetch(2) # setting output fps to 59.940fps AssumeFPS(60000,1001) # output: color sampling RGB32@16, matrix: bt601, scantyp: progressive, luminance scale: limited return last
[codeClearAutoloadDirs()
SetFilterMTMode("DEFAULT_MT_MODE", MT_MULTI_INSTANCE)
LoadPlugin("I:\INNOIN~1\32bit\AVISYN~1\LSMASHSource.dll")
LoadPlugin("I:\INNOIN~1\32bit\AVISYN~1\yadifmod2.dll")
LoadPlugin("I:\INNOIN~1\32bit\AVISYN~1\nnedi3.dll")
# loading source: C:\Users\Selur\Desktop\hotel._10bit.mov
# color sampling YUY2@10, matrix: bt601, scantyp: bottom field first, luminance scale: limited
Source = LWLibavVideoSource("C:\Users\Selur\Desktop\HOTEL_~1.MOV",cache=false,format="YUV422P16", prefer_hw=0)
# current resolution: 720x486
# deinterlacing
SourceFiltered = Source
Source = Source.Yadifmod2(order=-1,mode=1,edeint=Source.nnedi3(field=-2))
SourceFiltered = SourceFiltered.Yadifmod2(order=-1,mode=1,edeint=SourceFiltered.nnedi3(field=-2))
# filtering
# stacking horizontal for filter preview
# adjust color to RGB32 (for preview)
SourceFiltered = SourceFiltered.ConvertToRGB32(matrix="Rec601")
# adjust color to RGB32 (for preview)
Source = Source.ConvertToRGB32(matrix="Rec601")
StackHorizontal(Source, SourceFiltered)
PreFetch(8)
# setting output fps to 59.940fps
AssumeFPS(60000,1001)
# output: color sampling RGB32@16, matrix: bt601, scantyp: progressive, luminance scale: limited
return last[/code]

