Stream Video Aspect Ratio

We are wanting to use Stream to display portrait videos within our app. When we upload the video, Stream appears to make them “letter boxed” into a landscape frame.

This means that when embedded - we get black on the left and right sides of the video.

How can we tell stream to deliver the video in the right aspect ratio?

Someone posted (I searched for “stream aspect ratio”) that they got vertical to work.

Here’s one explanation:

One solution to this would be to update your player (edit: the iframe embedding the Cloudflare player) to use the correct aspect ratio, calculated from the dimensions of the video provided by the Stream API.

The problem with this approach is that the Stream API reports the dimensions for portrait videos incorrectly, without taking into account EXIF data for rotation. In order to compensate for that, I’ve submitted a feature request which discusses this in more detail:

1 Like

We will have both of these issues (exif data rotation bug and aspect:ratio black bar issue) addressed this month.

Posted in the other thread (Fetching EXIF Metadata via API) as well, but useful to repeat here. If the orientation of a video is provided in the EXIF metadata, Stream now populates input.height and input.width correctly.

@directlyapply not sure what the issue you’re having is. Is it possible that you post an example of the video with letterboxing? Stream never adds letterboxing to the video so it might have to do with how you’re setting up the video player.

How can this be addressed?
I would like to get rid of the black bars (or change the color to white).