This isn't my area of expertise at all, so I was wondering if anyone could point me in the right direction for streaming a sound clip from a web page.
The main restriction is that it can't be easily saveable.
(So direct .wav's or whatever playing is out.).One suggestion i've had is using some sort of flash streaming.
What other options are there?This will ideally 开发者_开发百科be running on a .net platform, but any option is available, as long as it works securely.
Note: If videos can be done too, extra credit will be received from my user.
Whatever you come up with, it will in the end always be 'downloadable'. Since it is playing on the users speakers, the user can have a special driver which instead of playing, saves it directly to the harddisk
Much like with cryptography, any solution you try to create for yourself will probably be wrong. Microsoft Media Player has some DRM solutions that will at least somewhat make audio undownloadable, though I don't have any knowledge of how reliable they are. Look into the Windows Media Server and/or some sort of WMP SDK, that's probably the best place to start.
That's assuming you're on IIS. I don't know what you'd do on LAMP.
I once set up a site to play some .mp3 audio (via a small flash app). You could, of course, see in the code where to download the files directly, so I created a php script that would stream the contents of the files and made the audio file unreadable to the public. This made them available to listen to, but not to download directly.
Even after all this, the audio files still end up in your browser cache, and the right sort of drivers will simply record the audio. You can see all this in action here: http://carbondanger.org/sound_FX.html
In the end I went for using a flash player, which fitted my requirements well enough that my client is happy.
I followed this blog: http://www.longtailvideo.com/support/tutorials/Embedding-Flash
Blah! DRM is a nightmare to implement. You really need to be dedicated to the requirement. Increased cost, hassle, development, maintenance and user pain. Yuck.
I'd suggest taking the simplest route: Any server focused on a UDP-based streaming protocol, like Flash Media Server. (Or Wowza.) (Or Red5.) That will get you video hand-in-hand with audio only streaming. While technically possible to 'rip' content from a UDP-based protocol, it's not trivially easy like with HTTP-based delivery.
If you are sending this content over HTTP, no matter the obfuscation trickery involved, somebody is probably going to figure it out.
You just can't do that.
How do you want that sound/video from your web-site will transfer to the client computer? right, downloading. even if the user dont have an option to download via the standard web-browser, the user can use many tools to download it anyway. An HTTP Sniffer will do the job in most cases, or else if the protocol is not regular HTTP the user can use generic-sniffer to catch the data. there also downloaders for well-known streaming protocols (e.g. MMS).
Even if you encrypt the sound/video data on the wire, or using DRM, the sound is still getting the user's sound card, and therefore can be simply recorded "as is" and saved as a file without significant quality change. In similar way, the video getting the user's display device and therefore can be also recorder, but recording video is much more pain and quality-loss.
The bottom line is - you can't protect sound/video. If you dont want the sound/video to be copied, dont distribute it. no matter what method you will choose, people will find a way to download it.
精彩评论