Videos have metadata as part of the original file that sets the display aspect ratio (DAR) and stream aspect ratio (SAR). The reason for the discrepancy might be different DAR and SAR values.
When delivering the video we use the DAR. However, when viewing it in the Media Library we use the original size which might have a different aspect ratio.
When applying transformations to the video (such as resizing it), we discard the metadata from the original file, so the derived/transformed video is created based on the SAR which can give you an unexpected output ratio.
You can resolve this by using the
keep_dar flag (
fl_keep_dar in URLs) in the transformation, which forces the aspect ratio to be based on the DAR in the metadata and not the (SAR) aspect ratio of the actual stream. More information can be found here.
I'm surprised the aspect ratio isn't always preserved by default. Either way, adding this flag to my transforms solved our problem where aspect ratio wasn't preserved
Please sign in to leave a comment.