Is there a way to trim an MP3 file's audio to create a sample snippet using getID3?
I want to take an existing full length song (~3:00 minutes), trim off the first :10 seconds, go ahead :30 (or :40 seconds into the original song) and save this file as a sample song. I figured if you can splice 2 songs together into one I could split one song into two?
Thanks in advance.
Can I trim an MP3?
-
- getID3() v1 developer
- Posts:1477
- Joined:Fri May 04, 2001 4:00 pm
- Are you a spambot?:no
- Location:Northern Ontario, Canada
- Contact:
Re: Can I trim an MP3?
Not easily. You'd have to calculate where the cut point is by bytes (reasonable simple for CBR, more complex for VBR) and seek to the nearest frame boundary. It's certainly doable in PHP, and the information returned by getID3 (and some helper functions) would be very useful, but there is nothing built-in that would do this.
-
- User
- Posts:2
- Joined:Fri Dec 19, 2008 4:32 pm
Re: Can I trim an MP3?
I figured, as I saw no plugin for it. Looks like I am going to set the sample song player to handle trimming the real song. Gonna use Actionscript to do so. We'll see how that goes.
Thanks for your reply.
Thanks for your reply.