# Install codec2 with Homebrew, apk, apt, dnf, MacPorts, Nix, pacman, zypper

Open source speech codec. Version 1.2.0 via Homebrew; verified from local package data.

## Install

```sh
sudo av install brew:codec2
```

Additional install commands:

### macOS

- Homebrew (100%):

```sh
brew install codec2
```

  Evidence: local Homebrew formula metadata

- MacPorts (94%):

```sh
sudo port install codec2
```

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

### Linux

- apk (92%):

```sh
sudo apk add codec2
```

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

- Debian apt (92%):

```sh
sudo apt install codec2
```

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

- dnf (92%):

```sh
sudo dnf install codec2
```

  Evidence: Fedora Rawhide package metadata: codec2 from https://dl.fedoraproject.org/pub/fedora/linux/development/rawhide/Everything/x86_64/os/repodata/e5ca8ce900cd68f5419e1c39ae517343100b306336cbaeb70a3c153121d95094-primary.xml.zst

- Nix (92%):

```sh
nix profile install nixpkgs#codec2
```

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

- pacman (92%):

```sh
sudo pacman -S codec2
```

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

- zypper (92%):

```sh
sudo zypper install codec2
```

  Evidence: openSUSE Tumbleweed package metadata: codec2 from https://download.opensuse.org/tumbleweed/repo/oss/repodata/be8d3611d25469107f32075a1697e69ec57a2b850b42348a658cc671ad5ec2b50760d02c3e59524d50da9a11d5be799bdaffba2e166e8ca8858512e3c0bd665d-primary.xml.zst

## Package facts

- **Package key:** brew:codec2
- **Package manager:** Homebrew
- **Package manager page:** <https://formulae.brew.sh/formula/codec2>
- **Version:** 1.2.0
- **Source summary:** Open source speech codec
- **Homepage:** <https://www.rowetel.com/?page_id=452>
- **Repository:** <https://github.com/drowe67/codec2>
- **Upstream docs:** <https://github.com/drowe67/codec2#readme>
- **License:** LGPL-2.1-only
- **Source archive:** <https://github.com/drowe67/codec2/archive/refs/tags/1.2.0.tar.gz>
- **Generated:** 2026-07-08T07:18:31+00:00

## Executables

- c2dec (cli)
- c2demo (cli)
- c2enc (cli)
- c2sim (cli)
- c2dec (alias)
- c2demo (alias)
- c2enc (alias)
- c2sim (alias)

## Build dependencies

- cmake

## Install behavior

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

## Freshness

- Page generated: 2026-07-08
- Package-manager version: 1.2.0
- Local data: ok
- Upstream repository: https://github.com/drowe67/codec2
- Upstream latest detected: 1.2.0 (current)
- info: No package-manager update timestamp was available.
## Project history and usage

Codec 2 is an LGPL open-source low-bit-rate speech codec written in C for communications-quality speech around 700 to 3200 bit/s. Its main application is low-bandwidth HF/VHF digital radio, where open codecs are important because many comparable vocoders have historically been proprietary or patent-encumbered.

### Project history

David Rowe announced the project on 2009-08-21 in a Rowetel post titled Open Source Low Rate Speech Codec Part 1, describing a plan for a free low-bit-rate speech codec initially targeting 2400 bit/s communications-quality speech. The motivation was explicitly tied to ham radio, low-bandwidth digital radio, and the lack of open sub-5 kbit/s speech codecs.

The current Codec 2 README says the project is C99, LGPL 2.1, and includes the FreeDV API, HF OFDM and FSK modems, FEC, packet-data APIs, and embedded FreeDV support. In July 2023 the repository was refactored, with older code moved to `drowe67/codec2-dev`.

The Rowetel Codec 2 page says the codec fills a gap below 5000 bit/s and integrates with FreeDV, an open-source digital voice protocol that combines modems, codecs, and FEC.

### Adoption history

Codec 2 has unusually broad package-manager distribution for a specialized DSP library: the input package facts list Alpine, Homebrew, Debian, Fedora/DNF, MacPorts, Nix, Arch/pacman, Ubuntu, and openSUSE/Zypper. That reflects its use as both a library and a command-line toolkit in radio and audio stacks.

The official FreeDV documentation shows Codec 2 modes inside multiple FreeDV HF and VHF modes from 2012 onward, including 1600, 700C, 700D, 700E, 2400A, and 2400B. This is adoption through an application protocol rather than a standalone end-user CLI alone.

### How it is used

The README documents simple command-line workflows with `c2enc`, `c2dec`, `c2demo`, and `c2sim`, including one-liners that encode raw speech, decode it, and play it through ALSA tools. It also documents FreeDV transmit and receive programs, modem programs, LDPC utilities, and build instructions for Linux, Windows cross-compilation, Android, and microcontrollers.

In practice, Codec 2 is used by developers and radio experimenters as a codec library, a set of command-line demonstrations, and the speech-coding component of FreeDV digital voice modes.

### Why package nerds care

Codec 2 matters to package maintainers because it is a rare open implementation in the very-low-bit-rate speech codec space, packaged widely despite being specialized DSP software. It brings together C libraries, demo CLIs, radio modem tooling, Octave test/development scripts, embedded targets, and FreeDV protocol support.

It is also a good example of why package histories are not just download counts: the package is important because downstream radio applications, Linux distributions, and experimenters need an auditable open codec where proprietary alternatives such as AMBE and MELP are culturally and legally awkward.

### Timeline

- 2009-08-21: David Rowe publicly announces the open-source low-rate speech codec project.
- 2012: FreeDV 1600 mode uses Codec 2 1300 according to the FreeDV mode table.
- 2016: FreeDV 2400A and 2400B VHF modes use Codec 2 1300.
- 2017: FreeDV 700C and 800XA modes use Codec 2 700C.
- 2018: FreeDV 700D uses Codec 2 700C.
- 2020: FreeDV 700E appears in the official FreeDV mode table.
- 2023-07: Current README says the repo was refactored and older code moved to codec2-dev.
- 2023-07-24: Codec2 1.2.0 release published in the current GitHub repository.

### Related projects

- FreeDV is the most closely related project and is described by the README and Rowetel page as an open-source digital voice protocol integrating Codec 2, modems, and FEC. The repository also references `codec2-dev` for older code, `drowe67/LPCNet` for FreeDV 2020 support, the SM1000 FreeDV adaptor, and modem components such as OFDM, FDMDV, COHPSK, FSK, and LDPC utilities.

### Sources

- <https://www.rowetel.com/?page_id=452>
- <https://www.rowetel.com/blog/?p=128>
- <https://github.com/drowe67/codec2>
- <https://github.com/drowe67/codec2/blob/main/README_freedv.md>


## 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:** codec2
- **Version Scheme:** 0
- **Revision:** 0
- **Bottle Stable Root URL:** <https://ghcr.io/v2/homebrew/core>
- **Deprecated:** no
- **Disabled:** no
- **Keg Only:** no
- **URL Keys:** stable

## Other Package-Manager Records

- Debian apt - codec2 - 1.2.0-3: normalized package name match | Debian stable package indexes: codec2 from https://deb.debian.org/debian/dists/stable/main/binary-amd64/Packages.xz | command line tools for handling Codec2 data | http://rowetel.com/codec2.html
- Debian apt - libcodec2-1.2 - 1.2.0-3: normalized package name match | Debian stable package indexes: libcodec2-1.2 from https://deb.debian.org/debian/dists/stable/main/binary-amd64/Packages.xz | Codec2 runtime library | http://rowetel.com/codec2.html
- Debian apt - libcodec2-dev - 1.2.0-3: normalized package name match | Debian stable package indexes: libcodec2-dev from https://deb.debian.org/debian/dists/stable/main/binary-amd64/Packages.xz | Codec2 library development files | http://rowetel.com/codec2.html
- Nix - codec2: normalized package name match | nixpkgs package indexes: pkgs/by-name/co/codec2/package.nix from https://api.github.com/repos/NixOS/nixpkgs/git/trees/master?recursive=1
- Ubuntu apt - codec2 - 1.2.0-2build1: normalized package name match | Ubuntu 24.04 LTS package indexes: codec2 from https://archive.ubuntu.com/ubuntu/dists/noble/universe/binary-amd64/Packages.gz | command line tools for handling Codec2 data | http://rowetel.com/codec2.html
- Ubuntu apt - libcodec2-1.2 - 1.2.0-2build1: normalized package name match | Ubuntu 24.04 LTS package indexes: libcodec2-1.2 from https://archive.ubuntu.com/ubuntu/dists/noble/universe/binary-amd64/Packages.gz | Codec2 runtime library | http://rowetel.com/codec2.html
- Ubuntu apt - libcodec2-dev - 1.2.0-2build1: normalized package name match | Ubuntu 24.04 LTS package indexes: libcodec2-dev from https://archive.ubuntu.com/ubuntu/dists/noble/universe/binary-amd64/Packages.gz | Codec2 library development files | http://rowetel.com/codec2.html
- apk - codec2 - 1.2.0-r1: normalized package name match | Alpine Linux edge package indexes: codec2 from https://dl-cdn.alpinelinux.org/alpine/edge/testing/x86_64/APKINDEX.tar.gz | Open source speech codec designed for communications quality speech between 700 and 3200 bps | https://github.com/drowe67/codec2
- apk - codec2-dev - 1.2.0-r1: normalized package name match | Alpine Linux edge package indexes: codec2-dev from https://dl-cdn.alpinelinux.org/alpine/edge/testing/x86_64/APKINDEX.tar.gz | Open source speech codec designed for communications quality speech between 700 and 3200 bps (development files) | https://github.com/drowe67/codec2
- dnf - codec2 - 1.2.0-9.fc44: normalized package name match | Fedora Rawhide package metadata: codec2 from https://dl.fedoraproject.org/pub/fedora/linux/development/rawhide/Everything/x86_64/os/repodata/e5ca8ce900cd68f5419e1c39ae517343100b306336cbaeb70a3c153121d95094-primary.xml.zst | Next-Generation Digital Voice for Two-Way Radio | http://rowetel.com/codec2.html
- dnf - codec2-devel - 1.2.0-9.fc44: normalized package name match | Fedora Rawhide package metadata: codec2-devel from https://dl.fedoraproject.org/pub/fedora/linux/development/rawhide/Everything/x86_64/os/repodata/e5ca8ce900cd68f5419e1c39ae517343100b306336cbaeb70a3c153121d95094-primary.xml.zst | Development files for Codec 2 | http://rowetel.com/codec2.html
- pacman - codec2 - 1:1.2.0-2: normalized package name match | Arch Linux sync databases: codec2 from https://geo.mirror.pkgbuild.com/extra/os/x86_64/extra.db.tar.gz | Open source speech codec designed for communications quality speech between 450 and 3200 bit/s | https://github.com/drowe67/codec2
- zypper - codec2 - 1.2.0-2.5: normalized package name match | openSUSE Tumbleweed package metadata: codec2 from https://download.opensuse.org/tumbleweed/repo/oss/repodata/be8d3611d25469107f32075a1697e69ec57a2b850b42348a658cc671ad5ec2b50760d02c3e59524d50da9a11d5be799bdaffba2e166e8ca8858512e3c0bd665d-primary.xml.zst | Low bit rate speech codec | https://rowetel.com/codec2.html
- zypper - codec2-devel - 1.2.0-2.5: normalized package name match | openSUSE Tumbleweed package metadata: codec2-devel from https://download.opensuse.org/tumbleweed/repo/oss/repodata/be8d3611d25469107f32075a1697e69ec57a2b850b42348a658cc671ad5ec2b50760d02c3e59524d50da9a11d5be799bdaffba2e166e8ca8858512e3c0bd665d-primary.xml.zst | Development library for codec2 | https://rowetel.com/codec2.html
- zypper - codec2-examples - 1.2.0-2.5: normalized package name match | openSUSE Tumbleweed package metadata: codec2-examples from https://download.opensuse.org/tumbleweed/repo/oss/repodata/be8d3611d25469107f32075a1697e69ec57a2b850b42348a658cc671ad5ec2b50760d02c3e59524d50da9a11d5be799bdaffba2e166e8ca8858512e3c0bd665d-primary.xml.zst | Example code for Codec 2 | https://rowetel.com/codec2.html
- zypper - libcodec2-1_2 - 1.2.0-2.5: normalized package name match | openSUSE Tumbleweed package metadata: libcodec2-1_2 from https://download.opensuse.org/tumbleweed/repo/oss/repodata/be8d3611d25469107f32075a1697e69ec57a2b850b42348a658cc671ad5ec2b50760d02c3e59524d50da9a11d5be799bdaffba2e166e8ca8858512e3c0bd665d-primary.xml.zst | Low bit rate speech codec | https://rowetel.com/codec2.html


## 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.
- [Homebrew utility packages](https://www.automicvault.com/pkg/brew-utility-packages/) - Matched Homebrew package provider.
- [cmake](https://www.automicvault.com/pkg/brew/cmake/) - Build dependency declared by Homebrew.
- [a52dec](https://www.automicvault.com/pkg/brew/a52dec/) - Shares av.db curated category or tags: audio, audio-codec, cli, media.
- [fdk-aac](https://www.automicvault.com/pkg/brew/fdk-aac/) - Shares av.db curated category or tags: audio-codec, c, cli, media.
- [musepack](https://www.automicvault.com/pkg/brew/musepack/) - Shares av.db curated category or tags: audio, audio-codec, cli, media.
- [speex](https://www.automicvault.com/pkg/brew/speex/) - Shares av.db curated category or tags: audio, audio-codec, cli, media.
- [freealut](https://www.automicvault.com/pkg/brew/freealut/) - Shares av.db curated category or tags: audio, c, cli, media.
- [id3lib](https://www.automicvault.com/pkg/brew/id3lib/) - Shares av.db curated category or tags: audio, c, cli, media.
- [libgsm](https://www.automicvault.com/pkg/brew/libgsm/) - Shares av.db curated category or tags: audio-codec, cli, media.
- [libilbc](https://www.automicvault.com/pkg/brew/libilbc/) - Shares av.db curated category or tags: audio, audio-codec, cli, low-bitrate, media.
- [librespot](https://www.automicvault.com/pkg/brew/librespot/) - Both packages work with overlapping file formats or content types. Shared terms: audio, cli, media, open, source.
- [spek](https://www.automicvault.com/pkg/brew/spek/) - Both packages work with overlapping file formats or content types. Shared terms: audio, cli, media, open, source.

## Combined YAML source

View the package source record on GitHub. [combined/codec2.yml](https://github.com/automic-vault/db/blob/main/combined/codec2.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
