Jump to content
WnSoft Forums

Calculation of an Area's size


Xenofex2

Recommended Posts

Whilst I have a workable ‘trial and error’ solution, I am rather curious as to try and find a more definitive solution so that I can continue to use the concept in future projects.

I am working on a 16:9 project and have imported TWO portrait style videos onto the same slide. I have placed them at either end, meaning that the only black border initially visible will be in the middle. My intention is to then put together a montage created in my Photo Editing program, and place it on a top layer covering that ‘black PTE middle’ so there will be no final viewable black area. But am stumped as being able to get an accurate calculation of the size area I need to cover.

Although these two video clips are portrait, according to their ‘Properties’ they show the width as 848 and height as 480. Assuming that is just an anomaly of the mobile phone, their combined width should in fact, taking the previous sizing to be correct but the wrong way round, be 960px (480 x 2). Perhaps where I may be going wrong is to take the size of the PTE 16:9 slide as 1920 x 1080 which gives me the size of the width of the black area I need to cover in the middle as, 1920-480-480=960. Half?

It is clearly wrong, as can be seen from the screenshot. I can keep testing with background images until I come up with the correct size before putting together my montage, but surely there is a more exact science to be able to work out the size?

George

 

PTE 0402.jpg

Link to comment
Share on other sites

Hi Xenofex2
Your mobile phone videos have an aspect ratio of 848 / 480 = 1.76667 = 15.90 / 9, i.e. not quite 16/9.  Hence your computational problem.
For your project with the 16/9 aspect ratio, the number of pixels does not really matter for the geometrical construction, only the proportions do.
So just decide that your screen has an effective pixel size of 848 vertical. Therefore the screen width with the 16/9 aspect ratio has a dimension of 848 *16/9 = 1507 pixels (rounded values).
The two videos have each a width of 480 pixels, hence the middle gap has a width of 1507 - (2 * 480) = 547 pixels.
So that the central gap is 848 tall by 547 wide (rounded value to the nearest integer).
Let  me know if that works for you...

Link to comment
Share on other sites

My computed gap dimensions yield an aspect ratio of 848/547 = 1.550.  Your trial-and-error geometry comes to a ratio 1080/680 = 1.588.  Not too far.

Do not forget that your two clips are not 1080 tall, but only 848 and that they are kind of "stretched" to fill the total height of the view.

And the gap you found to be 680 x 1080 is in fact fitting the total available height of 848 (your video clip), hence a reduced width of 680x 848/1080= 533.9 (close to my figure of 547).

Link to comment
Share on other sites

Thanks for your comments although must admit I will have to keep reading them until the penny drops. At least it seems that there is not an easy solution that I have missed.

Curious as to your comment though about a 'Stretched Video?' I haven't stretched the video in PTE, and just used the pan tool to move them into position. 

George

Link to comment
Share on other sites

I meant to say that the video has been sized automatically by PTE so as to fit the total height of the view, which you will want to be 1080 pixels as a standard Full-HD screen when you "publish" the video at the end of the process.

What I did was to draw a 16/9 rectangle (for the total view) and put the vertical dimension as being the "true pixels" of 848.  Then I could easily compute the corresponding width for the overall rectangle, etc.

Link to comment
Share on other sites

3 hours ago, Xenofex2 said:

I am working on a 16:9 project and have imported TWO portrait style videos

 

3 hours ago, Xenofex2 said:

Although these two video clips are portrait, according to their ‘Properties’ they show the width as 848 and height as 480.

If this is a portrait video, then, apparently, it should be 480 wide, and 848 high. In terms of a 16:9 screen, when it is fully filled in height (1080), the width of each video will be 611.28 px, and the gap in the middle will be 697.44 ( 1920 - 611.28 - 611.28 = 697.44).

See picture -> Pan X of layer 2 = 1920 - 611.28 = 1308.72

2021-02-04_234352.jpg

Link to comment
Share on other sites

I keep looking at that screenshot and was expecting to see similar figures in my own project, but they are not. Both my Videos are showing 100% Zoom and the Pan setting for each is either plus or minus 68.

However, then I noticed ‘Stranger2156’ corner handles in the screenshot were immediately around Image 2. In my screenshot below, you can see the corner handles are not. (Then I realised, the difference between a jpeg and my mp4.)

Whilst I have described my videos as ‘portrait’, because that is the area that the viewer sees, I guess they are technically landscape with the viewing image in the middle section only and those black borders either side, which I am trying to loose in the PTE project, either side.  

George

 

 

PTE 03.jpg

Link to comment
Share on other sites

Thought it may be of interest to update this posting.

I have actually just finished my current project and as a result of googling, I may just have found an alternative solution in removing the black borders from mobile phone portrait videos when adding to a 16 x 9 project.

Co-incidentally, for me, it is with a program I already had installed. Movavi Video Converter. Admittedly I have so far only tested it out on a half dozen mobile phone portrait videos that originally had these black borders either side, but it seems to work, cropping before converting. The video that you then import into PTE, hey presto, jis ust the video area with NO borders.

No doubt there are likely to be other programs available but thought an area worth checking out

George

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...