node-opus

NodeJS native binding to OPUS

This project is unmaintained. See @discordjs/opus for an alternative.
Last updated 8 years ago by rantanen .
MIT · Repository · Bugs · Original npm · Tarball · package.json
$ cnpm install node-opus 
SYNC missed versions from official npm registry.

node-opus

NodeJS native bindings to libopus

This module implements bindings for Opus v1.1 for Node.js.

var opus = require('node-opus');

// Create the encoder.
// Specify 48kHz sampling rate and 10ms frame size.
// NOTE: The decoder must use the same values when decoding the packets.
var rate = 48000;
var encoder = new opus.OpusEncoder( rate );

// Encode and decode.
var frame_size = rate/100;
var encoded = encoder.encode( buffer, frame_size );
var decoded = encoder.decode( encoded, frame_size );

// or create streams
var channels = 2;
var opusEncodeStream = new opus.Encoder(rate, channels, frame_size);
var opusDecodeStream = new opus.Decoder(rate, channels, frame_size);
// see examples folder for a more complete example

Platform support

Supported platforms:

  • Linux x64 & ia32
  • Linux ARM (Raspberry Pi 1 & 2)
  • Linux ARM64 (Raspberry Pi 3)
  • Mac OS X x64
  • Windows x64

Add new supported platforms by running ./autogen.sh and ./configure in deps/opus and copying the resulting config.h to deps/config/opus/[os]/[arch].

Use the following flags with configure:

./configure --enable-static --disable-shared --with-pic

On a clean debian-based system, the full flow looks approximately like:

sudo apt-get update
sudo apt-get install autoconf
sudo apt-get install libtool
cd deps/opus
./autogen.sh
./configure --enable-static --disable-shared --with-pic
mkdir -p ../config/opus/[os]/[arch]
cp config.h ../config/opus/[os]/[arch]

And, then, the last step is to add the OS/Arch to package.json.

Current Tags

  • 0.3.3                                ...           latest (6 years ago)

28 Versions

  • 0.3.3 [deprecated]           ...           6 years ago
  • 0.3.2 [deprecated]           ...           7 years ago
  • 0.3.1 [deprecated]           ...           7 years ago
  • 0.3.0 [deprecated]           ...           8 years ago
  • 0.2.9 [deprecated]           ...           8 years ago
  • 0.2.8 [deprecated]           ...           8 years ago
  • 0.2.7 [deprecated]           ...           9 years ago
  • 0.2.6 [deprecated]           ...           9 years ago
  • 0.2.5 [deprecated]           ...           9 years ago
  • 0.2.4 [deprecated]           ...           9 years ago
  • 0.2.3 [deprecated]           ...           9 years ago
  • 0.2.2 [deprecated]           ...           10 years ago
  • 0.2.1 [deprecated]           ...           10 years ago
  • 0.2.0 [deprecated]           ...           10 years ago
  • 0.1.13 [deprecated]           ...           10 years ago
  • 0.1.12 [deprecated]           ...           10 years ago
  • 0.1.11 [deprecated]           ...           11 years ago
  • 0.1.10 [deprecated]           ...           11 years ago
  • 0.1.9 [deprecated]           ...           11 years ago
  • 0.1.8 [deprecated]           ...           11 years ago
  • 0.1.7 [deprecated]           ...           11 years ago
  • 0.1.6 [deprecated]           ...           11 years ago
  • 0.1.5 [deprecated]           ...           11 years ago
  • 0.1.4 [deprecated]           ...           11 years ago
  • 0.1.3 [deprecated]           ...           11 years ago
  • 0.1.2 [deprecated]           ...           11 years ago
  • 0.1.1 [deprecated]           ...           11 years ago
  • 0.1.0 [deprecated]           ...           11 years ago
Maintainers (1)
Downloads
Today 0
This Week 0
This Month 27
Last Day 0
Last Week 27
Last Month 1
Dependencies (4)
Dev Dependencies (4)
Dependents (0)
None

Copyright 2013 - present © cnpmjs.org | Home |