Skip to content

amir-s/audiot

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

2 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

AUDIOT

Simple wrapper around ffmpeg to combine and merge audio clips. npm version License: MIT

Installation

npm install audiot --save

Usage

import { compile } from 'audiot';
import type { Timeline } from 'audiot';

const timeline: Timeline = [
  { file: '1.mp3', start: 1000, speed: 1 },
  { file: '2.mp3', start: 6000, speed: 0.75 },
];

const {stdout, stderr} = await compile(timeline, 'output.mp3');

The start property is the time in milliseconds to start the audio clip (default to 0). The speed property is the speed of the audio clip (default to 1). A speed of 1 is normal speed, 0.5 is half speed, and 2 is double speed etc.

The compile function will merge the audio clips in the timeline and save it to the output file. The returned promise contains stdout and stderr from the ffmpeg process.

About

compile audio files into a single file

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published