Log in

View Full Version : Set aspect ratio after encoding better?


8-BaLL
12th January 2013, 11:54
Hey guys,

I have a DVD which I want to encode.

The picture aspect ratio is 1.66. The image size is 720x576.

So I cropped the black bars (top 56 pixel and bottom 56 pixel).

The end result would be 720x464 which are perfect numbers for mod 16 encoding. Now 720 / 464 isnt the correct 1.66 aspect ratio.

So what I did was- I forced resolution with mkvmerge to 768x464 when muxing audio+video- which works great and is perfect 1.66 aspect ratio looks 1:1 as dvd AR.

Is it better to set the aspect ratio when muxing, as I did or is there a better way to define the aspect ratio during encoding?

Thanks for eventual help.

sneaker_ger
12th January 2013, 12:06
It's better to already set the aspect ratio during the encode using x264's --sar parameter, because some players only rely on the bitstream information. Mkvmerge will automatically read and apply this information to the container level as well.

These would be the common values to choose from:
http://www.abload.de/img/mpeg4saronbt6.png

8-BaLL
12th January 2013, 12:24
but does x264 resize the image if I set the --sar 16:15 option?

when i just crop it, it doesnt do any resizing from what I could tell.

I will make a sample encode and compare both.

sneaker_ger
12th January 2013, 12:29
x264 does not "physically" resize when just using --sar. It only resizes if you use filters, e.g. --video-filter resize.

8-BaLL
12th January 2013, 12:36
Thanks Ill definately test it with a sample, and report back with screenshots.

It would be great if the "--sar" solves the issue ;)

kypec
12th January 2013, 14:04
It would be great if the "--sar" solves the issue ;)
Of course it does, don't worry. I've been using --sar parameter since I started encoding with x264 more than 2 years ago and it has never failed me, no matter if I mux video into MKV or MP4 afterwards.;)