Computing

Vertical video encoding; Does it matter?

Vertical video is a video that is higher than it is wide and is made for viewing on vertical screens which basically just means made of viewing on phones. Because trying to display a 9:16 aspect ratio on a regular TV or computer screen means ginormous side black bars.

I took a couple of sample vertical videos today, the resolution is 720×1280 don’t get confused with the super common 1280 wide x 720 high resolution.

The bitrate for these simple MP4’s was 3,436 kb/s which is decently low for a format built for mobile viewing.

The two videos used as examples for this post are just under 11 seconds, IMG_0001.mp4 is 4,532KB in size and IMG_0003.mp4 which is 4,782KB.

IMG_0001 is a panning video whilst IMG_0003 is with no movement.

The FFmpeg encoding wasn’t timed as the faster preset was done almost instantly and the “slow” ones took mere seconds.

For the original videos I did CRF values of: 22,25,28,30 and 34 with the presets: faster, slow and veryslow.

Encoding comparison

The file sizes after the encoding:

Slow and veryslow 22 had the largest sizes whilst for the lowest size there was no standout, all the presets with CRF 34 were around the same.

Left: original. Right: veryslow 34

In the above comparison the right image is much more softer (green branch) and chunky (sticks) However, the overall scene does not change between versions.

Here are the screenshots from each of the encoded videos along with the original combined into one super-wide image. Click and zoom in to seem the detail.

with movement (IMG_0001)
no movement (IMG_0003)

One of the biggest realizations I came to was that when playing the videos in a browser emulating a phone screen you would not have issues viewing the 571KB video compared to the original 4,782KB.

Compression is fine for mobile media

This is why for show and forget apps like Instagram, Snapchat and TikTok the video gets nuked into a pixelated, jagged mess. It makes sense as to why store millions of videos 4MB in size when you can make them 400-800KB and they are “still viewable”.

If the content isn’t destined to be viewed on a large screen, hence being a vertical video anyway then compressing it is just smart operating. A video with “not much happening” in terms of movement will compress in a more attractive manner.

Original and smallest encoded video for each:

IMG_0001

IMG_0001_slow_34

IMG_0003

IMG_0003_veryslow_34

Screenshots:

IMG 0001
IMG 0001 slow 34
IMG 0003
IMG 0003 veryslow 34
Share
Tags: FFmpegVideo

Recent Posts

Kennington reservoir drained drone images

A drained and empty Kennington reservoir images from a drone in early July 2024. The…

1 year ago

Merrimu Reservoir drone images

Merrimu Reservoir from drone. Click images to view larger.

1 year ago

FTP getting array of file details such as size using PHP

Using FTP and PHP to get an array of file details such as size and…

2 years ago

Creating Laravel form requests

Creating and using Laravel form requests to create cleaner code, separation and reusability for your…

2 years ago

Improving the default Laravel login and register views

Improving the default Laravel login and register views in such a simple manner but making…

2 years ago

Laravel validation for checking if value exists in the database

Laravel validation for checking if a field value exists in the database. The validation rule…

2 years ago