I have a number of sound files hosted by a third-party.
I would like to embed these on my site in some kind of player for streaming.
However, I need to hide the source URLs of these files from my users.
The point is to prevent users from discovering information about the third-party services we use, as some of this info is considered proprietary.
There is obviously no way to do this in straight html. Most methods that I have seen of embedding audio would leave URLs easily discoverable by just viewing the page source.
Is there a good way to keep this data hidden?
I would recommend streaming the files from a streaming media server instead of a progressive downloaded file directly from the 3rd party. Look into red5 - opensource media server
Related
Locally, I have developed a music site by means of a WordPress theme, and it's running well. The problem is that once the media file is streaming in the browser, Internet Download Manager(IDM) detects it and generates the download link (That's the nature of IDM) .
So, I want to build my site such that visitors will be able to play and listen to the music, but they are not allowed to download the streaming media by any downloader.
Is there any PHP code, WordPress or jQuery plugin to do this?
Thanks in advance.
If you allow visitors to listen to a file, there is no way to prevent them from downloading it. Even DRM is broken if they are determined enough. If they can play it, they can save it.
That said, you have several options.
Use Flash to stream the file.
It is still pretty easy to download unless the file is embedded in the SWF or uses DRM. This is a common solution, and works well unless you need to support mobile browsers without Flash support.
Only allow one download per IP address.
This has major usability problems and will not work in many browsers. I don't recommend it.
Send the file encrypted and decrypt with Javascript.
Could be very slow, still doesn't stop determined users, depends on Javascript, requires either dataurl support or newer html5 audio apis.
Don't worry about it.
This is what I do.
I have audio files saved in a folder on my server. They are called by JQuery JPlayer to be played. However if a person looks at the source of the page, they can find the location of the file and simply download it. I want to protect the files from being downloadable, but still allow JPlayer to play them. Is this possible?
I have tried denying the folder with .htaccess as well as password protecting the folder, but this prevents JPlayer from being able to play the files.
It's impossible to stop a savvy user stealing your media. But if you like, you could
use oAuth to govern access to the media resource
teach your server to only respond to media requests that contain "special" HTTP Headers, Cookies etc.
use DRM (washes mouth out)
some other URL obfuscating/expiring method you dream up..
To save time, i suggest you accept whatever you publish can be copied / taken. So, why not publish
a sample snippet (e.g. the first minute)
A lower-bitrate / mono taster version
Recently, a widget allowing you to stream Paul McCartney's new album was published in the Guardian.. how this is "secure" i don't know, I opened Chrome Dev Tools Network tab and helped myself to anything "audio/mpeg"!
I found a possible answer for you, using PHP:
Solution using PHP sessions
It's a long thread, but there's code there that will help you.
You should be aware (just in case you're not) that if someone can play the file in their browser, there is nothing to stop them playing the file and using recording software to capture the audio.
We have a video streaming website, and the company decided to make some of the video content paid.
So we built an authenticated area and finalized all the payment issues, and now we are down to the security part.
The videos have a .flv extension, and I want restrict their downloads.
I know restriction is kind of impossible for flash players and flv files, it's a client side issue, but the least to say I want to make it as long and complicated as possible for the videos to download.
There are alot of options for video download so I want a to disable the
Realplayer download,
Chrome and firefox extensions,
and any other way that can easily access the video.
My other option (very hard to go through again) to re-encode the original .mov to some other format that can be a bit more secure.
I am using the open source JWplayer.
I made it with 2 servers in one network. One of them is public server. I wrote small php media proxy, so the links to the media files go trough it (you can now to check where are requests from). The data server (with the media files) is with internal ip(not public) and if someone tries to get the media file directly, will fail.
I think this is good solution if you have own servers.
If you have only one server media proxy is good enough, but can be easly traced from man with good knoledge.
I have several programs linked and hosted on my server. I need to protect the URLs from being stolen and placed on other sites because they'll use my bandwidth.
How can I do that in PHP?
Should I just check referrer or do something else?
If you have the binary files on your server, and someone gets the address, you can't use PHP to prevent them from downloading them. You want to protect them at the web server level. Assuming you're using Apache, looking to doing this with custom .htaccess directives.
This question, involving the direct download of MP4 videos, may point you in the right directions:
Disable hot linking or direct download of my videos and only stream the video when it's displayed from a page in my website
If you don't want them downloaded/stolen, then don't put them on your site.
On the plus side, if they are stolen, then your bandwidth will only get used once. Checking referer is easiest to do, and also easiest to bypass/subvert.
If you're concerned that your server is only hosting the files but users who download it don't see where it comes from, you can do the following:
check for the referrer. This can be fooled, however, if you're concerned about links from forums etc., this is an option.
Basically you're checking if the HTTP referer header is set and matches your site's pattern. If not, you could block the traffic, however, if you actually want to offer downloads, I would not block the user.
Instead you can display a download facade-page with your site design and offering the download then. With some session logic, you can allow users to download files.
This can be done to build a much better hotlinking checker than based on http headers as well.
I have a PHP/AJAX/MYSQL chat application. I want to add video chatting to my application. How can I create live video streaming to be used for live video conferences/chatting in a PHP application. What are the key-terms I need to know if I wanted to build such a system? Is it a good idea in the first place to use PHP? Is there something I'm not thinking about? What other languages can I use, perhaps in conjunction with PHP?
I am not saying that you have to abandon PHP, but you need different technologies here.
Let's start off simple (without Akamai :-)) and think about the implications here. Video, chat, etc. - it's all client-side in the beginning. The user has a webcam, you want to grab the signal somehow and send it to the server. There is no PHP so far.
I know that Flash supports this though (check this tutorial on webcams and flash) so you could use Flash to transport the content to the server. I think if you'll stay with Flash, then Flex (flex and webcam tutorial) is probably a good idea to look into.
So those are just the basics, maybe it gives you an idea of where you need to research because obviously this won't give you a full video chat inside your app yet. For starters, you will need some sort of way to record the streams and re-publish them so others see other people from the chat, etc..
I'm also not sure how much traffic and bandwidth this is gonna consume though and generally, you will need way more than a Stackoverflow question to solve this issue. Best would be to do a full spec of your app and then hire some people to help you build it.
HTH!
Please note that the below described service is no longer available as
it was based on FLV media (Flash)
This project which utilizes the Red5, Flex and PHP for Live Video Streaming and Recording has many features
Stream Live video to the viewers
Record the streams from your cam or other video input devices to the server
Preview the recorded streams and files and thumbnail the frame which you would like to display for the video.
Upload the videos from your computer and convert them to FLV which can be streamed using Red5 .
Choose from any resolutions
Can be plugged to any script
Each website user can have a separate Directory for storing their videos and thumbnails use this link
http://code.google.com/p/red5-flex-streamer/
PHP will let you build the pages of your site that make up your video conferencing and chat applications, but it won't deliver or stream video for you - PHP runs on the server only and renders out HTML to a client browser.
For the video, the first thing you'll need is a live streaming account with someone like akamai or the numerous others in the field. Using this account gives you an ingress point for your video - ie: the server that you will stream your live video up to.
Next, you want to get your video out to the browsers - windows media player, flash or silverlight will let you achieve this - embedding the appropriate control for your chosen technology into your page (using PHP or whatever) and given the address of your live video feed.
PHP (or other scripting language) would be used to build the chat part of the application and bring the whole thing together (the chat and the embedded video player).
Hope this helps.
PHP/AJAX/MySQL will not be enough for creating the live video streaming application There is a similar thread here. It primarily suggests using Flex or Silverlight.
For live video conferencing you can't ignore the need of a streaming server.
Yes, flash will let you display video from a webcam within the local flash control, but that won't let you then send that video over the network - for that you need a streaming server to send it to.
If you're going to build something like this it's prudent to think about how you're going to host the video from a very early stage as it will influence how you build the application. Flash/Flex/Silverlight/Windows Media....etc....
There are a lot of "off-the-shelf" 'servers' that will run in your environment.
Most of these utilize the aforementioned Flex or Silverlight to implement the actual video itself but I'm pretty sure all will run under LAMP/PHP.
The challenges will picking the best software from everything that's available and getting your hosting-provider to let you stream video (it goes without saying that streaming is heavy on bandwidth).
You can easily build a website as per the requirements. PHP will be there to handle the website development part. All the hosting and normal website development will work just as it is. However, for the streaming part, you will have to choose a good streaming service. Whether it is Red5 or Adobe, you can choose from plenty of services.
Choose a service that provides a dedicated storage to get something done right. If you do not know how to configure the server properly, you can just choose a streaming service. Good services often give a CDN that helps broadcast the stream efficiently. Simply launch your website in PHP and embed the YouTube player in the said web page to get it working.
Same problem/answer here, quoted below
I'm assuming you mean that you want to run your own private video
calls, not simply link to Skype calls or similar. You really have 2
options here: host it yourself, or use a hosted solution and integrate
it into your product.
Self-Hosted
----------------- This is messy. This can all be accomplished with PHP, but that is probably not the most advisable solution, as it is
not the best tool for the job on all sides. Flash is much more
efficient at a/v capture and transport on the user end. You can try to
do this without flash, but you will have headaches. HTML5 may make
your life easier, but if you're shooting for maximum compatibility,
flash is the simplest way to go for creating the client. Then, as far
as the actual server side that will relay the audio/video, you could
write a chat server in php, but you're better off using an open source
project, like
janenz00's mention
of red5, that's already built and
interfacing with it through your client (if it doesn't already have
one). Or you could homebrew a flash client as mentioned before and
hook it up to a flash streaming server on both sides...either way it
gets complicated fast, and is beyond my expertise to help you with at
all.
Hosted Service
----------------- All in, my recommendation, unless you want to administer a ridiculous setup of many complex servers and failure
points is to use a hosted service like
UserPlane or similar and offload all the
processing and technical work to people who are good at that, and then
worry about interfacing with their api and getting their client well
integrated into your site. You will be a happier developer if you do.