When using the following code in PotPlayer from Jagabo:
I get an error when playing a video with the resolutions of Width:708 x Height: 480.Code:src = potplayer_source() Crop(src, 8,0,-8,-0) # assuming ITU cap Overlay(Spline36Resize(width/16*2,height/16*2).Blur(1.4).Blur(1.4).Blur(1.4).Spline36Resize(src.width,src.height).ColorYUV(gain_y=-50), Spline36Resize(width*3/4,height), x=(src.width-(width*3/4))/2, y=0) float(src.width)/float(src.height) < 1.77 ? last : src
Stating: Resize: Planar destination height must be a multiple of 2. (potplayer_avisynth_script, line 4)
How can i fix this?![]()
+ Reply to Thread
Results 121 to 134 of 134
-
-
On the third line change Spline36Resize(width*3/4,height) to Spline36Resize(width*3/8*2,height).
-
Thanks so much jagabo!
I would like to use this code:
Code:src = potplayer_source() Crop(src, 8,0,-8,-0) # assuming ITU cap Overlay(Spline36Resize(width/16*2,height/16*2).Blur(1.4).Blur(1.4).Blur(1.4).Spline36Resize(src.width,src.height).ColorYUV(gain_y=-50), Spline36Resize(width*3/8*2,height), x=(src.width-(width*3/4))/2, y=0) float(src.width)/float(src.height) < 1.77 ? last : src
from this:
Code:uncropped = potplayer_source() src = uncropped.Crop(8,0,-8,-0) ZOOM = 1.167 Spline36Resize(src, int(uncropped.width*ZOOM)/2*2, int(uncropped.height*ZOOM)/2*2) Crop(0, (height-src.height)/4*2, -0, src.height) alpha = Overlay(BlankClip(last, color=$000000), BlankClip(last, color=$ffffff).Crop(16,0,-16,-0), x=16, y=0).ColorYUV(cont_y=50).PointResize(width/16*2, width).BilinearResize(width,height) bg = Spline36Resize(width/16*2,height/16*2).Blur(1.4).Blur(1.4).Blur(1.4).Spline36Resize(uncropped.height*16/18*2,uncropped.height).ColorYUV(gain_y=-50) Overlay(bg, last, x=(bg.width-width)/4*2, y=0, mask=alpha) Spline36Resize(uncropped.width, uncropped.height) float(uncropped.width)/float(uncropped.height) < 1.77 ? last : uncropped
but a bit wider.
Thanks!Last edited by Desz5; 1st Feb 2025 at 14:57.
-
Been trying but i only get the desired effect on the left side with this code:
Code:src = potplayer_source() Crop(src, 8,0,-8,-0) # assuming ITU cap alpha = Overlay(BlankClip(last, color=$000000), BlankClip(last, color=$ffffff).Crop(16,0,-16,-0), x=16, y=0).ColorYUV(cont_y=50).BilinearResize(width/16*2, width).BilinearResize(width,height) bg = FastBlur(8, iterations=3, dither=yes).Spline36Resize(src.width,src.height).ColorYUV(gain_y=-50).Spline36Resize(src.height*16/18*2,src.height) Overlay(bg, last, x=(bg.width-width)/4*2, y=0, mask=alpha) float(src.width)/float(src.height) < 1.77 ? last : src
-
I did a quick test of that script in AviSynth with a 640x480 video. The script works but it enlarges the frame to 852x480:
[Attachment 85252 - Click to enlarge]
You can't enlarge the frame like that in PotPlayer -- it will crop the video back to the original frame size. -
What are the properties of your source file? Frame dimensions, display aspect ratio, sampling aspect ratio?
-
So you want a 4:3 source to display as 4:3 in a 16:9 frame (fill a 16:9 monitor)? That can't be done by AviSynth as PotPlayer will not allow the script to change the frame size or DAR. You can force PotPlayer to display all videos as 16:9 DAR but then some will display incorrectly.
-
With this code i get the following results which is great:
Code:src = potplayer_source() Crop(src, 8,0,-8,-0) # assuming ITU cap Overlay(FastBlur(14, iterations=3, dither=yes).Spline36Resize(src.width,src.height).ColorYUV(gain_y=0), Spline36Resize(width*3/8*2,height), x=(width-(width*3/4))/2, y=0) float(src.width)/float(src.height) < 1.77 ? last : src
With this code i get the following results which is good but i would like it to be like the sample above with de sides more wider making it a 4:3 image like the original picture.
I've set the ZOOM to 1 but i was looking for a way to cut out the ZOOM function because i wouldn't use it.
Making the code longer and more demanding.
Code:uncropped = potplayer_source() src = uncropped.Crop(8,0,-8,-0) ZOOM = 1 Spline36Resize(src, int(uncropped.width*ZOOM)/2*2, int(uncropped.height*ZOOM)/2*2) Crop(0, (height-src.height)/4*2, -0, src.height) alpha = Overlay(BlankClip(last, color=$000000), BlankClip(last, color=$ffffff).Crop(16,0,-16,-0), x=16, y=0).ColorYUV(cont_y=50).PointResize(width/16*2, width).BilinearResize(width,height) bg = Spline36Resize(width/16*2,height/16*2).Blur(1.4).Blur(1.4).Blur(1.4).Spline36Resize(uncropped.height*16/18*2,uncropped.height).ColorYUV(gain_y=-50) Overlay(bg, last, x=(bg.width-width)/4*2, y=0, mask=alpha) Spline36Resize(uncropped.width, uncropped.height) float(uncropped.width)/float(uncropped.height) < 1.77 ? last : uncropped
With this code i get the following result:
Only showing the left side and the picture doesn't stay the same as before.
Code:src = potplayer_source() Crop(src, 8,0,-8,-0) # assuming ITU cap alpha = Overlay(BlankClip(last, color=$000000), BlankClip(last, color=$ffffff).Crop(16,0,-16,-0), x=16, y=0).ColorYUV(cont_y=50).BilinearResize(width/16*2, width).BilinearResize(width,height) bg = FastBlur(8, iterations=3, dither=yes).Spline36Resize(src.width,src.height).ColorYUV(gain_y=-50).Spline36Resize(src.height*16/18*2,src.height) Overlay(bg, last, x=(bg.width-width)/4*2, y=0, mask=alpha) float(src.width)/float(src.height) < 1.77 ? last : src
-
I'm not at home with my computer. I won't have time to look into this until tomorrow or the next day.
-
Had a chance today...
Code:uncropped = potplayer_source() cropped = uncropped.Crop(8,0,-8,-0) cropped = cropped.Spline36Resize(cropped.width*3/8*2, cropped.height) alpha = cropped.BlankClip(color=$00ffffff).Crop(16,0,-16,0).AddBorders(16,0,16,0).BilinearResize(cropped.width/16*2, cropped.height).Blur(1.5).BilinearResize(cropped.width, cropped.height).ColorYUV(cont_y=60) bg = cropped.Spline36Resize(uncropped.width/16*2, uncropped.height/16*2).Blur(1.0).Spline36Resize(uncropped.width, uncropped.height).ColorYUV(gain_y=-50) Overlay(bg, cropped, x=(bg.width-cropped.width)/4*2, y=0, mask=alpha) float(uncropped.width)/float(uncropped.height) < 1.77 ? last : uncropped
Last edited by jagabo; 4th Feb 2025 at 23:39.
Similar Threads
-
Auto Crop Black Borders
By m00511 in forum Video ConversionReplies: 17Last Post: 4th Apr 2022, 23:03 -
FFMPEG - Black Borders - [Please help]
By 21dresden21 in forum Video Streaming DownloadingReplies: 2Last Post: 12th Feb 2019, 08:51 -
Fullscreen mode - Store settings per display?
By GD314 in forum Software PlayingReplies: 2Last Post: 6th Apr 2018, 17:55 -
Potplayer fullscreen mode without resizing or scaling
By gregory003 in forum Software PlayingReplies: 2Last Post: 18th Mar 2018, 01:05 -
How to remove open playlist bar in fullscreen mode?
By mikica90 in forum Software PlayingReplies: 4Last Post: 9th Apr 2016, 10:17