How To Install x264 on Debian 11

In this tutorial we learn how to install x264 on Debian 11. x264 is video encoder for the H.264/MPEG-4 AVC standard

Introduction

In this tutorial we learn how to install x264 on Debian 11.

What is x264

x264 is:

x264 is an advanced commandline encoder for creating H.264 (MPEG-4 AVC) video streams.

x264 supports the following features:

  • CABAC (context-based adaptive binary arithmetic coding) and CAVLC (context-based adaptive variable length coding
  • multiple reference frames
  • 16x16, 8x8 and 4x4 intra-predicted macroblocks
  • all P-frame inter-predicted macroblock types
  • B-Inter-predicted macroblock types from 16x16 down to 8x8
  • rate distortion optimization
  • multiple rate control modes (constant quantizer, constant quality, single or multipass ABR with the option of VBV)
  • scene cut detection
  • adaptive B-frame placement, with the option of keeping B-frames as references / arbitrary frame order
  • 8x8 and 4x4 adaptive spatial transform (high profile)
  • lossless mode (high 4:4:4 profile)
  • custom quantization matrices (high profile)
  • parallel encoding on multiple CPUs
  • interlaced streams

There are three methods to install x264 on Debian 11. We can use apt-get, apt and aptitude. In the following sections we will describe each method. You can choose one of them.

Install x264 Using apt-get

Update apt database with apt-get using the following command.

sudo apt-get update

After updating apt database, We can install x264 using apt-get by running the following command:

sudo apt-get -y install x264

Install x264 Using apt

Update apt database with apt using the following command.

sudo apt update

After updating apt database, We can install x264 using apt by running the following command:

sudo apt -y install x264

Install x264 Using aptitude

If you want to follow this method, you might need to install aptitude first since aptitude is usually not installed by default on Debian. Update apt database with aptitude using the following command.

sudo aptitude update

After updating apt database, We can install x264 using aptitude by running the following command:

sudo aptitude -y install x264

How To Uninstall x264 on Debian 11

To uninstall only the x264 package we can use the following command:

sudo apt-get remove x264

Uninstall x264 And Its Dependencies

To uninstall x264 and its dependencies that are no longer needed by Debian 11, we can use the command below:

sudo apt-get -y autoremove x264

Remove x264 Configurations and Data

To remove x264 configuration and data from Debian 11 we can use the following command:

sudo apt-get -y purge x264

Remove x264 configuration, data, and all of its dependencies

We can use the following command to remove x264 configurations, data and all of its dependencies, we can use the following command:

sudo apt-get -y autoremove --purge x264

Dependencies

x264 have the following dependencies:

References

Summary

In this tutorial we learn how to install x264 package on Debian 11 using different package management tools: apt, apt-get and aptitude.