node-vorbis
Node.js native binding to libvorbis
This module provides Vorbis Encoder and Decoder classes compatible with node-ogg
streams.
Installation
node-vorbis
comes bundled with its own copy of libvorbis
, so
there's no need to have the library pre-installed on your system.
Simply compile and install node-vorbis
using npm
:
$ npm install vorbis
Example
Decoder example:
var fs = ;var ogg = ;var vorbis = ;var file = __dirname + '/Hydrate-Kenny_Beltrey.ogg';var od = ;od;fs;
Encoder example:
var ogg = ;var vorbis = ;var oe = ;var ve = ;// not yet implemented...ve;// `process.stdin` *MUST* be PCM float 32-bit signed little-endian samples.// channels and sample rate are configurable but default to 2 and 44,100hz.processstdin// send the encoded Vorbis pages to the Ogg encoderve;// write the produced Ogg file with Vorbis audio to `process.stdout`oe;
See the examples
directory for some more example code.