xiph / opus-tools

A set of tools to encode, inspect, and decode audio in the Opus format.
https://opus-codec.org/
Other
218 stars 79 forks source link

opusdec missing raw endian control #45

Open kcgen opened 5 years ago

kcgen commented 5 years ago

The Opus decoder should be capable of writing RAW output having the same properties the encoder supports to read RAW. Ie: bits/sample, rate, channels, and endianness.

The decoder supports the first three (16 vs 32bit, rate, and stereo), but always writes raw as little-endian.

I need to encode raw big-endian streams and decode to the same format, on both little and big-endian platforms.

opusenc --raw --raw-rate 44100 --raw-endianness 1 input-BE.raw output.opus opendec --rate 44100 --raw-endianness 1 input.opus output-BE.raw

Thanks for considering this addition.