Skip to content
This repository has been archived by the owner on Aug 19, 2022. It is now read-only.
/ yama-stream Public archive

[DEPRECATED] Node package based on youtube-audio-stream with extended functionality.

License

Notifications You must be signed in to change notification settings

BlitzKraig/yama-stream

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

20 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

This project is no longer under development

yama-stream

Youtube & MP3 Audio Streamer, created for use with my Discord bot. Now supports MP3 & WAV streaming.

Getting Started

npm install --save yama-stream
var yama = require('yama-stream')

Prerequisites

FFMPEG required

Usage

Node example playing Youtube directly to speaker

const yama = require('yama-stream')
const url = 'http://youtube.com/watch?v=2JVwo3D72cc'
const decoder = require('lame').Decoder
const speaker = require('speaker')

// URL of youtube video, 
// time to begin from (nullable),
// desired duration (nullable), 
// desired bitrate (nullable)
yama(url, "0:10", 10, 128)
.pipe(decoder())
.pipe(speaker())

Node example playing WAV/MP3 directly to speaker

const yama = require('yama-stream')
//Prefix url with aud: to let yama know this is a local audio file
const url = 'aud:./TestSounds/ooh.wav'
const decoder = require('lame').Decoder
const speaker = require('speaker')

// Local File location 
// time to begin from (nullable),
// desired duration (nullable), 
// desired bitrate (nullable)
yama(url, "0:00", 1, 2)
    .pipe(decoder())
    .pipe(speaker())

Acknowledgments

About

[DEPRECATED] Node package based on youtube-audio-stream with extended functionality.

Resources

License

Stars

Watchers

Forks

Packages

No packages published