Beefy Boxes and Bandwidth Generously Provided by pair Networks
Do you know where your variables are?

(OT) Stream MP3 but prevent user from downloading

by boboson (Monk)
on Feb 24, 2006 at 10:43 UTC ( #532509=perlquestion: print w/replies, xml ) Need Help??
boboson has asked for the wisdom of the Perl Monks concerning the following question:

I am building a site similar to The users should be able to upload MP3 files and set if the file only can be streamed or streamed and downloaded.

Visitors to the site don't have to login to listen to music. They should be able to stream/download these MP3 songs depending on the users settings.

Ofcourse, I will not have a download link if the song can't be downloaded, but this is not enough to protect the songs from being downloaded. Depending on what player I am using there are several ways of knowing the MP3 file location. The easiest way is to use a tool like IEwatch to se all the traffic from server to client while you stream the song and then just use that to download the song.

Using the Flash Media Server might be able to prevent this somehow, but that media is way to expensive.

Is there any way I can prevent this or is this the wrong forum?

My plans regarding OS/Web server is
Website on Apache and Windows Media Server as streaming server.
Is it reliable to stream from the Apache webserver if there are thousands of concurrent users? Or do I need to use WMS, FMS or other?

2006-02-25 Retitled by g0n, as per Monastery guidelines
Original title: 'Stream MP3 but prevent user from downloading'

  • Comment on (OT) Stream MP3 but prevent user from downloading

Replies are listed 'Best First'.
Re: (OT) Stream MP3 but prevent user from downloading
by jonadab (Parson) on Feb 24, 2006 at 13:04 UTC

    Fundamentally, the difference between streaming and downloading is one of interface and client-side behavior, not transmission. In order for the user to be able to listen to a streamed file, a full copy of it (if they listen all the way through to the end) is transmitted from the server to the client. A client that is designed just to listen to streams and not download can throw away the parts that have already been heard, but you can't directly control that on the server end. All you control there is what is sent, and you've got to send everything you want the user to hear.

    It sounds to me like what you're really asking for is DRM, but that is not a feature of how the files are transmitted, but rather of the format they are in. .mp3 by itself has no such protections as far as I am aware, so using just that you cannot do what you want. Wrapping .mp3 in some kind of encrypted protection format *might* do what you want; encoding them in a DRM-enabled format in the first place is *more* likely to do what you want. An unauthorized client cannot then read the file at all (to listen _or_ to download), unless the DRM scheme is broken, so then you have a measure of control over the client.

    And yeah, this is definitely the wrong forum. You could implement the server side in mod_perl, or in something else, and it won't change the characteristics of the situation.

    Sanity? Oh, yeah, I've got all kinds of sanity. In fact, I've developed whole new kinds of sanity. Why, I've got so much sanity it's driving me crazy.
Re: (OT) Stream MP3 but prevent user from downloading
by thor (Priest) on Feb 24, 2006 at 12:13 UTC
    Anything that you implement will be akin to the copy-protection on DVDs: it will prevent the casual user from getting a copy, but anyone who has the technical savy will. The fact of the matter is that you're sending a stream of 1's and 0's that represent an mp3. There's nothing that prevents someone from just saving those 1's and 0's to her hard drive for future use.


    The only easy day was yesterday

Re: (OT) Stream MP3 but prevent user from downloading
by marto (Bishop) on Feb 24, 2006 at 10:56 UTC

    You have not told us which OS / Web server you are using.
    Take a look at Apache::MP3, if you had each user uploading to a unique directory you could use the Per-directory configuration variables to allow or deny downloading / streaming of the mp3 files.

    zentra has done some great work with Perl regards creating flash with audio that you could look at also.

    Hope this helps.

Re: (OT) Stream MP3 but prevent user from downloading
by zentara (Archbishop) on Feb 24, 2006 at 13:34 UTC
    Yeah, on linux with an SBLive soundcard ( and most others I presume), you can record whatever the /dev/dsp is playing. Does that count as a "download"? Supreme Court, here we come. This will allow people to get around the DRM laws they are setting up, because you are claiming to be an streaming internet radio station, and just like you can legally record whatever is on the radio waves, you should be able to legally record any internet radio stream.

    I'm not really a human, but I play one on earth. flash japh

Log In?

What's my password?
Create A New User
Node Status?
node history
Node Type: perlquestion [id://532509]
Approved by ikegami
and all is quiet...

How do I use this? | Other CB clients
Other Users?
Others romping around the Monastery: (2)
As of 2018-01-24 06:06 GMT
Find Nodes?
    Voting Booth?
    How did you see in the new year?

    Results (255 votes). Check out past polls.