Skip to main content
November 3, 2006
Question

Can FMS play just part of a long MP3 file without downloading the whole thing?

  • November 3, 2006
  • 3 replies
  • 297 views
The radio station where I work is considering switching from serving our online audio as RealMedia files via a RealMedia server to serving MP3 audio files via the Flash Media Server. We have many (as in thousands) of hour-long audio files where we want the end-user to only listen to a short section of the file, for instance from 50:25 into the file to 55:45 into the file. With Real, it's trivial to do this...just attach a ?start=50:25&end=55:45 query string to the URL of the RealAudio file, and the Real server starts playing at the correct point.

Is this also doable with the Flash Media server using MP3 audio files (not flv files)? Is there a way to stream just a designated portion of an audio MP3, without the user having to download everything from the beginning of the file? This is a real deal breaker for us.
    This topic is closed to new replies. Start a new post to keep the conversation going.

    3 replies

    November 3, 2006
    OK, great. Do you happen to have a pointer (here or in the documentation) to example code for this?
    November 5, 2006
    See the netStream class in the FMS docs (livedocs.macromedia.com). The info you're looking for is in the netStream.play() method.

    FMS deals with time in seconds, so to start playback a minute and a half in, you'd use 90 rather than 1:30
    November 3, 2006
    Yes... FMS can stream an mp3, and the starting point can be anywhere in the file without having to download the whole thing.