This forum uses cookies
This forum makes use of cookies to store your login information if you are registered, and your last visit if you are not. Cookies are small text documents stored on your computer; the cookies set by this forum can only be used on this website and pose no security risk. Cookies on this forum also track the specific topics you have read and when you last read them. Please confirm whether you accept or reject these cookies being set.

A cookie will be stored in your browser regardless of choice to prevent you being asked this question again. You will be able to change your cookie settings at any time using the link in the footer.

Avisynth preview error
#1
Avisynth preview error: -> ColorMatrix: input to filter must be YV12 or YUY2!


Attached Files
.zip   HybridDebugOutput.zip (Size: 3,16 KB / Downloads: 10)
Reply
#2
Argh,... Hybrid already does go from YUV422P10 from the input to YUV422P8 and doesn't see that YUY2 and YUV422P8 are not the same.

This is so bad, normally uUsing Rec.2020 with 8-bit content does not make sense and is usually advised against in professional workflows, as can result in visible image artifacts, specifically color banding. Rec.2020 is designed as a Wide Color Gamut (WCG) standard for UHDTV and requires 10-bit or 12-bit depth to adequately represent its broad color spectrum.

=> will look into it (maybe I should either restrict Avisynth to 8 bit or drop Avisynth support)


Cu Selur
----
Dev versions are in the 'experimental'-folder of my GoogleDrive, which is linked on the download page.
Reply
#3
Trying to reproduce this, I get:
ClearAutoloadDirs()
SetFilterMTMode("DEFAULT_MT_MODE", MT_MULTI_INSTANCE)
LoadPlugin("F:\Hybrid\64bit\Avisynth\avisynthPlugins\LSMASHSource.dll")
LoadPlugin("F:\Hybrid\64bit\Avisynth\avisynthPlugins\ColorMatrix64.dll")
Import("F:\Hybrid\64bit\Avisynth\avisynthPlugins\mtmodes.avsi")
# loading source: G:\TestClips&Co\files\ProRes\Test_4K_ProResHQ.mov
# color sampling YUY2@10, matrix: bt709, scantyp: progressive, luminance scale: limited
Source = LWLibavVideoSource("G:\TestClips&Co\files\ProRes\Test_4K_ProResHQ.mov",cache=false,format="YUV422P10", prefer_hw=0,repeat=true)
# current resolution: 3840x2160
SourceFiltered = Source
# Converting from 10 to 8bit for ColorMatrix
SourceFiltered = SourceFiltered.ConvertBits(8)
SourceFiltered = SourceFiltered.ConvertToYUY2(interlaced=false)
# color modifications
SourceFiltered = SourceFiltered.ColorMatrix(mode="Rec.709->Rec.2020",clamp=3,interlaced=false,hints=false)
# stacking horizontal for filter preview
# adjust color to RGB32 (for preview)
SourceFiltered = SourceFiltered.ConvertToRGB32(matrix="Rec709")
# adjust color to RGB32 (for preview)
Source = Source.ConvertToRGB32(matrix="Rec709")
StackHorizontal(Source.Subtitle("Original"), SourceFiltered.Subtitle("Filtered"))
# setting output fps to 24.00000fps
AssumeFPS(24,1)
PreFetch(16)
#  output: color sampling RGB32@8, matrix: Rec.2020, scantyp: progressive, luminance scale: limited
return last
which works.

I do not see why Hybrid should behave differently for you, but it does:
ClearAutoloadDirs()
SetFilterMTMode("DEFAULT_MT_MODE", MT_MULTI_INSTANCE)
LoadPlugin("D:\!_System\Hybrid\64bit\Avisynth\avisynthPlugins\ColorMatrix64.dll")
LoadPlugin("D:\!_System\Hybrid\64bit\Avisynth\avisynthPlugins\AutoAdjust.dll")
LoadCPlugin("D:\!_System\Hybrid\64bit\Avisynth\avisynthPlugins\ffms2.dll")
Import("D:\!_System\Hybrid\64bit\Avisynth\avisynthPlugins\mtmodes.avsi")
# loading source: E:\!_Convert\Korolova & Switch Disco - Empty Skies (Upscale)\Korolova & Switch Disco - Empty Skies (Upscale).mov
# color sampling YUY2@10, matrix: bt709, scantyp: progressive, luminance scale: limited
Source = FFVideoSource("E:\!_Convert\Korolova & Switch Disco - Empty Skies (Upscale)\Korolova & Switch Disco - Empty Skies (Upscale).mov",cachefile="C:\Windows\Temp\mov_a62b5e81a682550b47514e5384deb42b_853323747_1_0.ffindex",fpsnum=25,colorspace="YUV422P10")
# current resolution: 3840x2160
SourceFiltered = Source
# Converting from 10 to 8bit for ColorMatrix
SourceFiltered = SourceFiltered.ConvertBits(8)
# color modifications
SourceFiltered = SourceFiltered.ColorMatrix(mode="Rec.709->Rec.2020",clamp=3,interlaced=false,hints=false)
# cropping
Source = Source.Crop(0,268,0,-264)
SourceFiltered = SourceFiltered.Crop(0,268,0,-264)# 3840x1628
SourceFiltered = SourceFiltered.ConvertToYV16(interlaced=false)
SourceFiltered = SourceFiltered.AutoAdjust(auto_gain=true,bright_limit=2.90,gamma_limit=1.00,dark_exclude=0.00,bright_exclude=0.00,avg_safety=0.30,input_tv=false,output_tv=false,temporal_radius=119,high_quality=true)
Source = Source.ColorYUV(analyze=true)
SourceFiltered = SourceFiltered.ColorYUV(analyze=true)
Source = Source.ConvertToYV16(interlaced=false)
Source = Source.Histogram("levels")
SourceFiltered = SourceFiltered.Histogram("levels")
# stacking horizontal for filter preview
# adjust color to RGB32 (for preview)
SourceFiltered = SourceFiltered.ConvertToRGB32(matrix="Rec709")
# adjust color to RGB32 (for preview)
Source = Source.ConvertToRGB32(matrix="Rec709")
StackHorizontal(Source.Subtitle("Original"), SourceFiltered.Subtitle("Filtered"))
# setting output fps to 25.00000fps
AssumeFPS(25,1)
PreFetch(12)
#  output: color sampling RGB32@8, matrix: Rec.2020, scantyp: progressive, luminance scale: full

I do not see why your script is missing:
SourceFiltered = SourceFiltered.ConvertToYUY2(interlaced=false)
both inputs are YUV422P10.


=> Can't reproduce the problem

Cu Selur
----
Dev versions are in the 'experimental'-folder of my GoogleDrive, which is linked on the download page.
Reply
#4
This issue occurs when the color matrix filter is enabled.
I just disabled the filter, and the preview is now working.


Attached Files
.zip   HybridDebugOutput.zip (Size: 65,19 KB / Downloads: 5)
Reply
#5
Yes, I know when the isssue occurs for you.
Problem is that is does not occur for when I use ColorMatrix.
Like you can see in the scripts I posted for me "ConvertToYUY2(interlaced=false)" is added and unless I can manage to reproduce that it is not added (like it is for you) I can not fix the issue.

Does this happen for you with every YUV422P10 source or just the one you use in this here? (as you can see I used a source which seems to match the characteristics of your source)

Cu Selur
----
Dev versions are in the 'experimental'-folder of my GoogleDrive, which is linked on the download page.
Reply
#6
I tried another file with the same YUV422P10 parameters. The problem occurred again.
Reply
#7
Since it does not happen here, can you share a link to a small sample of a clip which allows you to reproduce the problem?

Cu Selur
----
Dev versions are in the 'experimental'-folder of my GoogleDrive, which is linked on the download page.
Reply
#8
Think, I managed to reproduce the problem.
Here, it only happens if one 'forces' FFVideoSource as source filter' and and 'Prefer FFmpegSource' is enabled.
When the default 'LibavVideoSource instead of FFmpegSource' is enabled, it does not happen.
Can you confirm this?

Cu Selur
----
Dev versions are in the 'experimental'-folder of my GoogleDrive, which is linked on the download page.
Reply
#9
Uploaded a new dev which should fix this.

Cu Selur
----
Dev versions are in the 'experimental'-folder of my GoogleDrive, which is linked on the download page.
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)