I am making kind of mp3 music store. What is solution to cut or mix 2 mp3 files on the tomcat web server?
cut - I mean to cut first 30 seconds and save it in different file.
mix - I mean to mix the song with some messag开发者_如何学Pythones about "Trial Version" for example.
You might check out the jLayer mp3 library.
You can do this very easily in that the MP3 format can be effectively cut & pasted as a byte stream. There are frames in any given MP3 stream and you could loose maybe 26ms of audio on either side but that's not audibly much; each frame length can be variable based on if it is a VBR vs. CBR MP3.
You should indeed check out some libraries (already mentioned).
A proper MP3 decoder/player should honor in-stream adjustment in bitrate even with CBR, alas most don't. If you control the source audio data though, concatenating/trimming the MP3 data will concatenate/trim the audio.
精彩评论