opusdec

decodes Opus audio files to WAV or raw PCM

TLDR

Decode Opus to WAV
$ opusdec [input.opus] [output.wav]
Decode to raw PCM
$ opusdec --raw [input.opus] [output.pcm]
Decode to stdout
$ opusdec [input.opus] - | aplay
Set output sample rate
$ opusdec --rate [48000] [input.opus] [output.wav]
Force stereo output
$ opusdec --force-stereo [input.opus] [output.wav]

SYNOPSIS

opusdec [options] input [output]

DESCRIPTION

opusdec decodes Opus audio files to WAV or raw PCM. If no output file is specified, opusdec attempts to play the audio directly. Use `-` for stdin/stdout. Opus is a versatile audio codec designed for both speech and music, widely used in WebRTC and streaming.

PARAMETERS

--rate Hz

Output sample rate.
--raw
Output raw PCM.
--force-stereo
Force stereo output.
--float
32-bit float output.
--gain dB
Apply gain.
--no-dither
Disable dithering.
--force-wav
Force including a WAV header on output (even for non-standard rates).
--packet-loss %
Simulate packet loss percentage for testing.
--quiet
Suppress program output.
--save-range FILE
Save decoder range data to file for debugging.

EXAMPLE

$ # Decode to WAV
opusdec music.opus music.wav

# Play directly
opusdec music.opus - | aplay -f cd

# Convert with specific rate
opusdec --rate 44100 input.opus output.wav

INSTALL

sudo apt install opus-tools
sudo dnf install opus-tools
sudo pacman -S opus-tools
sudo apk add opus-tools
sudo zypper install opus-tools
brew install opus-tools
nix profile install nixpkgs#opus-tools

CAVEATS

Output defaults to same channels as input. Resampling may affect quality. Use --float for highest precision.

HISTORY

Opus was developed by the IETF Codec Working Group, standardized as RFC 6716 in 2012, combining SILK and CELT technologies.

SEE ALSO

opusenc(1), ffmpeg(1)