Log in

View Full Version : aspect ratio question


axi0n
20th July 2006, 04:59
I am trying to encode my "Die Hard" DVD to a MPEG-4 AVC backup. The problem, or question rather, is about the aspect ratio. The movie is NTSC 720x480. The aspect ratio hardcoded into the MPEG stream is 1.78:1. On playback with my 4:3 monitor, it rescales to 854x480. However, the video itself has black bars. Removing the black bars the video is 704x352 without the AR rescaling. With rescaling to my 4:3 monitor it is 835x352.

The first question I have is is it rescaling correctly, as it already has black bars? Is it true 16/9? Because there appears to be much more black on top and bottom than other 16/9 movies.

The second question I have is if I crop the black bars and downscale for my encode, how do i determine the aspect ratio? After cropping/downscaling, my encode is 624x272.

I am wondering because I want to place the cropped/downscaled stream in a Matroska container and specify the aspect ratio, so that it will play with the correct aspect on my 4:3 monitor and on my 16:10 laptop, as well as on my TV (with SVIDEO out) which has a different PAR. Thanks for any help :)

LocalH
20th July 2006, 05:29
The movie is 2.35:1, a wider aspect ratio than 16:9, so it is anamorphic and letterboxed. The video as encoded is truly 16:9, as the black bars are there to fill out to 480 lines - that's why the MPEG DAR is specified as 1.78:1 - also known as 16:9. If you crop it to 704x352 it is still 16:9, as you've not modified the aspect ratio of the actual video itself, and it's still anamorphic 16:9.

Is it absolutely necessary for you to downsample? You may get better quality if you keep it at 704x352 and encode it as 16:9 - this should cause the player to letterbox it as needed to achieve proper playback. I have no experience with Matroska, however, so I can't really help you with those specifics.

Awatef
20th July 2006, 12:29
Matroska allows you to specify the aspect ratio, so you don't have to adjust the aspect ratio with resizing.
Just encode in 704x352 and specify an AR of 2.35 in mkvmerge.
That way when you playback, you'll automatically get the right aspect.

EDIT:
If the size you're targeting is small (1-CD encode), it's probably better to resize to a "normal" resolution like 640x272 to improve compression quality, and don't specify an AR.

axi0n
22nd July 2006, 05:46
You guys are right...resizing for more bits just isn't worth it with x264. I got 750Kb 2-pass at 1084M, well within my target range, with unsized cropped video and 1 ac3 track. I decided to use the hqdn3d mencoder filter with a light temporal smoother rather than using the nr x264 option (too blocky with acceptable settings). Also, I decided that most of the speed vs filesize options were not worth it by a long shot on my P4 3GHz. Here is the command I used to obtain these results for those interested:

1st pass:

mencoder -nosound -ofps 24000/1001 -vf crop=704:352:10:64 -ovc x264 -x264encopts subq=4:bframes=3:b_pyramid:weight_b:turbo=2:pass=1:bitrate=750:keyint=240:threads=2 die_hard.vob


2nd pass:

mencoder -nosound -ofps 24000/1001 -vf crop=704:352:10:64,hqdn3d=2:1:2 -ovc x264 -x264encopts subq=5:bframes=3:b_pyramid:weight_b:pass=2:bitrate=750:keyint=240:threads=2:me=3:4x4mv:8x8dct die_hard.vob -o die_hard.avi


I used to encode a lot with xvid, and I'm amazed at the difference in quality. My aim was to be able to backup my DVD's at 4:1 with a standard DVD-/+R without noticing a quality difference on a laptop LCD, or at couch viewing distance at home on the TV. I must say that I can't even tell much of a difference up close on the CRT.

Thanks a lot for the explanation, and tips.