Giter Club home page Giter Club logo

audioconcat's Introduction

audioconcat Build Status NPM

Tiny node.js module to concat multiple audio files using ffmpeg

audioconcat provides a programmatic interface to do basically the same as calling ffmpeg via CLI like:

ffmpeg -i "concat:audio1.mp3|audio2.mp3" -acodec copy out.mp3

Requirements

  • ffmpeg with additional compilation flags --enable-libass --enable-libmp3lame

You can download static builds of ffmpeg from here.

If you want to use audioconcat in Heroku, you could use the ffmpeg2 buildpack

Install

npm install audioconcat

Usage

var videoshow = require('audioconcat')

var songs = [
  'beatles.mp3',
  'greenday.mp3',
  'u2.mp3'
]

audioconcat(songs)
  .output('all.mp3')
  .on('start', function (command) {
    console.log('ffmpeg process started:', command)
  })
  .on('error', function (err, stdout, stderr) {
    console.error('Error:', err)
    console.error('ffmpeg stderr:', stderr)
  })
  .on('end', function (output) {
    console.error('Audio created in:', output)
  })

Take a look to the programmatic API for more details

API

audioconcat(images, [ options ])

Return: audioconcat

audioconcat constructor. You should pass an array<string> with the desired audio files, and optionally passing the video render options object per each image.

Supported audio formats: mp3, acc, ogg (based on your ffmpeg compilation)

audioconcat#concat(output)

Concat files and generate the output audio to the given file path.

audioconcat#options(options)

Add custom options to ffmpeg

audioconcat.VERSION

Type: string

Current package semantic version

audioconcat.ffmpeg

Type: function

fluent-ffmpeg API constructor

License

MIT © Tomas Aparicio

audioconcat's People

Contributors

h2non avatar

Watchers

James Cloos avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.