{"size": 423, "ext": "js", "max_stars_repo_path": "node_modules/node-opus/examples/mp3-to-ogg.js", "max_stars_repo_name": "karywin/bot2543", "max_stars_repo_stars_event_min_datetime": "2015-05-13T07:34:29.000Z", "max_stars_repo_stars_event_max_datetime": "2021-06-01T21:41:57.000Z", "max_issues_repo_path": "node_modules/node-opus/examples/mp3-to-ogg.js", "max_issues_repo_name": "karywin/bot2543", "max_issues_repo_issues_event_min_datetime": "2015-04-28T09:36:16.000Z", "max_issues_repo_issues_event_max_datetime": "2020-04-23T19:29:29.000Z", "max_forks_repo_path": "node_modules/node-opus/examples/mp3-to-ogg.js", "max_forks_repo_name": "rowhammer/Tag", "max_forks_repo_forks_event_min_datetime": "2015-04-28T08:46:59.000Z", "max_forks_repo_forks_event_max_datetime": "2020-11-26T22:14:47.000Z"}
{"max_stars_count": 92, "max_issues_count": 101, "max_forks_count": 58, "avg_line_length": 23.5, "max_line_length": 81, "alphanum_fraction": 0.6713947991}

"use strict";

var fs = require( 'fs' );
var lame = require( 'lame' );
var opus = require( '../' );
var ogg = require( 'ogg' );

var opusFile = fs.createWriteStream( 'test.opus' );

var mp3Decoder = new lame.Decoder();
var opusEncoder = new opus.Encoder( 48000, 2 );
var oggEncoder = new ogg.Encoder();

process.stdin.pipe( mp3Decoder ).pipe( opusEncoder ).pipe( oggEncoder.stream() );
oggEncoder.pipe( process.stdout );

