I have a 720 x 576 video. It's a 4:3 video with side borders encoded to a 16:9 aspect ratio. I need to crop borders
I'm not sure if the original dimensions without the borders were 544 x 576 or 540 x 576. How can I find out? I need to know because I'm cropping 8 pixels of junk off the top and bottom so how do I know the correct width to crop to maintain the correct proportions. At the end I'm resizing to 720 x 576. This is my script. I'm cropping all the side borders and junk pixels in the width.
+ Reply to Thread
Results 1 to 15 of 15
There are several solutions to this, but as a start, using the following equation will never fail you or distort your video:
Width/Height = DAR/PAR
DAR = Display Aspect Ratio
PAR = Pixel Aspect Ratio
Let us know if you're still stuck.I hate VHS. I always did.
Sample is in my 1st post. DAR is 720 x 576. What is the PAR?
Edited my post as I see Skiller pretty much covered it.
But to answer your earlier question:
Width = 720
Height = 576
DAR = 16/9 (for 16:9)
PAR = currently unknown
Plugging in the values to the mentioned equation:
720/576 = (16/9)/PAR
And doing some algebra:
PAR=1.4222222... (the 2s are recurring). This just so happens to be 64/45, which is PAL's widescreen DAR=64:45.
Last edited by PuzZLeR; 4th Nov 2015 at 10:09.I hate VHS. I always did.
I hate VHS. I always did.
544 is a broadcast resolution (544x576) and it is always padded from 540 (so it's mod16 for MPEG2 encoding), but this is not related to pillarboxing (4:3 in 16:9 frame), albeit it results in exactly the same loss of horizontal resolution (25% of horizontal resolution are lost due to the pillarboxing).
Personally I wouldn't bother cropping those 8 lines and resize back to 576 but if you want to crop 4 lines at the top and bottom (8 in total) this would be the math:
(576 - 8) * (540/576) = 532.5
Crop to 532.5 x 568 and resize to 720x576
Here's another approach, it's actually the same thing.
(576 - 8) * (528/576) = 520.7
Crop to 520.7 x 568 and resize to 704x576, and optionally padd to 720.
Last edited by Skiller; 4th Nov 2015 at 12:20.
Cool. But the image in that video should play at 4:3. it's not a 16:9 image. It's from a 16:9 PVR capture from a telecined cable broadcast, field blended and resized. Deinterlace or Bob that clip and you'll see it's field-blend progressive video encoded as interlaced.
The creativity never ends, does it?
Last edited by LMotlow; 4th Nov 2015 at 17:31.- My sister Ann's brother
It's field-blended progressive. Bob the video and check the hand motions frame by frame. Most experienced members here do that sort of thing routinely.
Last edited by LMotlow; 4th Nov 2015 at 19:42.- My sister Ann's brother
It is what Vegas Pro (my NLE) reports. I copy/pasted into my post. However, various people have taken issue with how Vegas calculates PAR. For instance, it shows a PAR for NTSC 4:3 DV video of 0.9091.
I've never gotten too hung up on this. As long as I end up with no borders, I figure I've done the math correctly. FWIW, this Wikipedia entry shows the PAL 4:3 PAR as 1.456790123:
Pixel aspect ratios of common video formats
The video sample is indeed PAR=64:45=1.42 (2 bar). And at 720x480 16:9 PAL it would need this value to avoid distortion. The value Vegas reports would be more accurate for the cropped version of PAL at 704x576 16:9, be it PAR=16:11=1.45 (45 bar) (or rounding value of 1.456790123 for Rec.601).
As per the value of PAR=0.9091, this should be for NTSC video that is cropped at 704x480 4:3 (which is actually 10:11=0.90 (90 bar), close enough). Vegas is wrong (again) if it reports this PAR value for 720x480 4:3, which should be truly 8:9=0.88 (8 bar).
All this is assuming no distortion, of course, with the source.
Again, small differences, and wouldn't distort the image noticeably. I'd only be concerned if such differences weren't compatible with a picky spec, like DvD, or blu-ray, video can be. Then again, blu-ray has the PAR messed up with SD video too.I hate VHS. I always did.
Vegas (and I) believe in the ITU Rec.601 spec, whereas you seem to believe in the MPEG spec. That's the difference.
I would scale 4:3 NTSC with a PAR of 10/11, regardless of whether the frame is 720 or 704 pixels wide.
That means a frame of 720 pixels in width is always wider than 4:3 or anamorphic 16:9, because the inner 704 pixels would be exactly that (704 is cropped from 720, not resized). Yes, the MPEG spec says otherwise but tell that to any DAC or ADC.
Anyways, this has been discussed to death over the last 15 years or so and some people stick to one and some to the other and most probably don't know or care about the 2.5% difference.
Any difference between PAR 8:9 or PAR 10:11 is indeed minor, and the distortion is not very noticeable.
But not to churn a debate or flamewar, the distortion is still there for the picky. But most of all, if encoding for a particular spec, the difference is even more important.
For example, blur-ray SD H.264 only accepts PAR=10:11 for 720x480 4:3. If the source you wish to encode is MPEG video, 720x480 4:3, with PAR=8:9, to comply with SD blu-ray H.264 you have to encode with PAR=10:11, and deal with the distortion. If you ignore this tiny detail in PAR it will not be blu-ray compliant. (It may still play, however, it will not have any guarantee.)
And to deal with the distortion, from MPEG 8:9 to 10:11, I just prefer to pad 8 pixels each side instead of stretch it. But that's me.
My point is that, when dealing with MPEG, as was this sample here, I still find it important to notice.
Last edited by PuzZLeR; 7th Nov 2015 at 11:36.I hate VHS. I always did.