简体   繁体   中英

Concatenate mp3 files in java when one is a silent mp3

I am trying to join two mp3's using java SequenceInputStream in Eclipse. It works fine if both are regular mp3 with sound. But if there is a blank mp3 with no sound in the series, it overrides the previous mp3, and also doesn't show up as a silent break in final output. Could the overwriting be because of some header issue? and how can I get a blank silence at the end of the mp3?

You would have to convert your mp3 to a PCM data format (ex : wav)

Then take mesures to determine if it's a silence :

Calculate the dB or RMS value for a group of sound frames and decide at what level it is considered to be 'silence'.

see this thread and also this one for further details

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM