[FFmpeg-user] Getting actual video size + ratio
Nicolas George
nicolas.george at normalesup.org
Thu Nov 22 17:54:13 CET 2012
Le tridi 3 frimaire, an CCXXI, Rodney Baker a écrit :
> Sorry for the confusion. According to my sources, DAR = SAR x PAR. It seems
The correct formula, eliminating all notation problems, is:
display aspect ratio = image ratio × sample aspect ratio
where
display aspect ratio is the ratio between the physical size of the image
when it is correctly displayed;
image aspect ratio is the ratio of the resolution of the image in pixels;
sample aspect ratio is the aspect ratio of the physical size of a pixel of
the image when it is correctly displayed.
> that Sample Aspect Ratio is a pseudonym for Storage Aspect Ratio (or v/v) but
I do not know where you got that storage aspect ratio, I had never
encountered it before. It seems to refer to what I call image ratio.
Sample aspect ratio is a synonym for pixel aspect ratio, since the pixels
are the samples for images.
Anyway, you should never refer to this kind of formula without stating your
notations with accuracy.
> it is NOT the same. I thought ffmpeg used to print all 3 parameters, but maybe
> it has only ever printed 2 of the 3, but codec dependent.
ffmpeg prints the display aspect ratio and the sample aspect ratio. It also
prints the image resolution, and you can use a calculator to deduce the
corresponding ratio (which, IMHO, should not be called an _aspect_ ratio).
> Here is another reference that uses Sample Aspect Ratio, but the formula is
> the same.
>
> http://www.animemusicvideos.org/guides/avtech3/theory-videoaspectratios.html
>
> Quoting from that page:
>
> "Sample Aspect Ratios
> The SAR basically just says "stretch the video by this ratio".
Unless I am seriously mistaken, this thing is completely equivalent to what
the very same page calls pixel aspect ratio a few paragraphs earlier (and
that ffmpeg calls sample aspect ratio). (There may be a catch if the file is
designed to be played on a device that has non-square pixels but not at its
native resolution, but that is beginning to be far-fetched.)
Regards,
--
Nicolas George
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 198 bytes
Desc: Digital signature
URL: <http://ffmpeg.org/pipermail/ffmpeg-user/attachments/20121122/3580a69c/attachment.asc>
More information about the ffmpeg-user
mailing list