SitePoint Sponsor

User Tag List

Results 1 to 4 of 4

Hybrid View

  1. #1
    SitePoint Guru
    Join Date
    Nov 2004
    Location
    sweden
    Posts
    646
    Mentioned
    2 Post(s)
    Tagged
    0 Thread(s)

    Fade in/out audio?

    Is there a way to make a fade in and fade out to a mp3 file that a user is uploading to my server?
    I'm making a page where the user can upload their sound file and then I want my page to make a 30 sec sample of that sound.

    Any ideas?

  2. #2
    Keeper of the SFL StarLion's Avatar
    Join Date
    Feb 2006
    Location
    Atlanta, GA, USA
    Posts
    3,748
    Mentioned
    72 Post(s)
    Tagged
    0 Thread(s)
    My first impulse is to say ffmpeg it.

    PHP itself cant do this; javascript might, but that would involve the browser redownloading the entire audio file to do a 30 second sweep; probably not what you want.
    Never grow up. The instant you do, you lose all ability to imagine great things, for fear of reality crashing in.

  3. #3
    SitePoint Guru
    Join Date
    Nov 2004
    Location
    sweden
    Posts
    646
    Mentioned
    2 Post(s)
    Tagged
    0 Thread(s)
    And what is ffmpeg doing? Is that something I can use on my server and do with an uploaded file while the user is still logged in? Or what?
    But uploading the complete file is no problem, since I want a full length audio track is also supposed to be uploaded. The 30 sec sample is just a teaser.

  4. #4
    Barefoot on the Moon! silver trophy Force Flow's Avatar
    Join Date
    Jul 2003
    Location
    Northeastern USA
    Posts
    4,606
    Mentioned
    56 Post(s)
    Tagged
    1 Thread(s)
    ffmpeg is a command-line program that processes and manipulates audio and video.

    A quick search pulls up various threads on how to write a command to fade in and out, but there's some debate on if this actually affects audio volume or not.
    Visit The Blog | Follow On Twitter
    301tool 1.1.5 - URL redirector & shortener (PHP/MySQL)
    Can be hosted on and utilize your own domain


Bookmarks

Posting Permissions

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