View Full Version : Cropping 4:3to16:9 "please explain" is this script correct?
Deckerr
2nd January 2006, 08:19
Yes I have another 4:3 to 16:9 issue can anyone explain what I have done here?
The first script removes all the borders and adds the needed borders to the top and bottom.
The second script removes only what is needed without having to add borders.
Now the way I worked it out is in the second script I should theoretically only have had to crop 58 at the top and bottom (128crop - 70addborders = 58!) but I had to crop 78 to get the correst AR. Both scripts give the correct final output but I am lost at how it works. I would like to understand why if you can help me.
Thanks.
Script 1
LoadPlugin("H:\DGDecode.dll")
MPEG2Source("I:\VTS_01_1.d2v")
Crop(12,128,-8,-128)
BicubicResize(720,436)
AddBorders(0,70,0,70)
Script 2
LoadPlugin("H:\DGDecode.dll")
MPEG2Source("I:\VTS_01_1.d2v")
Crop(12,78,-8,-78)
BicubicResize(720,576)
Inc
2nd January 2006, 09:21
Where do these scripts result from?
Is your source a (squeezed) anamorph 16:9 one or a letterboxed 16:9 to 4:3?
Best would be to provide a snapshot of the VTS orig frame "before" any resizing etc.
Do use www.imageshack.us to host your pic.
Deckerr
2nd January 2006, 09:40
Sorry but I edited the last Paragraph as you posted. Please re-read it in case we have a conflict.
I did the scripts myself the end result is both pictures are the same but I did not have too add borders using the second script.
Please click on the thumbnail below it is the original 4:3 at 720 x 576.
http://img466.imageshack.us/img466/5041/ashitled0kk.th.jpg (http://img466.imageshack.us/my.php?image=ashitled0kk.jpg)
Inc
2nd January 2006, 10:31
Ok, a 16:9 Movie letterboxed to 4:3.
My eyes do show me an active image area of.
Crop(14,128,-10,-128) or Crop(14,128,696,320)
So you end up in an area of 696x320.
320 is MOD16 but 696 isnt.
So we do Crop(16,128,-16,-128) which does result in 688x320 both values are now at MOD16 and till now no interpolation has been done.
Now you want to make that image "anamorph", means applying a 16:9 AR which will be done via a stretching of the heigth by 1.333
320*1.333 = 426,67
So you would end up in 688x427 pixels resizing where at least only the vertical pixels will be interpolated. (we try to avoid interpolatings where we can).
But ... 427 isn't MOD16 anymore, the nearest would be 416 or 432.
Now we would have to compensate that height-scaling by pre-cropping or pre-padding of the width to keep the AR at a correct state when resizing finally.
But as today for DVD purposes Media Space isnt that expensive anymore, I would stay at
Crop(16, 128, -16, -128)
xxxResize(688, 427)
EnhancingFilters(here)
AddBorders(8,74,8,75)
which results in 704x576 anamorphic 16:9 finally:
http://img466.imageshack.us/img466/3160/anamorph0en.jpg
And finally shown on a 16:9 TV set like this:
http://img492.imageshack.us/img492/7646/par17oo.jpg
(grey borders do show the approx 5% TV Overscan on newer TV sets)
But as you see your original source is already in a very less detailed state, (just do imagine this image scaled to 32" ! ;) ) so imho its not a good choice to apply an anamorph state to that source.
Keep it at non anamorph and apply some enhancements via avs-filtering.
(all calcs are just out of my head and applied to the image via Photoshop here at my office on a MAC!
So do let PARanoia find the orig's borders and let it calc the right params for an outputted avs script to your needs - non-anamorphic to anamorphic conversations are also possible. )
http://home.arcor.de/packshot/PARanoia_0.31b.exe
vBulletin® v3.8.11, Copyright ©2000-2026, vBulletin Solutions Inc.