opusdec(1) opus-tools opusdec(1)

opusdec – decode audio in Opus format to Wave or raw PCM

opusdec [ options ] input [ output ]

opusdec decodes Opus URLs or files to uncompressed Wave or raw PCM.

input may be a URL, file, or "-" to read from stdin. In URLs, the file, http, and https schemes are supported unless HTTP support was disabled at build time.

output is an output file or "-" to write to stdout. The output will be in Wave format if the output filename ends in .wav or the --force-wav option is used; otherwise raw PCM samples will be written.

If output is not specified, opusdec will attempt to play the audio in realtime if it supports audio playback on your system.

-h, --help
Show command help.
-V, --version
Show version information.
--quiet
Suppresses program output.
--rate N
Force decoding at sampling rate N Hz.
--force-stereo
Force decoding to stereo.
--gain N

Adjust the output volume N dB. Negative values make the signal quieter.
--no-dither
Do not dither 16-bit output.
--float
Output 32-bit floating-point samples instead of 16-bit integer samples.
--force-wav
Force Wave output format, regardless of the output filename extension.
--packet-loss N
Simulate N% random Opus packet loss.
--save-range FILENAME
Save check values for every frame to a file.

Decode a file input.opus to output.wav:
opusdec input.opus output.wav

Play a file input.opus:

opusdec input.opus

Re-encode a high bitrate Opus file to a lower rate:

opusdec --force-wav input.opus - | opusenc --bitrate 64 - output.opus

Play the http stream http://icecast.somwhere.org:8000/stream.opus on a system with pulseaudio: (press ctrl-c to quit)

padsp opusdec http://icecast.somwhere.org:8000/stream.opus

Jean-Marc Valin <jmvalin@jmvalin.ca>

Gregory Maxwell <greg@xiph.org>

Opusdec does not currently reject all invalid files which it should reject. It also doesn't provide very helpful output for the corrupted files it does reject. Use opusinfo(1) for somewhat better diagnostics.

opusenc(1), opusinfo(1)
2019-09-07 Xiph.Org Foundation