Categories: Development

FFmpeg h264 to WebM VP9 encoding comparison part 1

In this part 1 see FFmpeg encoding speed, fps, size and bitrate for an h264 MP4 video file to VP9 WebM using -deadline good with -crf values 15-30 and -cpu-used 0-5.

Introduction

To see the encoding options for VP9 WebM with FFmpeg see my post here. The testing is using the constant quality option (crf) and the differences with different deadlines along with the cpu used parameter, these effect speed and the outcome quality.

The server

The server used for testing had dual Intel Xeon E5-2687W v4 CPU’s set @ 3.50GHz, meaning 24 cores and 48 threads in total. 251 GB of usable ram and NVMe drives. Thanks to exception0x876 at wishosting for the opportunity to use this.

The operating system was Ubuntu 18.04 and the FFMpeg version was 3.4.8-0ubuntu0.2.

The input

The input media is from jell.yfish.us with the H.264 testing file here. At 4k resolution (3840×2160) 29.97 fps, 30 seconds long, 250Mbps bitrate and file size of 895MB. This file comes in MKV format but was copied (-c copy) to MP4 for the testing.

The commands

The basis of the testing commands for this part is below, obviously the -cpu-used and -crf values changed throughout. -row-mt 1 and -threads 48 stayed consistent through the whole testing process.

ffmpeg -i h264.mp4 -c:v libvpx-vp9 -row-mt 1 -threads 48 -cpu-used X -deadline good -crf X -b:v 0 outputXYZ.webm
vp9 webm size h264 deadline good
vp9 webm encoding seconds h264 deadline good
vp9 webm encoding FPS h264 deadline good
vp9 webm bitrate h264 deadline good

WebM file size

WebM bitrate

Encoding time

Encoding FPS

Share

Recent Posts

Kennington reservoir drained drone images

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

2 years ago

Merrimu Reservoir drone images

Merrimu Reservoir from drone. Click images to view larger.

2 years ago

Early September spring shots

Some early September spring shots from a bushwalk, It is still too early for wildflowers.

3 years ago

Cloning an NVMe to SK Hynix Platinum P41 NVMe

I recently needed to clone over a smaller NVMe to a 2TB SK Hynix Platinum…

3 years ago

Using Laravel’s deleteDirectory to delete folders and their contents

If you ever needed a simple solution in Laravel to delete an entire directory and…

3 years ago

How to allow only 1 user to register in a Laravel application

How to enforce only one user to register or be registered in a Laravel web…

3 years ago