View Full Version : DVD 2.35:1 to NTSC Anamorphic 1.85:1?
TECK
22nd April 2005, 07:50
Hi all,
This is my first post at doom9 and I hope you don't mind if I start with some doomie questions about authoring... :)
After reading for few days onto the forums and searching, I dare to ask this relatively complex question (at least for my encoding knowledge):
How do I transform a 2.35:1 sized DVD to 1.85:1 one?
Let's see what I have as tools installed in my PC:
1. AviSynth 2.5.5
2. DGMPGDec 1.3.0 b5
3. CCE SP 2.50
4. DoPulldown 1.0.0.0
5. DVD Decrypter 3.5.4.0
Now, do you recommend any other tools to be installed, beside what I have so far? Probably a calculator that will do the bitrate... Let me know please.
Also, if you know a good tutorial that will help me understand better the 2.35:1 to 1.85:1 conversion, I will apreciate it if you post the link(s). Unless you want to take your time and post a tutorial that will help many of newcommers like myself. :)
So far, there are 2 types of DVD's I will work with: at 23.97 and 29.97 fps. Your guidance is much apreciated.
Thank you for your help.
TECK
22nd April 2005, 23:25
Ok, here it is what I did so far:
1. Movie ripped with DVD Decrypter.
2. DgIndex'ed with Forced Movie 23.796 fps and saved project/demuxed video.
3. Opened GKnot and in Resolution tab, entered the values:
- Input Resolution: 848x480
- Input Pixel Aspect Ratio: 1:1
- Crop (before resize): Pixel
- W-Modul and H-Modul: 4
- Width and Height: 660 x 356
Those settings will give me:
Aspect Ratio: 1.854
Aspect Error: 0.0%
W-Zoom and H-Zoom: 100%
I do all this because I want to calculate the correct Lanczos4Resize() values in the AviSynth script. There is a simple procedure to mix them with the Crop() ones... let me know please how I should hold the calculator in my hands. :)
Looking at the .avs file, I get:
# CROPPING
crop(94,60,532,356)
# RESIZING
Lanczos4Resize(660,356)
What's the next step I need to perform to mix those values into one?
Should be:
Lanczos4Resize(94,60,660,356)
??? Thanks guys.
TECK
22nd April 2005, 23:55
GKnot settings...
(I don't see the attachment???)
mpucoder
23rd April 2005, 01:26
You're probably not getting any answers 'cause no one can figure out what you are trying to do. If a 2.35:1 movie is on a DVD it is already anamorphic, but as 16:9 with matting. There are only two aspect ratios for DVD, 4:3 (1.33:1) or 16:9 (1.77:1). While 1.85:1 is a common film AR, it does not exist in DVD or MPEG-2.
TECK
23rd April 2005, 03:39
mpucoder, thanks for the reply.
Basically, this is what I want to do:
Crop a 2:35 movie aspect, in order to make disapear the black lines:
http://xs26.xs.to/pics/05171/235.gif
(movie marked on the DVD cover as 2.35:1)
And make it look like this:
http://xs404.xs.to/pics/05171/185.gif
(movie marked on the DVD cover as 1.85:1)
I don't know what's the best technique to make an .avs file like that.
Thanks for your suggestions, guys.
TECK
25th April 2005, 05:39
Pictures corrected, mpucoder thanks for the guidelines...
I apologize, I'm new and want to make sure I follow the forum rules.
violao
25th April 2005, 09:19
Teck, if you crop black bars from 1:2.35 movie, resize it to 16:9 (or 1:1.85 as you say) and encode it as 16:9 anamorphic, you will get wrong aspect ratio. The picture will be squeezed horizontally, that is if you plan to make a DVD from it. If you're making divx, or other non-dvd video then you simply resize cropped video to 1:2.35 and encode.
As for .avs question, I believe it's:
Lanczos4Resize(660,356,94,60,532,356)
although I dont'get this cropping. This:
crop(94,60,532,356)
will crop not only horizontal black bars (top 60, bottom 64) from your 848x480 source image, but also left (94 pixels) and right (222 pixels).
TECK
25th April 2005, 23:36
Originally posted by violao
Teck, if you crop black bars from 1:2.35 movie, resize it to 16:9 (or 1:1.85 as you say) and encode it as 16:9 anamorphic, you will get wrong aspect ratio. The picture will be squeezed horizontally, that is if you plan to make a DVD from it. If you're making divx, or other non-dvd video then you simply resize cropped video to 1:2.35 and encode.
As for .avs question, I believe it's:
Lanczos4Resize(660,356,94,60,532,356)
although I dont'get this cropping. This:
crop(94,60,532,356)
will crop not only horizontal black bars (top 60, bottom 64) from your 848x480 source image, but also left (94 pixels) and right (222 pixels).
Thanks violao, you are right, I want to make a DVD that will transform the 2.35:1 aspect ratio into a 1.85:1 one, in order to avoid having displayed on my HDTV screen any black bars.
I don't mind loosing any space on the left/right side of the movie, as long it will not display anymore the black bars who can dammage in the long run my screen.
Can you guys point me to a guide that will help me calculate the right dimmensions of the movie? Cropping, etc.
I searched anywhere in the forums, as well Internet, without success.
If you know the right technique, please post it here, it will help me a lot.
Thank you.
violao
28th April 2005, 09:25
Originally posted by TECK
...as long it will not display anymore the black bars who can dammage in the long run my screen.
I don't believe it. Who told you that?
Anyway, if you want to encode just middle 1:1.85 part of the movie try this:
1. starting from 720x480 crop black bars (from your posts I guess that there are 60 and 64 black pixels, or 124 total vertical pixels cut, leaving 356)
2. resize to 480*480*16/9/356 x 480, that is 1150x480 - this is your original aspect ratio
3. crop left and right vertical borders to 854x480 (854 = 480*16/9)
4. resize to 720x480
I'm not 100% sure about the numbers since I've never worked with NTSC, but this is the general procedure I follow when I make PAL dvd from letterboxed divx.
mpucoder
28th April 2005, 12:02
A little OT info - Plasma screens are very susceptible to image "burn in". A friend of mine has one, with the SciFi channel watermark permanently visible in color-reverse on everything.
midnightsun
28th April 2005, 13:16
So you basically want to crop the left and right sides in order to fill the screen and at the same time preserve the picture proportions.
So what you have to do is:
crop the black bars top and bottom and the left and right sides off the original picture so that the active area has a DAR of 1.85:
A) 720x480 ->[crop]-> 556x356 [556=(356*1.85)*(720/(480*(16/9)))]
resize:
B) 556x356 ->[resize]-> 720x460 [460=((480*(16/9))/1.85)]
letterbox:
C) 720x460 ->[addborders]-> 720x480
Now encode to mpeg2, setting DAR=16:9
Now doing this you will get 10pixels of black at the top and 10 at the bottom, because you said you wanted to have 1.85:1 (as has been said, 1.85:1 is not a valid DVD DAR, so in order to display 1.85:1 content you have to have two thin strips of black at the top and bottom).
If you instead want to completely fill the picture, at A) crop to 534x356 and at B) resize to 720x480. [C) is not needed anymore as the 720x480 will now have been filled].
The math should be correct, anyone correct me if I got it wrong
violao
28th April 2005, 15:46
Originally posted by mpucoder
A little OT info - Plasma screens are very susceptible to image "burn in". A friend of mine has one, with the SciFi channel watermark permanently visible in color-reverse on everything.
Have you told your frient to change channels from time to time? :) So are CRTs too. But burning in black bars :confused:
mpucoder
28th April 2005, 16:24
Yes, I did make a remark like "you know there are channels other than SciFi?" But Farscape was coming on, and I don't think he heard a frelling thing I said.
Anyway, yes, CRT's can get burned in images as well, but I've never seen it happen as fast as it did with his Plasma screen. And even black will leave an after-image, as the other pixels get fainter. After seeing that I decided plasma was not ready for me yet, I'll stick to crt and lcd.
violao
28th April 2005, 22:55
Originally posted by mpucoder
And even black will leave an after-image, as the other pixels get fainter...
Perhaps he could replace black with grey bars then ;)
TECK
28th April 2005, 23:21
Thank you guys for your help, I will work with th the examples you gave me.
Do you know if there is any program that will actually calculate the cropping and give me the Lanczos4Resize() values?
As for the "burn ins", here it is a very good guide/site what to do:
http://www.keohi.com/keohihdtv/learnabout/definitions/burnin.html
If you want to make sure your screen will not be burned, after you watch a "black bar" movie, simply view for at least 2 more hours a channel/movie that will wash the black bars. Also, buy the AVIA DVD, it will help you tune very well your plasma/CRT TV.
Here it is a small extra, from the guide:
Keep your contrast low for the first 100 hours, no more than 75% of what your eye tells you your TV can do, and NO EXTENDED-TIME FIXED IMAGES. EVER. No MSNBC, no fixed-image/border video games, no ticker tape reports burning that band into your phosphors. You'll have your hands full, probably, just keeping the black/grey bands from being seen on your screen while bright and white images are there after awhile, due to the mixing of standardized aspect ratios in this crossover era between NTSC and HDTV.
If you absolutely have to have fixed images up there for any length of time, turn your contrast low for the duration, and save the bright images for when you're watching something really spectacular. I even keep my contrast low when I watch Jay Leno's monologue every night, turning it up for the better parts of the program. Brightness is not the bugaboo on burn-in, Contrast is. Brightness, a misnomer, controls the background darks; Contrast controls the foreground bright areas.
TECK
29th April 2005, 01:42
Ok, I ripped a small portion of the movie (1 MB), sound and subtitles included, so you can examine it, if you want:
ZIPed VIDEO_TS 1MB FILE (http://www.thefilebucket.com/userfiles/teck/VIDEO_TS.zip)
Here it is what DGIndex will give me:
http://xs26.xs.to/pics/05175/dgindex.gif
BitRate Viewer will give me:
http://xs26.xs.to/pics/05175/bitrateview.gif
Now, one of my friends told me that by simply playing with GKnot, I will be able to get the right Cropping/Lanczos4Resize values in my .avs file:
http://xs26.xs.to/pics/05175/gknotset.gif
His technique is:
1. Set the right Input Resolution size, usually bigger then the actual movie size, for example 848x480.
2. Manually crop the movie until all black bars are gone and obtain 1:85 aspect ratio.
3. Adjust the output resolution, in order to obtain Aspect Ratio 1:85 (or close to it), Aspect Error 0.0% and W/H-Zoom 100%.
EXAMPLE:
http://xs26.xs.to/pics/05175/gknot.gif
The crop is:
crop(94,60,532,356)
It does look much smaller on the sides then it should normally be, apparently to much...?
http://xs26.xs.to/pics/05175/gknotcrop.gif
The final GKnot .avs code is:
# RESIZING
Lanczos4Resize(660,356,94,60,532,356)
Lanczos4Resize(740,480)
Let me know if is OK so far, in theory, what I posted.
The red marked values, need to be set to 4, 8 or 16?
Do you recommend this method, or simply the calculator method mentioned in your examples above is better?
If possible, I would apreciate an example from the attached VOB files above, if one of the experts can spare the time to analyse it and post exact details of the Crop/Lanczos4Resize calculation.
Thanks for taking the time to read my newbie questions.
midnightsun
29th April 2005, 02:51
Well, gknot basically created the .avs with the same values I suggested 3 posts above ;) [I resized to 534x356 instead of 532x356...shouldn't cause any problem either way]; only thing is that in the first lanczos4resize it crops and resizes proportionally to square pixels, then in the next lanczos4resize it resizes again to dvd-valid resolution. The first resize isn't actually needed and as you will know, the less times you resize the better your picture will look.
golftech
29th April 2005, 04:46
Hi Teck,
Well it looks like your crop job worked but it appears that you chopped all the width from the left side instead of cropping it equally from the center out which I would think would be better considering most of the action is usually centered on the screen. In your case the center(action) will be left of center. Keep working on it though.
I just compared the two shots you posted and in the 2nd shot, you can see more of the roof line of the merc than you can in the 1st shot. How is that possible, isn't the 1st shot the original frame.
violao
29th April 2005, 08:49
Keep your contrast low for the first 100 hours, no more than 75% of what your eye tells you your TV can do, and NO EXTENDED-TIME FIXED IMAGES. EVER. No MSNBC, no fixed-image/border video games, no ticker tape reports burning that band into your phosphors. You'll have your hands full, probably, just keeping the black/grey bands from being seen on your screen while bright and white images are there after awhile, due to the mixing of standardized aspect ratios in this crossover era between NTSC and HDTV.
If you absolutely have to have fixed images up there for any length of time, turn your contrast low for the duration, and save the bright images for when you're watching something really spectacular. I even keep my contrast low when I watch Jay Leno's monologue every night, turning it up for the better parts of the program. Brightness is not the bugaboo on burn-in, Contrast is. Brightness, a misnomer, controls the background darks; Contrast controls the foreground bright areas.
Teck, this text is so full of missguidance and opinions and is so poorly written that I can't trust a word to it's author. For example what's background dark and foreground white? Is all background dark? What's a background? Is there a 3rd dimension somewhere on plasma/CRT screens? There are NO backgrounds and foregrounds on screen, only pixels emitting a light having different intensity. Brightness controls all intensities equally, contrast controls the slope of a curve describing relationship between input and output intensities.
And be careful, you cannot fix burnt-in pixels by "washing" or whatever. Like mpucoder said black bars might actually not get burnt-in, while the middle portion of the screen does, so the only way to equalize between those areas would be to protect the already burnt-in area (middle) for the same amount of time while you are burning the other.
TECK
30th April 2005, 03:38
Thanks violao. :)
As you noticed, I'm simply a newcommer to the HDTV arena, as well to editing scene.
For sure I can learn many things from you guys, so please be patient, if I do make any obvious mistakes.
midnightsun, as well many other people who kindly helped me understand better the resizing process, I want to thank you all for your patience.
Let's recap in a short way, everything.
The easiest way to redimention a 2.35:1 movie is by simply applying the Crop/Lanczos4Resize function with a simple math calculation...
Basically, all I have to do is this (?):
Crop(534,356)
Lanczos4Resize(740,480)
If I understand correctly, the Crop function values posted above will eliminate the black bars, as well a little of the sides.
Then, the Lanczos4Resize function will make it DVD compatible.
I'm definitelly missing something? It looks to easy, to be true...
What about the complex calculation that my friend was telling me?
I totally agree that, the less times you resize a movie, the better your final image will be.
I would apreciate a real script example, just to understand better the technique. For example, the 2 functions (if they are OK):
Crop(534,356)
Lanczos4Resize(740,480)
Or 1 complex function, to obtain the same result in one line:
Lanczos4Resize(740,480, , , , )
What will be the marked crop values in the function listed above, any why?
Thanks a million guys for your patience.
SiXXGuNNZ
30th April 2005, 10:58
http://home.comcast.net/~sixxy04/1-78-1_16-9.VOB
script
LoadPlugin("C:\PROGRA~1\GORDIA~1\DGMPGDec\DGDecode.dll")
LoadPlugin("C:\PROGRA~1\GORDIA~1\AviSynthPlugins\RemoveGrain.dll")
LoadPlugin("C:\PROGRA~1\GORDIA~1\AviSynthPlugins\UnDot.dll")
mpeg2source("D:\DVDRIP\VIDEO_TS\01.d2v",cpu=4,iDCT=2)
Lanczos4Resize(656,356,96,60,528,356)
Lanczos4Resize(720,480,4,0,648,356)
RemoveGrain(mode=2)
Undot()
feel free to remove filters, "removegrain" and "undot", also, feel free to remove the ",cpu=4,iDCT=2" from the mpeg2source line if you dont want to use those
manono
30th April 2005, 14:21
Hi-
I'll be following the ITU resizing standard. It's in the Options Tab of GKnot.
1. You set up for "other 848x480" and 1:1, whereas it should probably be 854x480. 480 x 16/9 = 853.33
2. A 1.85:1 movie encoded as 16:9 has some small amount of black bars above and below. These are hidden by your TV's overscan. If you truly want to do away with all black bars (and lose picture to the overscan in the process), you should probably make it 1.78:1 or thereabouts. 16/9=1.778.
3. You cropped 60 pixels from the top and 64 from the bottom. This makes the original AR about 2.46:1. That's a bit narrower than usual, as most are 2.42 or 43:1. But that's OK. Maybe the DVD is really like that.
4. You did it from the 1:1 perspective, but there's an easier way. Set it up as you would if you were going to encode an AVI. Leave it at 720x480 NTSC on the left, and under Input Pixel Aspect Ratio in the top middle, tick "NTSC anamorphic (16:9)", and resize to 1.78:1, cropping the top and bottom to get rid of the black bars above and below, and cropping from the left and right to achieve roughtly 1.78:1 with low Aspect Error, and resize to 720x480 directly from that. I come up with:
Crop(98,60,522,356)
Lanczos4Resize(720,480)
Then encode for a DAR of 16:9. As you can see from the thread, depending on who you talk to, there are different ways of doing it. Whether or not to resize to the ITU standard all by itself is the cause of countless discussions. But that's my take on it.
The SiXXGuNNZ script just above is nearly identical to mine, except for the fact that he crops and resizes twice, slowing the encoding very slightly.
And this is exactly why I got a DLP HDTV. No burn-in issues.
SiXXGuNNZ
30th April 2005, 19:09
good call manono, I originally used 854, switched to 848, but for the life of me I cannot remember why, I helped him with this a few weeks ago.
thanks for the tip on the script, much easier with one resize line :)
here is what I got with Fit2Disc, you can do the same with FitCD, but you do not get a preview
Lanczos4Resize(720,480,92,60,536,356)
Fit2Disc
http://img182.echo.cx/img182/189/fit2disc0qx.th.jpg (http://img182.echo.cx/my.php?image=fit2disc0qx.jpg)
FitCD
http://img76.echo.cx/img76/8040/fitcd0zw.th.jpg (http://img76.echo.cx/my.php?image=fitcd0zw.jpg)
Yes, FitCD or Fit2Disc is your choice.
Common case:
The height of 2.35:1 on DVD is about 3/4 * height
NTSC -> 3/4 * 480 = 360
PAL -> 3/4 * 576 = 432
That height we should crop.
Basic Avisynth script (NTSC) (with all secrets of good conversion)
anamorph, specs compliant, without any blur or sharping effect,
aspect ratio error = 0%!
mpeg2source("DVD2AVI_PROJECT_FILE.d2v")
BicubicResize(704,480,0,0.5,96,60,528,360)
AddBorders(8,0,8,0)Good luck!
manono
2nd May 2005, 18:40
The height of 2.35:1 on DVD is about 3/4 * height
Sure, for true 2.35:1 movies. But most so-called 2.35:1 movie DVDs aren't really 2.35:1, and after cropping the black away (I just downloaded the Vob), his is more like 2.43:1. If you only crop 60 pixels from the top and bottom, you'll leave a sliver of black on the bottom. However, after finally having seen the vob, I now would crop it:
Crop(2,60,716,358)
Just to remove the black. Then you crop a lot more into the sides of the video to convert it to 1.78:1 (again, using the vob that TECK supplied, and using GKnot, and following the ITU standard):
Crop(98,60,524,358)
Lanczos4Resize(720,480)
And I have also noticed that there are slight differences between the figures you get from GKnot, and those from FitCD.
By the way, it's usually very slightly faster to have the crop and resize in different lines:
http://forum.doom9.org/showthread.php?s=&threadid=69246&highlight=crop+resize
See sh0dan's (AviSynth developer) first post.
LogicDeLuxe
2nd May 2005, 20:26
There is a simple solution without AVISynth or complicated reauthoring.
Set the DVD player to Pan&Scan and the TV in zoom mode: That's it.
Well, there is one catch: Most titles prevent the film played in Pan&Scan mode through user prohibitions, so you still need to make a copy, however it is really not much effort to change the user prohibitions while at it. AnyDVD can do this automatically, for example, but free tools will do as well.
I own a LG DV7832NXC DVD, february 2004 build. Lucky to get one for this build, when I saw it in the store, I almost ran outside with it.
There is no Pan and Scan option in this model, it employs Faroudja's de-interlacing technology, up-converting image resolution to 1080i.
The february build is the only model that have enabled both DVI and Component for 1080i up-conversion.
SiXXGuNNZ
3rd May 2005, 03:09
Originally posted by manono
The height of 2.35:1 on DVD is about 3/4 * height
Sure, for true 2.35:1 movies. But most so-called 2.35:1 movie DVDs aren't really 2.35:1, and after cropping the black away (I just downloaded the Vob), his is more like 2.43:1. If you only crop 60 pixels from the top and bottom, you'll leave a sliver of black on the bottom. However, after finally having seen the vob, I now would crop it:
Crop(2,60,716,358)
Just to remove the black. Then you crop a lot more into the sides of the video to convert it to 1.78:1 (again, using the vob that TECK supplied, and using GKnot, and following the ITU standard):
Crop(98,60,524,358)
Lanczos4Resize(720,480)
And I have also noticed that there are slight differences between the figures you get from GKnot, and those from FitCD.
By the way, it's usually very slightly faster to have the crop and resize in different lines:
http://forum.doom9.org/showthread.php?s=&threadid=69246&highlight=crop+resize
See sh0dan's (AviSynth developer) first post. nice tip++
I was under the impression joining them was better, thanks :)
Ok, I resized the movie, it came out great for the resize, however, there is a small problem:
The image is a little altered, like a thin doubled shadow around the objects or bodies in movement.
That's the only problem I ran into, so far. Is there a way I can export the CCE SP 2.50 template I have, as a text file??
Anyway, let me post it manually:
Output Files
Video files checked ES selected
Audio file unchecked
Video necode mode
Multipass VBR MPEG-2 selected
Passes 3
Bitrate
Avg 2000 Min 0 Max 9800
Other settings
Video Settings
MPEG-2 video settings
I use Bitrate view to get them right, no probs here.
Luminescence level 16 to 235
Intra DC precision Auto
Aspect ratio DAR 16:9
Timecode 00: 00: 00: 00
GOP Settings
GOP Sequence M=3 N/M=4
Close all GOP's checked
Now, in DVD Rebuilder Pro the CCE 2.50 Advanced Settings are:
VBR Bias 25 VBR Passes 4 Quality Precssion 16
AVS Options
ConverttoYUY(2) checked
Mpeg2Source ("source", idct=7) checked
I ran the following script in DVD Rebuilder:
Lanczos4Resize(720,480,92,60,536,356).RemoveGrain(mode=2).Undot()
Some people like to run the spatial/temporal filters before resizing. I thought RemoveGrain function will be diferent from Undot one... apparently not, it's the same thing.
Now, how do I correct the double lined images? Is it the only problem I have left...
I will inverse the order, run only the Lanczos4Resize (no undot or removegrain), since is only 90% compression that I need to perform on the movie.
Frank, thank for your help, I will definitelly try your way also.
I will buy the Fit2Disc program right now, it looks like a great program.
I know that I deviated slightly from the main thread issue, but since we are here, it will definitelly help also others who will read it.
Thanks for your expert input, guys.
Ahhh, an important setting I discovered at doom9.org for DVD-RB .ini file:
[Options]
CCETargetSectors=2264000
It will force the DVD size to be 4480KB.
Here it is the new 1MB file:
ZIPed VIDEO_TS 1MB FILE CCE SP processed (http://www.thefilebucket.com/userfiles/teck/VIDEO_TS_CCE.zip)
Notice Brad Dupree's face shadow, it looks nasty.
Let me know please what should I do next. Thanks guys.
[EDIT] Hmmm, something is really wierd. I just looked at the exact movie segment, from the original version, unmodified:
ZIPed VIDEO_TS 1MB FILE CCE SP not processed (http://www.thefilebucket.com/userfiles/teck/VIDEO_TS_Clean.zip)
It looks identical!!! I guess it must have something to do with the TV/monitor resolution.
Since the monitor have a higher resolution, it shows more details.
Correct me if I'm wrong? Thanks.
Originally posted by manono
If you only crop 60 pixels from the top and bottom, you'll leave a sliver of black on the bottom. However, after finally having seen the vob, I now would crop it:
Crop(2,60,716,358)
Ok, here it the way I see it:
Crop(int left, int top, int width, int height)
You probably use Fit2Disc to optain the last 2 values, right? Or is the famous Gknot that will pull them for you?
Then you crop a lot more into the sides of the video to convert it to 1.78:1 (again, using the vob that TECK supplied, and using GKnot, and following the ITU standard):
Crop(98,60,524,358)
Lanczos4Resize(720,480)
Looking at this screenshot, manono:
http://xs26.xs.to/pics/05175/gknotset.gif
Let me know how you determined the above Crop width/height values.
Thanks for reading my post.
manono
3rd May 2005, 16:50
Hi-
I explained how I got it in my first post. I set it up for NTSC on the left, and under Input Pixel Aspect ratio in the top center, I ticked "NTSC anamorphic (16:9)". Also I had the W and H-Moduls set for 2. This is OK if your source is progressive. It's definitely not OK if it's interlaced (the H-Modul would have to be a multiple of 4). But your Bitrate Viewer picture earlier in the thread said it was progressive.
I used GKnot exclusively. But I agree the FitCD and Fit2Disc are very good.
manono, as well the rest of the doom9 people, a BIG thank you.
You guys helped me understand now resizing technique very well, I really apreciate it.
manono, please don't be upset. I don't consider myself an idiot, because I catch very easy everything... however, there is a little detail I'm missing related to Cropping.
Ok, the movie size is 720x480.
In GKnot (or Fit2Disc, I purchase it yesterday), if I open the .d2v file, it will show me the black bars and I can determine the top/bottom crop very easy (Fit2Disc values):
58
4 2
62
Those are the values given, to fit perfectly the actual size of the movie.
How do you guys calculate the actual croping, in the sides?
60
92 92
64
I have no idea how to calculate the pesky 92 value.
Please forgive my ignorance, if I missed something in any post, explain it to me.
Once I know how to calculate the left/right crop, that will solve all my problems.
There is no automatic calculation for a Crop, not that I know of.
Any guidance related to Fit2Disc or GKnot is much apreciated.
Thanks for taking the time to read this post.
manono
4th May 2005, 16:25
Hi-
Using GKnot, I cropped away the black on the top and bottom, and then started cropping away the left and right sides until I got close to 1.78 Aspect Ratio with low Aspect Error. The Aspect Ratio box is just below and to the left of the crop boxes. The Aspect Error box is 2 boxes to the right of the H-Modul.
I can't help you with Fit2Disc, as I don't have it. Maybe SiXXGuNNZ will come back and explain it to you. It looks to me like he cropped away the left and right sides until there was no more black in the picture on the right.
violao
5th May 2005, 11:01
Originally posted by manono
Using GKnot, I cropped away the black on the top and bottom, and then started cropping away the left and right sides until I got close to 1.78 Aspect Ratio with low Aspect Error.
Interesting approach. I believe midnightsun provided the simplest calculation. It's easy to understand once you accept that 720*480 is 16/9. Although 720/480 is 1.5 and 720*480 is 4:3, which is already confusing enough, you want to make anamorphic 16/9 and whatever your player gets from 720 * 480 pixels will be resized to 16/9. So for the purpose of this discussion imagine 720*480 is 16/9. This is the same as your desired aspect so you can safely omit it from calculation. Then after you crop 60 and 64, 124 in total from 480 you get:
Y = 480 - 124 = 356
-------------------
X = ?
You simply crop 720 to new "16/9" width with height being 356:
X = 720 * 356 / 480 = 534
crop = 720 - 534 = 186 or 93 from both sides
You can see that 534/356 = 1.5, which is the same as 720/480, therefore "16/9".
Of course you need to crop even numbers unless you convert to RGB.
manono
5th May 2005, 14:11
You know something violao?
I was all set to dispute what you said, but using the ITU standard, which gave me slightly different values (I thought) when I went and looked up what it said in TheWEF's sticky. He's the original developer of GKnot:
here are the correct display aspect ratios for dvds:
display aspect ratio = width / height (square pixels)
code:--------------------------------------------------------------------------------
PAL (720x576 not square pixels)
non anamorphic = 1.367521 (close to 4/3 (1.333333))
anamorphic = 1.823361 (close to 16/9 (1.777777))
NTSC (720x480 not square pixels)
non anamorphic = 1.367088 (close to 4/3 (1.333333))
non anamorphic = 1.822784 (close to 16/9 (1.777777))
--------------------------------------------------------------------------------
Well, I was doing it slightly wrong for this thread, resizing to 1.78:1, with the ITU standard box checked, whereas I should have been resizing to 1.822784.
Had I been doing that, I would have come up with the same numbers as you (slight difference when cropping by 2, though) and midnightsun did. It also means that SiXXGuNNZ' picture from Fit2Disc further up is accurate. Thanks for the correction. Had I been doing it right, GKnot gives just as accurate a result as does Fit2Disc, or your's and midnightsun's mathematical calculations. For those interested in what TheWEF had to say on the subject, and a link to where those figures just above came from, here's the link:
http://forum.doom9.org/showthread.php?s=&threadid=42708
You have to start a little bit down, maybe to where I write, "The main reason for this thread though, is to post a reply that TheWEF made recently on the subject of the Pixel Aspect Ratio (PAR) and the ITU-R BT.601 Standard." He gives a link to a really technical guide on the subject, which in turn links to other papers.
midnightsun
6th May 2005, 00:35
Yes, that is the logic behind that calculation.
Once you know how much to crop top and bottom and that the final resolution and aspect ratio are 720x480 and 16:9, you crop as much from the sides so that the cropped picture will have the same aspect ratio as the final output, then you simply resize to the output resolution. So it is:
YCROP=480-(60+64)=356
XCROP=YCROP*(16/9)/[480*(16/9)/720]=(YCROP/480)*720=534, where [...] accounts for the NTSC DVD 16:9 pixel aspect ratio.
So crop to 534x356 (or 536, but I think you're allowed to crop to mod-2 horizontal resolutions in yv12), resize to 720x480, encode and set the DAR flag to 16:9.
PS @Teck, if you want to have the picture to be displayed with a ratio other than 16:9 this math will not work because you have letterbox to take care of, but the logic is the same. The hard part about these calculations is that resolutions and display dimensions don't match since the pixel grid is not square; so in this example it could look like 534x356 is anything but 16:9 but once you remember that an NTSC 16:9 dvd has pixels having a [480*(16/9)/720]:1 ratio you see that 534*[480*(16/9)/720]/356=1.77777.... which is 16/9 indeed :)
Originally posted by violao
Interesting approach. I believe midnightsun provided the simplest calculation. It's easy to understand once you accept that 720*480 is 16/9. Although 720/480 is 1.5 and 720*480 is 4:3, which is already confusing enough, you want to make anamorphic 16/9 and whatever your player gets from 720 * 480 pixels will be resized to 16/9. So for the purpose of this discussion imagine 720*480 is 16/9. This is the same as your desired aspect so you can safely omit it from calculation. Then after you crop 60 and 64, 124 in total from 480 you get:
Y = 480 - 124 = 356
-------------------
X = ?
You simply crop 720 to new "16/9" width with height being 356:
X = 720 * 356 / 480 = 534
crop = 720 - 534 = 186 or 93 from both sides
You can see that 534/356 = 1.5, which is the same as 720/480, therefore "16/9".
Of course you need to crop even numbers unless you convert to RGB.
Guys you are amazing. :)
I got it mastered now, no more problems with the perfect 1.85:1 calculation.
I said to myself, ok crop the movie then add borders, to make it the size mentioned above.
However, I did not like the extra Avisynth Script step.
Instead of cropping to the actual borders, I simply cropped 8 pixels less to the top/bottom borders:
http://xs27.xs.to/pics/05185/fit2disc.gif
I ran this AviSynth script (Fit2Disc rocks, but not as much as your tech tips):
Undot()
Crop(76,50,568,378)
Lanczos4Resize(720,480)and BINGO! The movie output quality is simply amazing.
I must say that BitRate Viewer is a Must Have tool, also.
Without it, I would not know how to tweak the CCE template to make the movie as good as it looks now.
One more time, many thanks guys.
I really apreciate all the technical explanations I received from all you and I hope it will help many others understand this very simple process of resizing, once you catch it's beauty.
Another small question.
After running several tests with KISS, I realised that my movie will be cleaner ans sharper using Asharp(), instead of Deen().
Now the Asharp(2,4) is the default setting, but some people like to use it as:
Undot()
Asharp(1,4)
Lanczos4Resize(720,480,76,50,568,378)
Using this script:
c0 = last
c1 = Crop(c0, 0, 0, c0.width, c0.height / 2)
c1 = Subtitle(c1, "Source", 10, 20)
c2 = Crop(c0, 0, c0.height / 2, c0.width, c0.height / 2)
c2 = UnDot(c2)
c2 = Deen(c2)
c2 = Subtitle(c2, "Source + UnDot() + Deen()", 10, 20)
StackVertical(c1, c2)
I was able to compare the results from Deen() and Asharp().
I noticed that, if I run the filters after the Lancoz4Resize, the image will be cleaner...
Do you recommend the float "T" to be 1 or 2 (default)?
Asharp(float "T", float "D")
T : unsharp masking threshold. 0 will do nothing. (value clamped to [nothing=0..32])
1 is like 32 with ffdsow/Vdub unsharp mask filter, it'll enhance contrast 1x
default is T=2
D : adaptive sharpenning strength. (value clamped to [disabled=0..16])
set to 0 to disable
if D>0, adaptive thresholding is enabled.
the threshold is adapted for each pixel (bigger for edges)
if adaptive sharpenning is enabled, T acts like a maximum.
default is D=4
Thanks guys.
violao
9th May 2005, 09:23
Teck, you're a perfectionist. In divx->dvd conversions I usually use negative blur for just a slight sharpening. I wouldn't notice any difference on a TV set anyway, but your huge plasma screen is probabaly a different story ;) Try asking this in Avisynth usage forum.
Thanks for the reply, violao. I started a new thread here:
http://forum.doom9.org/showthread.php?threadid=94225
If you have a chance guys, please advice me there. Thanks.
vBulletin® v3.8.11, Copyright ©2000-2026, vBulletin Solutions Inc.