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.

In reply to Re: (OT) Stream MP3 but prevent user from downloading by jonadab
in thread (OT) Stream MP3 but prevent user from downloading by boboson

Title:
Use:  <p> text here (a paragraph) </p>
and:  <code> code here </code>
to format your post, it's "PerlMonks-approved HTML":



  • Posts are HTML formatted. Put <p> </p> tags around your paragraphs. Put <code> </code> tags around your code and data!
  • Titles consisting of a single word are discouraged, and in most cases are disallowed outright.
  • Read Where should I post X? if you're not absolutely sure you're posting in the right place.
  • Please read these before you post! —
  • Posts may use any of the Perl Monks Approved HTML tags:
    a, abbr, b, big, blockquote, br, caption, center, col, colgroup, dd, del, details, div, dl, dt, em, font, h1, h2, h3, h4, h5, h6, hr, i, ins, li, ol, p, pre, readmore, small, span, spoiler, strike, strong, sub, summary, sup, table, tbody, td, tfoot, th, thead, tr, tt, u, ul, wbr
  • You may need to use entities for some characters, as follows. (Exception: Within code tags, you can put the characters literally.)
            For:     Use:
    & &amp;
    < &lt;
    > &gt;
    [ &#91;
    ] &#93;
  • Link using PerlMonks shortcuts! What shortcuts can I use for linking?
  • See Writeup Formatting Tips and other pages linked from there for more info.