按时间戳合并音频

时间:2016-06-28 09:25:58

标签: json audio ffmpeg

这里是JSON的例子,其中src - 音频文件的路径,时间 - 毫秒,从应该播放音频的开始。

那么问题,如何在一个WAV或MP3中合并whese文件,这些文件将在其上播放时间戳? 每个文件都可以在同一时间播放。

因此,作为方案,创建的MP3 / WAV应包含以下内容:

- - - - | firstFile-0:02 - |结束

---------- | secondFile-0:03 |结束

------------------------------------------ | thirdFile-0: 23 --------- |结束

------------------------------- | silence- | ------------ -

{
0:
{
src: "/audio/DRUMNBass/HITS/DNB_VOICEFX001_160_C_SL2.WAV",
time: 803
}

1:
{
src:"/audio/DRUMNBass/HITS/DNB_VOICEFX001_160_C_SL2.WAV"
time:812
}

2:
{
src:"/audio/DRUMNBass/DRUMS/RNB_BEATS006_160_X_SL2.WAV"
time:1317
}

3:
{
src:"/audio/DRUMNBass/DRUMS/RNB_BEATS006_160_X_SL2.WAV"
time:1318
}

4:
{
src:"/audio/DRUMNBass/SINTH/DNB_SYNTH105_160_C_SL2.WAV"
time:2054
}

5:
{
src:"/audio/DRUMNBass/SINTH/DNB_SYNTH105_160_C_SL2.WAV"
time:2054
}

6:
{
src:"/audio/DRUMNBass/SINTH/DNB_SYNTH105_160_C_SL2.WAV"
time:2055
}

7:
{
src:"/audio/DRUMNBass/BASS/DNB_BASS018_160_C_SL2.WAV"
time:2290
}

8:
{
src:"/audio/DRUMNBass/BASS/DNB_BASS018_160_C_SL2.WAV"
time:2290
}

}

FFmpeg的控制台命令就足够了))

0 个答案:

没有答案