Socket
Socket
Sign inDemoInstall

create-music-stream

Package Overview
Dependencies
Maintainers
1
Versions
3
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

create-music-stream

Creates a PCM 16 bit Little Endian Stream from a **mp3 file** or **youtube video**


Version published
Weekly downloads
7
decreased by-56.25%
Maintainers
1
Weekly downloads
 
Created
Source

create-music-stream

Creates a PCM 16 bit Little Endian Stream from a mp3 file or youtube video

chrvadala Test Coverage Status npm Downloads Donate

Usage

1. Install native dependencies

sudo apt-get install libasound2-dev ffmpeg

2. Install package

yarn add create-music-stream

3. Get music stream

const createMusicStream = require('create-music-stream')
const stream = createMusicStream(source, logger)

Examples

Stream local MP3 file

const Speaker = require('speaker')
const createMusicStream = require('create-music-stream')

createMusicStream('./track.mp3', console.log)
  .pipe(new Speaker())

Stream Youtube audio

const Speaker = require('speaker')
const createMusicStream = require('create-music-stream')

createMusicStream('https://www.youtube.com/watch?v=fz4MzJTeL0c', console.log)
  .pipe(new Speaker())

Changelog

  • 1.0 - First public version
  • 1.1 - Adds tests, Adds standard.js, Enables gh-actions, Upgrades deps
  • 1.2 - Upgrades deps

FAQ

  • If the YouTube player doesn't work read this article What if it stops working?
  • If speaker dependency is unable to build read this doc Audio Backend Selection
  • If you want to force ffmpeg binary path you can force it with the following code snippet
require('fluent-ffmpeg')
  .setFfmpegPath('/your/path/to/ffmpeg')

Contributors

FAQs

Package last updated on 31 May 2020

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc