one thing my windows GUI needs is resolution calculation which takes into account cropping etc. (Incorporating it into v2)
Source 720x572 DVD which is aspect 1.33 i believe
Can someone show me that maths to work out the height based on whats entered for the width.
I just want to make sure i have this totally clear in my head b4 i get it totally wrong.
Resolution Calculation
Forum rules
*******************************
Please be aware we are now using GitHub for issue tracking and feature requests.
- This section of the forum is now closed to new topics.
*******************************
*******************************
Please be aware we are now using GitHub for issue tracking and feature requests.
- This section of the forum is now closed to new topics.
*******************************
Re: Resolution Calculation
I'm guessing you're looking for more than just:sr55 wrote:one thing my windows GUI needs is resolution calculation which takes into account cropping etc. (Incorporating it into v2)
Source 720x572 DVD which is aspect 1.33 i believe
Can someone show me that maths to work out the height based on whats entered for the width.
Height = Width after cropping / Aspect Ratio
?
Lots of related stuff in hb_set_size() in hb.c...
Remember: just because the image is stored on the DVD in a 720*576 frame doesn't mean its native aspect ratio is 720/576...all PAL DVD frames are 720*576 no matter if the content is 4:3 or 16:9. If it's 16:9, it keeps the vertical resolution and is squished horizontally. If it's 4:3, it keeps the horizontal resolution and is stretched vertically. So you want to reduce the height from 576 to 544 to get rid of that vertical stretching and recreate the actual 4:3 display ratio.sr55 wrote:Right, take 720x576 for example
720/1.33 = 541.3
720/1.25 = 576
I think you see why i'm a little confused.
Thats quite a drop...
sr55,
libhb can actually do some of the auto matic cropping and calculations for you. The method of interest is hb_set_size.
Take a look at IHB in the ExpressController.mm file. Look for the method called convertGo. I use hb_set_size to crop the output based on the max picture width and the aspect the user has choosen. You might be able to make use of this as well.
libhb can actually do some of the auto matic cropping and calculations for you. The method of interest is hb_set_size.
Take a look at IHB in the ExpressController.mm file. Look for the method called convertGo. I use hb_set_size to crop the output based on the max picture width and the aspect the user has choosen. You might be able to make use of this as well.
sr55,
Since your GUI is using HBTest.exe and you're not directly using libhb, why are you trying to size calculations in your GUI?
HBTest.exe (libhb) is capable of figuring out the needed cropping and resizing, and generally it works well. If you want to rip the movie to full size, then don't specify any -w or -l options to HBTest.exe, and the resizing and cropping be automatically figured out. Sometimes this results in the movie actually being horizontally smaller than the source though, even if there aren't any black bars to crop off on the left or right side of the frame. But generally it's not a big loss.
Since your GUI is using HBTest.exe and you're not directly using libhb, why are you trying to size calculations in your GUI?
HBTest.exe (libhb) is capable of figuring out the needed cropping and resizing, and generally it works well. If you want to rip the movie to full size, then don't specify any -w or -l options to HBTest.exe, and the resizing and cropping be automatically figured out. Sometimes this results in the movie actually being horizontally smaller than the source though, even if there aren't any black bars to crop off on the left or right side of the frame. But generally it's not a big loss.