troubles when pixel-aspect-ratio != 1.0

Sebastian Dröge sebastian at centricular.com
Thu May 21 14:28:45 PDT 2015


On Do, 2015-05-21 at 15:24 -0400, Stirling Westrup wrote:
> I've built a videowall player pipeline that works for videos with square
> pixels, but when someone tries to play something with a different pixel
> aspect ratio, the video gets clipped, cropped and displayed wrong.
> 
> I'm trying to sort out the culprits, but pixel-aspect-ratio isn't really
> discussed in the docs, and I don't actually know how most elements respond.
> For that matter, I never know when talking about widths and heights of
> frames, if that is in stored-pixels or displayed-pixels.

It's in stored pixels, and the pixel-aspect-ratio describes the ratio
between the pixel height and width.

From the pixel-aspect-ratio you can then calculate the display aspect
ratio by multiplication with the width or height. Which then gives you
widths and heights in the more familiar 16:9, 4:3, etc ratios.

See e.g. the code where the pixel-aspect-ratio is used in video sinks or
videoscale.

-- 
Sebastian Dröge, Centricular Ltd · http://www.centricular.com
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 949 bytes
Desc: This is a digitally signed message part
URL: <http://lists.freedesktop.org/archives/gstreamer-devel/attachments/20150522/1e32a277/attachment.sig>


More information about the gstreamer-devel mailing list