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.

Crop/Resize
#31
Problem is:

a. 707x471 Hybrid should have thrown an error on preview creation. Uneven
width and/or height is only allowed with 444 as output color sampling.
b. the preview call
# converting to mod1 compatible format
clip = core.resize.Bicubic(clip=clip, format=vs.YUV444P8, range_s="limited")
# cropping the video to 707x471
clip = core.std.CropRel(clip=clip, left=1, right=12, top=8, bottom=1)
# cropping the video to 707x471
original = core.std.CropRel(clip=original, left=1, right=12, top=8, bottom=1)
Preview fails since original is still YUV420P8
is missing a conversion to YUV44P8 for the original

-> I'll look into it.

Note that, even after I fix the bugs, you either need to adjust your cropping values or your output color space.

Cu Selur
----
Dev versions are in the 'experimental'-folder of my GoogleDrive, which is linked on the download page.
Reply
#32
Send you a link via PM to a version which should:
a. check the output resolution against the restrictions of the output color space and throw an error on violation of the restrictions
b. adds the missing color conversion during filter preview

Cu Selur
----
Dev versions are in the 'experimental'-folder of my GoogleDrive, which is linked on the download page.
Reply
#33
(02.11.2020, 18:02)Selur Wrote: Send you a link via PM to a version which should:
a. check the output resolution against the restrictions of the output color space and throw an error on violation of the restrictions
b. adds the missing color conversion during filter preview

Cu Selur

Error

Is there is a chance to  "Save Filter" order and cropping values when Configuration save/Configuration save under current name?
Reply
#34
Cropping values are not Vapoursynth specific so they are not saved those configurations.
FilterOrder should be saved.

I'll add the FilterOrder to the Vapoursynth configurations. (same for Avisynth)

Quote:Error
No clue what the error is,... it would help if you wrote the error message,...

Cu Selur
----
Dev versions are in the 'experimental'-folder of my GoogleDrive, which is linked on the download page.
Reply
#35
(02.11.2020, 20:57)Selur Wrote: Cropping values are not Vapoursynth specific so they are not saved those configurations.
FilterOrder should be saved.

I'll add the FilterOrder to the Vapoursynth configurations. (same for Avisynth)

Quote:Error
No clue what the error is,... it would help if you wrote the error message,...

Cu Selur

Weird - can't reproduce it either this time.
It was error related Vapoursynth editor.
If it'll appear next time I write as much as possible info.
Reply
#36
Okay, this is not a Hybrid bug, but a bug in one of the filters or Vapoursynth itself.
when I use:
# Imports
import vapoursynth as vs
core = vs.get_core()
# Loading Plugins
core.std.LoadPlugin(path="I:/Hybrid/64bit/vsfilters/Support/fmtconv.dll")
core.std.LoadPlugin(path="I:/Hybrid/64bit/vsfilters/SourceFilter/LSmashSource/vslsmashsource.dll")
# source: 'F:\TestClips&Co\files\YUV\yuv422_16bitBitEndianStereo.mov'
# current color space: YUV422P8, bit depth: 0, resolution: 848x352, fps: 23.976, color matrix: 709, yuv luminance scale: limited, scanorder: progressive
# Loading F:\TestClips&Co\files\YUV\yuv422_16bitBitEndianStereo.mov using LWLibavSource
clip = core.lsmas.LWLibavSource(source="F:/TestClips&Co/files/YUV/yuv422_16bitBitEndianStereo.mov", format="YUV422P8", cache=0, prefer_hw=0)
# making sure input color matrix is set as 709
clip = core.resize.Point(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)
original = clip
# cropping the video to 842x348
clip = core.std.CropRel(clip=clip, left=0, right=6, top=2, bottom=2)
# cropping the video to 842x348
original = core.std.CropRel(clip=original, left=0, right=6, top=2, bottom=2)
clip = core.fmtc.resample(clip=clip, kernel="spline16", w=1280, h=530, interlaced=False, interlacedd=False)
original = core.fmtc.resample(clip=original, kernel="spline16", w=1280, h=530, interlaced=False, interlacedd=False)
# adjusting output color from: YUV422P16 to YUV420P8 for x264Model (i420@8-bit)
clip = core.resize.Bicubic(clip=clip, format=vs.YUV420P8, range_s="limited")
# adjusting for FilterView
if original.format.id != clip.format.id:
if (original.format.color_family == vs.RGB and clip.format.color_family != vs.RGB):
   original = core.resize.Bicubic(original, format=clip.format.id, matrix_s="470bg", range_s="limited")
elif (original.format.color_family == clip.format.color_family):
   original = core.resize.Bicubic(original, format=clip.format.id, range_s="limited")
else:
   original = core.resize.Bicubic(original, format=clip.format.id, matrix_in_s="470bg", range_s="limited")
stacked = core.std.StackHorizontal([original,clip])
# set output frame rate to 23.976fps
stacked = core.std.AssumeFPS(clip=stacked, fpsnum=24000, fpsden=1001)
# Output
stacked.set_output()
and
I:\Hybrid\64bit\Vapoursynth>VSPipe.exe  c:\Users\Selur\Desktop\test.vpy e:\Test.avi


I:\Hybrid\64bit\Vapoursynth>VSPipe.exe  c:\Users\Selur\Desktop\test.vpy e:\Test.raw


I:\Hybrid\64bit\Vapoursynth>VSPipe.exe  c:\Users\Selur\Desktop\test.vpy e:\Test.raw

Output 80 frames in 0.29 seconds (274.31 fps)

I:\Hybrid\64bit\Vapoursynth>VSPipe.exe  c:\Users\Selur\Desktop\test.vpy e:\Test.raw

Output 80 frames in 0.29 seconds (272.45 fps)

I:\Hybrid\64bit\Vapoursynth>VSPipe.exe  c:\Users\Selur\Desktop\test.vpy e:\Test.raw


I:\Hybrid\64bit\Vapoursynth>VSPipe.exe  c:\Users\Selur\Desktop\test.vpy e:\Test.raw

Output 80 frames in 0.29 seconds (272.80 fps)

I:\Hybrid\64bit\Vapoursynth>VSPipe.exe  c:\Users\Selur\Desktop\test.vpy e:\Test.raw


I:\Hybrid\64bit\Vapoursynth>
it randomly crashes,... every few times,.. -> I'll so some more testing and if I can't identify the culprit I'll try to contact the Vapoursynth authors over at doom9s.

Cu Selur
----
Dev versions are in the 'experimental'-folder of my GoogleDrive, which is linked on the download page.
Reply
#37
Okay, this is not a Hybrid bug, but a bug in one of the filters or Vapoursynth itself.
when I use:
# Imports
import vapoursynth as vs
core = vs.get_core()
# Loading Plugins
core.std.LoadPlugin(path="I:/Hybrid/64bit/vsfilters/Support/fmtconv.dll")
core.std.LoadPlugin(path="I:/Hybrid/64bit/vsfilters/SourceFilter/LSmashSource/vslsmashsource.dll")
# source: 'F:\TestClips&Co\files\YUV\yuv422_16bitBitEndianStereo.mov'
# current color space: YUV422P8, bit depth: 0, resolution: 848x352, fps: 23.976, color matrix: 709, yuv luminance scale: limited, scanorder: progressive
# Loading F:\TestClips&Co\files\YUV\yuv422_16bitBitEndianStereo.mov using LWLibavSource
clip = core.lsmas.LWLibavSource(source="F:/TestClips&Co/files/YUV/yuv422_16bitBitEndianStereo.mov", format="YUV422P8", cache=0, prefer_hw=0)
# making sure input color matrix is set as 709
clip = core.resize.Point(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)
original = clip
# cropping the video to 842x348
clip = core.std.CropRel(clip=clip, left=0, right=6, top=2, bottom=2)
# cropping the video to 842x348
original = core.std.CropRel(clip=original, left=0, right=6, top=2, bottom=2)
clip = core.fmtc.resample(clip=clip, kernel="spline16", w=1280, h=530, interlaced=False, interlacedd=False)
original = core.fmtc.resample(clip=original, kernel="spline16", w=1280, h=530, interlaced=False, interlacedd=False)
# adjusting output color from: YUV422P16 to YUV420P8 for x264Model (i420@8-bit)
clip = core.resize.Bicubic(clip=clip, format=vs.YUV420P8, range_s="limited")
# adjusting for FilterView
if original.format.id != clip.format.id:
if (original.format.color_family == vs.RGB and clip.format.color_family != vs.RGB):
   original = core.resize.Bicubic(original, format=clip.format.id, matrix_s="470bg", range_s="limited")
elif (original.format.color_family == clip.format.color_family):
   original = core.resize.Bicubic(original, format=clip.format.id, range_s="limited")
else:
   original = core.resize.Bicubic(original, format=clip.format.id, matrix_in_s="470bg", range_s="limited")
stacked = core.std.StackHorizontal([original,clip])
# set output frame rate to 23.976fps
stacked = core.std.AssumeFPS(clip=stacked, fpsnum=24000, fpsden=1001)
# Output
stacked.set_output()
and
I:\Hybrid\64bit\Vapoursynth>VSPipe.exe  c:\Users\Selur\Desktop\test.vpy e:\Test.avi


I:\Hybrid\64bit\Vapoursynth>VSPipe.exe  c:\Users\Selur\Desktop\test.vpy e:\Test.raw


I:\Hybrid\64bit\Vapoursynth>VSPipe.exe  c:\Users\Selur\Desktop\test.vpy e:\Test.raw

Output 80 frames in 0.29 seconds (274.31 fps)

I:\Hybrid\64bit\Vapoursynth>VSPipe.exe  c:\Users\Selur\Desktop\test.vpy e:\Test.raw

Output 80 frames in 0.29 seconds (272.45 fps)

I:\Hybrid\64bit\Vapoursynth>VSPipe.exe  c:\Users\Selur\Desktop\test.vpy e:\Test.raw


I:\Hybrid\64bit\Vapoursynth>VSPipe.exe  c:\Users\Selur\Desktop\test.vpy e:\Test.raw

Output 80 frames in 0.29 seconds (272.80 fps)

I:\Hybrid\64bit\Vapoursynth>VSPipe.exe  c:\Users\Selur\Desktop\test.vpy e:\Test.raw


I:\Hybrid\64bit\Vapoursynth>
it randomly crashes,... every few times,.. -> I'll so some more testing and if I can't identify the culprit I'll try to contact the Vapoursynth authors over at doom9s.

Okay, it's definitly the resizing, without:
clip = core.fmtc.resample(clip=clip, kernel="spline16", w=1280, h=530, interlaced=False, interlacedd=False)
original = core.fmtc.resample(clip=original, kernel="spline16", w=1280, h=530, interlaced=False, interlacedd=False)
the script works fine.
-> I'll try to contact the fmtc author. (https://forum.doom9.org/showthread.php?p=1927388)

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)