Log in

View Full Version : how/where is Aspect Ratio stored in mp4?


jmnk
17th August 2007, 02:36
I've searched through various threads here, and while there are many posts on this topic, I'm as confused as ever. Does anyone know yes/no type answers to the following?

1) the ratio stored in mp4 - is it Pixel aspect ratio, or Display aspect ratio?
2) could this ratio be stored in:
a) actual video stream? or
b) container? or
c) both?
3) if 2c) is true, which value is used on playback if they happened to be different? Does it depend on the player?
4) if 2c) is true, which value does mp4box set?
5) in MeGui, the option labeled 'Input DAR':
a) is it showing what the MeGUI thinks the DAR of the movie should be?
b) And it allows me to override this automatic detection? But it does not seem to be passing any options to x264 command line if 'clever anamorphic encoding' is --not-- set?
6) in MeGui, checking the option labeled 'clever anamorphic encoding' seems to be setting --sar option for x264 commandline.
a) Is that causing writing aspect ratio to the video stream or to the container?
b) And is it PAR or DAR?

thanks.

mediator
17th August 2007, 21:32
strictly speaking, the (sample) aspect ratio is stored in the avc decoder configuration record in the mp4 container. Logically it can be considered part of the video elementary stream (sequence parameter set, picture parameter set). Any possible other way to store the aspect ratio in the container seems not to be widely established, or at least not mandatory from the side of the specs.

both, (Advanced-) Simple Profile and AVC store PAR, not DAR in their streams.

bond
18th August 2007, 10:21
also check the mp4 faq