Results 1 to 4 of 4
  1. #1

    PHP and Mp3, able to make a sample?

    This may be a very silly question, but I'm looking for a way to only get say, the first 30 seconds of an mp3, and using it to create a new file, that would be a sample of the full-length Mp3. Does anyone know anything about this? Is it even possible, or will I have to use some sort of 3rd party application?

    What I want to do is be able to upload a full-sized mp3 file, or .wav, and the webapp would make a shortened version of it. Am I way out of my league here?

    Thanks,
    Jon
    Coding my way to oblivion.

  2. #2
    You could always cut a part of the mp3 out say 30 secs, and upload it, im not sure you could do that uploading a full mp3 and use php to take a cut out of it for a sample.

  3. #3
    Ya, I've thought of that approach, but I'm trying to find the simplest way to do it. It's for a client, not me.
    Coding my way to oblivion.

  4. #4
    Join Date
    Mar 2004
    Posts
    1,301
    have you tried with fread() ?

    instead of readingthe whole file's size, read it to a certain length of the file's size.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •