17.10.2019, 19:16
The Preview crashes since it opens the Avisynth script and that crashes.
Looking at the Avisynth script
The problem I see is:
Yv12 on itself requires mod2 crop values for width and height.
Interlaced Yv12 content requires mod4 crop values.
see: http://avisynth.nl/index.php/Crop#Crop_restrictions
Normally this is not a problem since Hybrid deinterlaced by default and thus it's only restricted to mod2, but since you choose not to deinterlace and clearly didn't know enough about the color sampling you ran into this problem.
I could:
a. write some code next week (busy over the weekend), to catch this warn the User and not show the preview
b. write additional code to do a ConvertToRGB before applying the cropping and convert back afterwards. Normally I would advice against this (due to the impact on the speed), but for preview purposes only it is probably okay.
-> not sure how and if I will implement any of these. For the time being make sure to crop the height with mod4 values and the preview should be fine.
Cu Selur
Looking at the Avisynth script
LoadCPlugin("C:\PROGRA~1\Hybrid\32bit\AVISYN~1\ffms2.dll")
LoadPlugin("C:\PROGRA~1\Hybrid\32bit\AVISYN~1\masktools2.dll")
LoadPlugin("C:\PROGRA~1\Hybrid\32bit\AVISYN~1\RgTools.dll")
LoadPlugin("C:\PROGRA~1\Hybrid\32bit\AVISYN~1\warpsharp.dll")
LoadPlugin("C:\PROGRA~1\Hybrid\32bit\AVISYN~1\nnedi3.dll")
Import("C:\Program Files\Hybrid\32bit\avisynthPlugins\LimitedSharpenFaster.avs")
SetFilterMTMode("DEFAULT_MT_MODE", MT_MULTI_INSTANCE)
# loading source: C:\1.mkv
# input color sampling YV12
# input luminance scale tv
Source = FFVideoSource("C:\1.mkv",cachefile="C:\Windows\Temp\mkv_c320a4c829187fb5c9c9083a7ece468a_853323747_1_0.ffindex",fpsnum=25,colorspace="YV12")
# current resolution: 720x576
SourceFiltered = Source
SourceFiltered = SourceFiltered.AssumeFrameBased().SeparateFields()
# cropping to 708x448
SourceFiltered = SourceFiltered.Crop(2,31,-10,-33)
# current resolution: 708x448 (SourceFiltered)
Source = Source.AssumeFrameBased().SeparateFields()
Source = Source.Crop(2,31,-10,-33)
# current resolution: 708x448 (Source)
# filtering
# color modifications
SourceFiltered = SourceFiltered.Tweak(sat=1.20,dither=true)
SourceFiltered = SourceFiltered.Levels(0,1.00,255,0,255,dither=true)
# sharpening
SourceFiltered = SourceFiltered.LimitedSharpenFaster(Smode=1,strength=160,edgemode=0)
# scaling
Source = Source.BicubicResize(768,456)
# current resolution: 768x456
Source = Source.Weave()
SourceFiltered = SourceFiltered.nnedi3_rpow2(rfactor=2,cshift="GaussResize",fwidth=768,fheight=456)
SourceFiltered = SourceFiltered.Weave()
# stacking horizontal for filter preview
SourceFiltered = SourceFiltered.ConvertToRGB32(matrix="Rec709")
Source = Source.ConvertToRGB32(matrix="Rec709")
StackHorizontal(Source, SourceFiltered)
PreFetch(2)
return last
SourceFiltered = SourceFiltered.Crop(2,31,-10,-33)
Interlaced Yv12 content requires mod4 crop values.
see: http://avisynth.nl/index.php/Crop#Crop_restrictions
Normally this is not a problem since Hybrid deinterlaced by default and thus it's only restricted to mod2, but since you choose not to deinterlace and clearly didn't know enough about the color sampling you ran into this problem.
I could:
a. write some code next week (busy over the weekend), to catch this warn the User and not show the preview
b. write additional code to do a ConvertToRGB before applying the cropping and convert back afterwards. Normally I would advice against this (due to the impact on the speed), but for preview purposes only it is probably okay.
-> not sure how and if I will implement any of these. For the time being make sure to crop the height with mod4 values and the preview should be fine.
Cu Selur
----
Dev versions are in the 'experimental'-folder of my GoogleDrive, which is linked on the download page.
Dev versions are in the 'experimental'-folder of my GoogleDrive, which is linked on the download page.