Reputation: 53
I need to mix two or more audios in nodejs. My input files are: audio1.mp3, audio2.mp3, audio4.mp3.
I want them to be mixed like this: on 0:00 seconds : audio1.mp3 should be added on the final mixed audio on 0:30 seconds : audoio2.mp3 should be added on the final audio on 00:35 : audio3.mp3 should be added on final audio
If audio1.mp3's length is of more than 30 seconds , then both audio1.mp3 and audio2.mp3 should play at same time.
How can I achieve this?
Upvotes: 3
Views: 730
Reputation: 53
Used sox
to mix them.
Example:
sox -m |sox audio1.mp3 -p pad 0:00 | sox audio2.mp3 -p 0:35 mixed.mp3
Upvotes: 1