avalonmediasystem / avalon

Avalon Media System – Samvera Application
http://www.avalonmediasystem.org/
Apache License 2.0
93 stars 51 forks source link

Fix stretched posters #5866

Closed masaball closed 3 months ago

masaball commented 3 months ago

Related Issue: #5832

The root of the issue is that portrait video recorded on an iPhone (and possibly mobile devices in general) has metadata for an aspect ratio of "1280x720" with a flag for being rotated 90 degrees. The transcoded derivatives, however, have an aspect ratio that matches being a portrait video such as "606x1080". This disagreement in aspect ratio between the input and output causes the frame extraction to pull out an image of the wrong dimensions.

By setting the display_aspect_ratio off the derivatives, we will get a hopefully more accurate record. For existing items, we just compare the ratio on the master file against the derivative files to prevent extra/unrelated saves during the extraction.