Is there any formula for calculating custom aspect ratio to eliminate black stripe from video when desktop resolution is not proportional to video resolution?
Example for not having black stripes on top and bottom of a 1280 x 720 video open on a 640 x 480 screen I can use 16:12 aspect ratio but this I did tests manually and wanted to have a formula that could apply to videos of different resolutions with Same desktop resolution, can anyone give a hint?
+ Reply to Thread
Results 1 to 7 of 7
-
Last edited by Belini; 4th Dec 2019 at 08:17.
-
Are you looking to squeeze (distort) the picture to fit the screen or crop the picture to fit the screen?
-
Both cases may happen because the screen resolution will always be the same but the video resolution may be higher or lower then I need to create a formula to calculate the correct aspect ratio to fill the screen.
Example if screen is 1280 x 720 and video is also 1280 x 720 aspect ratio 16:9 fills the entire screen
If the screen is 640x480 and the video is 1280x720 the aspect ratio to fill the entire screen will have to be 16:12
https://youtu.be/KVDRVo6E2Oc
In the example on youtube I opened a 1270 x 720 video on a 640 x 480 screen then applied 16:12 custom aspect ratio to fill the whole screen, apply custom aspect ratio I can but I don't know how to calculate the correct aspect ratio for every situation.Last edited by Belini; 4th Dec 2019 at 08:58.
-
Try this old small standalone program.Works perfectly.
https://www.videohelp.com/software/Aspect-2 -
Code:
DAR = FAR * SAR DAR = Display Aspect Ratio, the final shape of the picture FAR = Frame Aspect Ratio, the width:height of the video SAR = Sample Aspect Ratio, the width:height of each pixel (really the spacing between them)
-
I ended up making a list of known resolutions and comparing with Desktop to apply the right aspect ratio, but I will test these tips too, thanks everyone.
Code:$aspect = @DesktopWidth & "x" & @DesktopHeight Switch $aspect Case "640x480", "800x600", "960x720", "1024x768", "1280x960", "1400x1050", "1440x1080", "1600x1200", "1856x1392", "1920x1440", "2048x1536", "2800x2100", "3200x2400" $aspect = "4:3" Case "1125x900", "1280x1024", "2560x2048" $aspect = "5:4" Case "1280x800", "1440x900", "1680x1050", "1920x1200", "2560x1600" $aspect = "16:10" Case "640x360", "1024x576", "1152x648", "1280x720", "1360x768", "1366x768", "1536x864", "1600x900", "1920x1080", "2048x1152", "2560x1440", "3840x2160", "7680x4320" $aspect = "16:9" Case "1920x810", "2560x1080", "3440x1440" $aspect = "21:9" EndSwitch
-
For square pixel displays you can just use the monitor resolution as the aspect ratio. For example 1920/1080 = 16/9 = 1.7777...
Similar Threads
-
Adding black bars to get 16x9 aspect ratio
By etheon84 in forum Video ConversionReplies: 40Last Post: 31st Dec 2020, 17:10 -
How can I remove custom thumbnail from mkv files?
By Gerff in forum Newbie / General discussionsReplies: 5Last Post: 11th Jun 2017, 10:12 -
Converting 1:85 aspect ratio to 2:39 aspect ratio using Virtual Dub
By maxgremlin in forum EditingReplies: 1Last Post: 8th Jun 2017, 22:06 -
Why NTSC DVDs shows black horizontal stripes?
By arpcpro in forum DVD & Blu-ray PlayersReplies: 8Last Post: 30th Apr 2017, 16:31 -
Custom Aspect Ration in Adobe Premiere
By N3SH0m in forum EditingReplies: 11Last Post: 4th Jan 2015, 13:02