Skip to main content

Considerations for displaying upload previews

Depending on your use case, and how long it's acceptable for your users to wait, there's a few different ways you can choose to show a user when their video has uploaded.

Approach 1: resize the video to 480p for preview

This looks fancier (the user sees their video in the preview screen), but will take longer to generate. You also need to make sure that your video resizing solution does not use the same settings it would when presenting the video to site users, which will take a lot longer.

Approach 2: show a thumbnail image

To avoid making the user wait for the 480p video to be made, you can show them a thumbnail image of the video, which takes an insignificant amount of time to do (effectively, instead of resizing the whole video, you resize one frame and save it as an image).

Bear in mind that, depending on the exact content of the video and the timestamp you choose for generating the frame, the thumbnail could confuse the user (e.g. if they've got a transition to black in the middle of the video, and you happen to pick that timestamp, it'll show a black image).

Approach 3: show a brief animated preview

As a compromise between the above methods, you can create a short preview of a given video (for example, the first 5-10 seconds of it). As it's only a preview, quality is not a major concern, and you can do a lot of optimisation to make it encode very quickly whilst still being useful at its job.