# Install x264 with Homebrew, apk, apt, MacPorts, Nix, pacman, scoop, winget

H.264/AVC encoder. Version r3222 via Homebrew; verified from local package data.

## Install

```sh
sudo av install brew:x264
```

Additional install commands:

### macOS

- Homebrew (100%):

```sh
brew install x264
```

  Evidence: local Homebrew formula metadata

- MacPorts (94%):

```sh
sudo port install x264
```

  Evidence: MacPorts ports tree: multimedia/x264/Portfile from https://api.github.com/repos/macports/macports-ports/git/trees/master?recursive=1

### Linux

- apk (92%):

```sh
sudo apk add x264
```

  Evidence: Alpine Linux edge package indexes: x264 from https://dl-cdn.alpinelinux.org/alpine/edge/community/x86_64/APKINDEX.tar.gz

- Debian apt (92%):

```sh
sudo apt install libx264-164
```

  Evidence: Debian stable package indexes: libx264-164 from https://deb.debian.org/debian/dists/stable/main/binary-amd64/Packages.xz

- Nix (92%):

```sh
nix profile install nixpkgs#x264
```

  Evidence: nixpkgs package indexes: pkgs/by-name/x2/x264/package.nix from https://api.github.com/repos/NixOS/nixpkgs/git/trees/master?recursive=1

- pacman (92%):

```sh
sudo pacman -S x264
```

  Evidence: Arch Linux sync databases: x264 from https://geo.mirror.pkgbuild.com/extra/os/x86_64/extra.db.tar.gz

### Windows

- Scoop (92%):

```sh
scoop install main/x264
```

  Evidence: Scoop official bucket manifest trees: bucket/x264.json from https://api.github.com/repos/ScoopInstaller/Main/git/trees/master?recursive=1

- winget (92%):

```sh
winget install --id VideoLAN.x264 -e
```

  Evidence: Windows Package Manager source index: VideoLAN.x264 from https://cdn.winget.microsoft.com/cache/source.msix

## Package facts

- **Package key:** brew:x264
- **Package manager:** Homebrew
- **Package manager page:** <https://formulae.brew.sh/formula/x264>
- **Version:** r3222
- **Source summary:** H.264/AVC encoder
- **Homepage:** <https://www.videolan.org/developers/x264.html>
- **Repository:** <https://code.videolan.org/videolan/x264>
- **Upstream docs:** <https://www.videolan.org/developers/x264.html>
- **License:** GPL-2.0-or-later
- **Source archive:** <https://code.videolan.org/videolan/x264.git>
- **Generated:** 2026-07-08T18:08:21+00:00

## Executables

- x264 (cli)
- x264 (alias)

## Install behavior

- Post-install hook: not defined
- Bottle: available on arm64_linux, arm64_sequoia, arm64_sonoma, arm64_tahoe, arm64_ventura, sonoma, ventura, x86_64_linux

## Freshness

- Page generated: 2026-07-08
- Package-manager version: r3222
- Local data: ok
- Upstream repository: https://www.videolan.org/developers/x264.html
- info: No package-manager update timestamp was available.
- info: Release/tag comparison is only available for GitHub repositories.
## Project history and usage

x264 is VideoLAN's open-source H.264/MPEG-4 AVC encoder library and command-line encoder. It is one of the defining software video encoders of the broadband-video era: a GPL project that became both a default tool for enthusiasts and a commercially licensed engine inside many professional products.

The project began in 2004, shortly after the first H.264/AVC specification was released in May 2003. x264's history is bound to VideoLAN and FFmpeg, because VideoLAN hosts the source community while FFmpeg exposes x264 through `libx264`, making it available to a huge base of transcoding workflows.

### Project history

x264 was started to produce an open-source encoder that implemented the H.264/AVC standard with high quality and high performance. The project's commonly cited developer lineage begins with Laurent Aimar, then Loren Merritt, and later includes Fiona Glaser, Anton Mitrofanov, Henrik Gramner, and other contributors who worked heavily on psycho-visual tuning, rate control, threading, and hand-optimized assembly.

A major institutional turn came in 2010 with the formation of x264, LLC. The community kept the GPL version available, while the company provided commercial licensing for users who wanted to ship x264 in proprietary products without releasing their own source under the GPL. That dual path helped x264 remain both a free-software project and a commercial codec product.

### Adoption history

x264's adoption accelerated because it arrived when H.264 was becoming the practical common denominator for web video, Blu-ray workflows, mobile devices, and streaming services. The x264 licensing site describes it as the most widely deployed AVC encoder and says its use expanded into billions of devices and commercially licensed products.

FFmpeg integration was decisive for package-manager users. FFmpeg documents x264 as an external library for H.264 encoding, enabled with `--enable-libx264`, and many frontends and scripts use FFmpeg rather than invoking the `x264` binary directly. That relationship made x264 a core codec package even on systems where users only see it through a larger media pipeline.

### How it is used

The standalone `x264` command commonly reads raw or YUV4MPEG video and writes an H.264 elementary stream or supported container output. Its famous operational model is preset plus quality target: users pick a speed preset, choose CRF or bitrate/rate-control settings, and let the encoder balance compression effort against time.

In daily use x264 is also a library dependency. Video tools call it through APIs such as FFmpeg's `libx264` wrapper to create H.264 streams for archival, streaming ladders, screen recordings, social video, and compatibility-focused transcodes. Its GPL licensing matters operationally: enabling it can change the license obligations of the resulting FFmpeg build.

### Why package nerds care

x264 is a package-nerd landmark because it made 'software H.264 encoder' mean something specific: a small command and library with deep SIMD assembly, mature rate control, and highly tuned presets. It became a benchmark against which later encoders, including HEVC encoders, were compared.

It is also a classic example of codec packaging complexity. The same upstream can be an executable, a linkable library, a GPL licensing trigger, and a commercially licensed component, so package metadata around x264 often carries more legal and ecosystem meaning than a normal CLI tool.

### Timeline

- 2003-05: The first H.264/AVC specification is released.
- 2004: The x264 project starts as an open-source AVC encoder.
- 2008: Fiona Glaser joins the x264 development effort, one of several contributors associated with later quality and performance work.
- 2010: x264, LLC is formed to provide commercial licensing while GPL development continues.
- 2010s: x264 becomes deeply embedded in FFmpeg-based transcoding and professional encoding workflows.

### Related projects

- VideoLAN hosts the x264 source project and is also known for VLC.
- FFmpeg integrates x264 through `libx264` and is the path by which many users invoke it.
- x265 is the HEVC successor-era encoder that explicitly leverages ideas and optimizations from x264.
- OpenH264 is a separate H.264 encoder project with different licensing and deployment tradeoffs.

### Sources

- <https://code.videolan.org/videolan/x264>
- <https://en.wikipedia.org/wiki/X264>
- <https://wiki.x266.mov/docs/encoders/x264>
- <https://www.ffmpeg.org/general.html>
- <https://www.videolan.org/developers/x264.html>
- <https://x264.org/technology/>


## Security Notes

narrow executable package without higher-risk signals.

- **Geiger risk:** green / low
- narrow executable package without higher-risk signals

## Source Database Details

- **Source Database:** Homebrew formula API
- **Tap:** homebrew/core
- **Full Name:** x264
- **Version Scheme:** 0
- **Revision:** 0
- **Head Version:** HEAD
- **Bottle Stable Root URL:** <https://ghcr.io/v2/homebrew/core>
- **Deprecated:** no
- **Disabled:** no
- **Keg Only:** no
- **URL Keys:** head, stable

## Other Package-Manager Records

- Debian apt - libx264-164 - 2:0.164.3108+git31e19f9-2+b1: normalized package name match | Debian stable package indexes: libx264-164 from https://deb.debian.org/debian/dists/stable/main/binary-amd64/Packages.xz | x264 video coding library | https://www.videolan.org/developers/x264.html
- Debian apt - libx264-dev - 2:0.164.3108+git31e19f9-2+b1: normalized package name match | Debian stable package indexes: libx264-dev from https://deb.debian.org/debian/dists/stable/main/binary-amd64/Packages.xz | development files for libx264 | https://www.videolan.org/developers/x264.html
- Debian apt - x264 - 2:0.164.3108+git31e19f9-2+b1: normalized package name match | Debian stable package indexes: x264 from https://deb.debian.org/debian/dists/stable/main/binary-amd64/Packages.xz | video encoder for the H.264/MPEG-4 AVC standard | https://www.videolan.org/developers/x264.html
- Nix - x264: normalized package name match | nixpkgs package indexes: pkgs/by-name/x2/x264/package.nix from https://api.github.com/repos/NixOS/nixpkgs/git/trees/master?recursive=1
- Ubuntu apt - libx264-164 - 2:0.164.3108+git31e19f9-1: normalized package name match | Ubuntu 24.04 LTS package indexes: libx264-164 from https://archive.ubuntu.com/ubuntu/dists/noble/universe/binary-amd64/Packages.gz | x264 video coding library | https://www.videolan.org/developers/x264.html
- Ubuntu apt - libx264-dev - 2:0.164.3108+git31e19f9-1: normalized package name match | Ubuntu 24.04 LTS package indexes: libx264-dev from https://archive.ubuntu.com/ubuntu/dists/noble/universe/binary-amd64/Packages.gz | development files for libx264 | https://www.videolan.org/developers/x264.html
- Ubuntu apt - x264 - 2:0.164.3108+git31e19f9-1: normalized package name match | Ubuntu 24.04 LTS package indexes: x264 from https://archive.ubuntu.com/ubuntu/dists/noble/universe/binary-amd64/Packages.gz | video encoder for the H.264/MPEG-4 AVC standard | https://www.videolan.org/developers/x264.html
- apk - x264 - 0.164.3108-r1: normalized package name match | Alpine Linux edge package indexes: x264 from https://dl-cdn.alpinelinux.org/alpine/edge/community/x86_64/APKINDEX.tar.gz | Free library for encoding H264/AVC video streams | https://www.videolan.org/developers/x264.html
- apk - x264-bash-completion - 0.164.3108-r1: normalized package name match | Alpine Linux edge package indexes: x264-bash-completion from https://dl-cdn.alpinelinux.org/alpine/edge/community/x86_64/APKINDEX.tar.gz | Bash completions for x264 | https://www.videolan.org/developers/x264.html
- apk - x264-dbg - 0.164.3108-r1: normalized package name match | Alpine Linux edge package indexes: x264-dbg from https://dl-cdn.alpinelinux.org/alpine/edge/community/x86_64/APKINDEX.tar.gz | Free library for encoding H264/AVC video streams (debug symbols) | https://www.videolan.org/developers/x264.html
- apk - x264-dev - 0.164.3108-r1: normalized package name match | Alpine Linux edge package indexes: x264-dev from https://dl-cdn.alpinelinux.org/alpine/edge/community/x86_64/APKINDEX.tar.gz | Free library for encoding H264/AVC video streams (development files) | https://www.videolan.org/developers/x264.html
- apk - x264-libs - 0.164.3108-r1: normalized package name match | Alpine Linux edge package indexes: x264-libs from https://dl-cdn.alpinelinux.org/alpine/edge/community/x86_64/APKINDEX.tar.gz | Free library for encoding H264/AVC video streams (libraries) | https://www.videolan.org/developers/x264.html
- pacman - x264 - 3:0.165.r3222.b35605a-2: normalized package name match | Arch Linux sync databases: x264 from https://geo.mirror.pkgbuild.com/extra/os/x86_64/extra.db.tar.gz | Open Source H264/AVC video encoder | https://www.videolan.org/developers/x264.html
- MacPorts - x264: normalized package name match | MacPorts ports tree: multimedia/x264/Portfile from https://api.github.com/repos/macports/macports-ports/git/trees/master?recursive=1
- Scoop - main/x264: normalized package name match | Scoop official bucket manifest trees: bucket/x264.json from https://api.github.com/repos/ScoopInstaller/Main/git/trees/master?recursive=1
- winget - VideoLAN.x264: normalized package name match | Windows Package Manager source index: VideoLAN.x264 from https://cdn.winget.microsoft.com/cache/source.msix


## Related links

- [Terminal utility packages](https://www.automicvault.com/pkg/terminal-utilities/) - Matched terminal and command-line workflow metadata.
- [Networking and protocol packages](https://www.automicvault.com/pkg/networking-protocol-tools/) - Matched network, protocol, or remote-service metadata.
- [Media and graphics packages](https://www.automicvault.com/pkg/media-graphics-tools/) - Matched media, image, audio, video, or graphics metadata.
- [Web development packages](https://www.automicvault.com/pkg/web-dev-tools/) - Matched web development metadata.
- [fceux](https://www.automicvault.com/pkg/brew/fceux/) - Popular package that depends on this formula.
- [ffmpeg](https://www.automicvault.com/pkg/brew/ffmpeg/) - Popular package that depends on this formula.
- [ffmpeg-full](https://www.automicvault.com/pkg/brew/ffmpeg-full/) - Popular package that depends on this formula.
- [ffmpeg@2.8](https://www.automicvault.com/pkg/brew/ffmpeg-2-8/) - Popular package that depends on this formula.
- [ffmpeg@4](https://www.automicvault.com/pkg/brew/ffmpeg-4/) - Popular package that depends on this formula.
- [x-cli](https://www.automicvault.com/pkg/brew/x-cli/) - Package name indicates the same formula family.
- [x265](https://www.automicvault.com/pkg/brew/x265/) - Package name indicates the same formula family.
- [x3270](https://www.automicvault.com/pkg/brew/x3270/) - Package name indicates the same formula family.
- [h264bitstream](https://www.automicvault.com/pkg/brew/h264bitstream/) - Shares av.db curated category or tags: cli, codec, h264, media, video.
- [mkvtomp4](https://www.automicvault.com/pkg/brew/mkvtomp4/) - Shares av.db curated category or tags: cli, h264, media, video.
- [rav1e](https://www.automicvault.com/pkg/brew/rav1e/) - Shares av.db curated category or tags: cli, media, video, video-encoder.
- [svt-av1](https://www.automicvault.com/pkg/brew/svt-av1/) - Shares av.db curated category or tags: cli, codec, media, video, video-encoder.
- [svt-vp9](https://www.automicvault.com/pkg/brew/svt-vp9/) - Shares av.db curated category or tags: cli, codec, media, video, video-encoder.
- [animdl](https://www.automicvault.com/pkg/brew/animdl/) - Shares av.db curated category or tags: cli, media, video.
- [bento4](https://www.automicvault.com/pkg/brew/bento4/) - Shares av.db curated category or tags: cli, media, video.
- [libaacs](https://www.automicvault.com/pkg/brew/libaacs/) - Both packages work with overlapping file formats or content types. Shared terms: cli, media, video.
- [libdca](https://www.automicvault.com/pkg/brew/libdca/) - Local package facts share a topical domain. Shared terms: cli, codec, media.
- [libbluray](https://www.automicvault.com/pkg/brew/libbluray/) - Local package facts share a topical domain. Shared terms: cli, media.

## Combined YAML source

View the package source record on GitHub. [combined/x264.yml](https://github.com/automic-vault/db/blob/main/combined/x264.yml)


## Sources

- Nucleus package database
- Geiger risk classifier
- package-page enrichment
- curated package history
- package version freshness
- av.db category and tag curation
- package relationship graph
- external package-manager database matches
- cross-ecosystem install command graph
