View Full Version : wrong AR after video resize
buddha9
22nd December 2024, 10:25
path1="...\"
filename1="....mp4"
clipv1 = FFmpegSource2(path1+filename1)
src1w=Width(clipv1)
src1h=Height(clipv1)
wid1=(src1w/src1h)*256
wid1=Round(wid1/2)*2
clipv1r=clipv1.BilinearResize(wid1,256)
clipv1r
Why preview has a wrong AR ?
Thanks!
Selur
22nd December 2024, 11:35
2000x516 assuming it's square pixels has a storage aspect ratio of 3.875968992248062
wid1=2000/516*256=992.248062015503876
wid1=Round(992.248062015503876/2)*2=Round(496)*2 = 496*2 = 992
so you are resizing to 994x256 which has a storage aspect ratio of 3.875
=> rounding
buddha9
22nd December 2024, 12:10
2000x516 assuming it's square pixels has a storage aspect ratio of 3.875968992248062
wid1=2000/516*256=992.248062015503876
wid1=Round(992.248062015503876/2)*2=Round(496)*2 = 496*2 = 992
so you are resizing to 994x256 which has a storage aspect ratio of 3.875
=> rounding
Thanks for quick feedback.
Try with a 1920x1080p video
Try a preview. I'll see a "square" preview on AVSPmod.
Selur
22nd December 2024, 15:05
Try with a 1920x1080p video
1920x1080 (=> 1,777777777777778)
wid1=1920/1080*256=455.111111111111111
wid1=Round(455.111111111111111/2)*2=Round(227.555555555555556)*2 = 228*2 = 456
so you are resizing to 456x256 which has a storage aspect ratio of 1.78125
Try a preview. I'll see a "square" preview on AVSPmod.
No clue what you want to say with that. :)
vBulletin® v3.8.11, Copyright ©2000-2026, vBulletin Solutions Inc.