Coming soon - Get a detailed view of why an account is flagged as spam!
view details
65
Small heads up to Reddit, there's some issues with Reddit videos over the last little while and its affecting the API. It manifests in the official app as well as the Reddit website, so kinda serious.
Post Body

[I wanted to post this in case others were scratching their head, I've had a lot of users reporting it to me, and I sent the report to Reddit, but my contact is out of the office right now so in the interest of unscratching other peoples' heads and letting Reddit know I thought I'd post it. Hopefully this is the correct subreddit due to it affecting the API.]

tl;dr: It seems a change in the Reddit backend a few weeks back caused some weird behavior with Reddit videos and caused them both A) being uploaded incorrectly as well as B) having incorrect values in the API. I'll go over both with examples below.

A) Reddit videos are uploaded (and as a result displayed) incorrectly

For whatever reason, portrait/tall videos that are uploaded to Reddit in many cases (if not all) are getting black boxes added to the sides manually to the video file to make it a pseudo-horizontal video. However the image thumbnails representing the video are in the proper (tall) aspect ratio.

Example posts: One, Two, Three

Here's an example of how this looks in the official Reddit app: https://i.imgur.com/iP5xFc3.jpg

(As you can see, based on the thumbnail being reported correctly as tall media, but the video incorrectly being reported as being wide due to added black boxes, the video player has no idea which to trust as to the media's dimensions and overlays both weirdly.)

Here's some posts from other users encountering it: One, Two, Three

Stating the obvious here but the intended solution would be to not add black bars to the side of portrait videos, and if that's intended behavior for whatever reason, keep the thumbnail consistent.

B) Video dimensions are being reported in reverse via the API

Even for videos that are correctly uploaded, it seems some wires got crossed and the dimensions are being reported backward, which again creates that issue of "which to trust" when one is wrong?

Here's an example post: https://reddit.com/r/marvelstudios/comments/hovm01/1_year_later_and_i_still_feel_like_weve_been/

The video is a normal 16:9 aspect ratio video. Its dimensions are width: 1334 pixels, height: 750 pixels. The preview images provided by the API for the post report this correctly, "width: 1334, height: 750".

However the actual video JSON itself gets them backward for some reason, reporting "width: 750, height: 1334".

In addition to causing a confusing API result, it manifests on the website as a weirdly shaped video player that isn't shaped properly to the content like most of the players on Reddit are, instead adding black bars on the top and bottom to try to fit the reversed API dimensions: https://i.imgur.com/tQHtggw.png


That's all I got, just thought I might save another dev some head scratches and give a post I can point to users, as well as hopefully give the engineers at Reddit some reproduction steps, hopefully it isn't a tricky fix. Thanks for what you do, can't imagine a video uploader is an easy thing to write!

Author
Account Strength
100%
Account Age
14 years
Verified Email
Yes
Verified Flair
No
Total Karma
1,715,057
Link Karma
529,042
Comment Karma
607,499
Profile updated: 3 days ago
Posts updated: 5 months ago
iOS Developer (Apollo)

Subreddit

Post Details

We try to extract some basic information from the post title. This is not always successful or accurate, please use your best judgement and compare these values to the post title and body for confirmation.
Posted
4 years ago