Choosing CRF value for encoder

Context

Bandwidth usage by the Jami application is not optimal for all types of connections. Indeed, in some cases, the user experience is not good (satellite connection, …) despite the bandwidth management algorithm.

Observation

It is not necessary to aim for an optimal quality (CRF < 20) because beyond that, the visual perception is almost similar while the data flow (bitrate) required is much higher.

Objective

The purpose of this document is to verify the impact of a change in video quality with the CRF parameter of the encoder.

Test

These tests were performed by comparing :

  • The first one encoded with Jami’s current parameters

  • The second encoded with a lower quality

Each of these tests were performed for the following resolutions: 1080p, 720p and 436p.

For each of these resolutions several bitrates have been used:

  • 300 Kbit/s (Jami low value)

  • 1.5 Mbit/s (Intermediate value)

  • 6 Mbit/s (High value)

The graphs show the evolution of the bitrate with the file being tested (resolution and specific set bitrate).

A visual comparison (side by side) was made for each test.

Thanks to this test we can estimate the bitrate that will be emitted in Jami according to the chosen parameters. We also have an overview of the visual quality.


1080p / 300 kbit/s / CRF28 ../_images/encoder01.pngimage 1080p / 300 kbit/s / CRF38 ../_images/encoder02.pngimage

Visual comparison (CRF28 a gauche / CRF38 a droite) https://nextcloud.savoirfairelinux.com/index.php/s/twzPmT3MRPjQ3b7

1080p / 1.5 Mbps / CRF22 ../_images/encoder03.pngimage 1080p / 1.5 Mbit/s / CRF30 ../_images/encoder04.pngimage

Visual comparison (CRF22 left / CRF30 right) https://nextcloud.savoirfairelinux.com/index.php/s/XK6Ef3rwBFriRXT

1080p / 6 Mbps / CRF17 ../_images/encoder05.pngimage 1080p / 6 Mbit/s / CRF23 ../_images/encoder06.pngimage

Visual comparison (CRF17 on the left / CRF23 on the right) https://nextcloud.savoirfairelinux.com/index.php/s/RG3TksjQKtMorW5


720p / 300 kbps / CRF28 ../_images/encoder07.pngimage 720p / 300 kbit/s / CRF38 ../_images/encoder08.pngimage Visual comparison (CRF28 left / CRF38 right) https://nextcloud.savoirfairelinux.com/index.php/s/Z4T6EzGqyyWTJ9f

720p / 1.5 Mbps / CRF22 ../_images/encoder09.pngimage 720p / 1.5 Mbit/s / CRF30 (Test with reduced CRF) ../_images/encoder10.pngimage

Visual comparison (CRF22 left / CRF30 right) https://nextcloud.savoirfairelinux.com/index.php/s/H2Z5NQT3zJ9wzod

720p / 6 Mbps / CRF17 ../_images/encoder11.pngimage 720p / 6 Mbit/s / CRF23 ../_images/encoder12.pngimage

Visual comparison (CRF17 left / CRF23 right) https://nextcloud.savoirfairelinux.com/index.php/s/gACSARfHjAKqgRR


436p / 300 kbps / CRF28 ../_images/encoder13.pngimage 436p / 300 kbit/s / CRF38 ../_images/encoder14.pngimage

Visual comparison (CRF28 left / CRF38 right) https://nextcloud.savoirfairelinux.com/index.php/s/gj9CpQox5fiaWMT

436p / 1.5 Mbps / CRF22 ../_images/encoder15.pngimage 436p / 1.5 Mbit/s / CRF30 ../_images/encoder16.pngimage

Visual comparison (CRF22 left / CRF30 right) https://nextcloud.savoirfairelinux.com/index.php/s/BeCaqs2rMRpNQwS

436p / 6 Mbps / CRF17 ../_images/encoder17.pngimage 436p / 6 Mbit/s / CRF23 ../_images/encoder18.pngimage

Visual comparison (CRF17 left / CRF23 right) https://nextcloud.savoirfairelinux.com/index.php/s/KLeXq9NeLKTfyqs