SitePoint Sponsor

User Tag List

Results 1 to 3 of 3
  1. #1
    SitePoint Member
    Join Date
    Mar 2013
    0 Post(s)
    0 Thread(s)

    Stream mp3 but block direct download

    Hi, I have searched but not yet come across any real solution...I've got a page on one of my sites where I'd like to sell some of my own music via mp3 download. The download part is just fine and there's no problem with actually selling the files. But since they're music files, I really wanted to have a streaming version available so that people can hear the song before they buy it.

    Unfortunately, I can't figure out how to offer a preview without allowing folks to just view the source code, follow the link directly to the file and download it from there. Locking/password protecting the directory doesn't work, since people are then prompted for login info when they click the play button.

    It seems like a contradiction so maybe it's just not doable, but is there a way to allow the link to be used on the site (ie. call up the URL to play there on the page) but not allow it to be downloaded if someone tries to access the full path in their own browser? Or is there a way to mask the link being used? I've seen this question around a lot but I haven't seen a useable answer yet. The alternative would be to upload a short clip of the song for preview purposes but that's quite a bit of extra work and I was hoping to allow visitors to hear the whole song online if they wanted to.

    Any suggestions? Thanks!

  2. #2
    Community Advisor silver trophy

    Join Date
    Nov 2006
    40 Post(s)
    1 Thread(s)
    Most online music download shops I'm familiar with have a preview clip that doesn't include the entire track, and is also encoded at a fairly low bitrate so the quality is compromised to a certain extent. You can automate batch conversion of full quality clips to preview clips using ffmpeg or sox or similar utility.

  3. #3
    SitePoint Addict bronze trophy vectorialpx's Avatar
    Join Date
    Dec 2012
    8 Post(s)
    0 Thread(s)
    Another solution is to add a "watermark" (as Envato does) so, every [x] seconds add over the original sound a voice like "Copyrighted by rsny".
    This will make the sound unusable.

    Every resource that you give to the user, can be downloaded.
    If it gets into the browser, the user can download it (with tools or from the temp directory).
    Be nice to nerds. Chances are you'll end up working for one - Bill Gates
    > photos | admin panel


Posting Permissions

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