Current location: Hot Scripts Forums » General Community » The Lounge » how to protect live streaming video???


how to protect live streaming video???

Reply
  #1 (permalink)  
Old 06-03-09, 04:29 PM
exdesi exdesi is offline
New Member
 
Join Date: Jun 2009
Posts: 3
Thanks: 0
Thanked 0 Times in 0 Posts
how to protect live streaming video???

Hello

i have a website where i run my streams for cricket matches live so lot of peoples stoles my video link and leech it to other website so my server goes down please give me the script which i can put on my page that only on my website can play that links, not even in windows media player.restrict right click and also the copying of link
the stream is in Windows Media Format

help Plz Thanks very much.
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiShare on FacebookShare on Stumble UponShare on Twitter
Reply With Quote
  #2 (permalink)  
Old 06-04-09, 05:58 AM
bizzar528's Avatar
bizzar528 bizzar528 is offline
Community Liaison
 
Join Date: Sep 2004
Location: Pennsylvania, US
Posts: 1,551
Thanks: 2
Thanked 16 Times in 15 Posts
I might be able to help, can you post a sample url to a feed? I've modified an anti-leech script to pass the content through to the media player. I'm just curious if it'll do streaming stuff too.
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiShare on FacebookShare on Stumble UponShare on Twitter
Reply With Quote
  #3 (permalink)  
Old 06-04-09, 10:05 AM
exdesi exdesi is offline
New Member
 
Join Date: Jun 2009
Posts: 3
Thanks: 0
Thanked 0 Times in 0 Posts
Quote:
Originally Posted by bizzar528 View Post
I might be able to help, can you post a sample url to a feed? I've modified an anti-leech script to pass the content through to the media player. I'm just curious if it'll do streaming stuff too.
http://174.139.248.92/atnlq

this is link this only work on website page not even in windows media player....
i want to do like this....
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiShare on FacebookShare on Stumble UponShare on Twitter
Reply With Quote
  #4 (permalink)  
Old 06-12-09, 05:30 AM
Hsekhar Hsekhar is offline
Newbie Coder
 
Join Date: Feb 2009
Posts: 20
Thanks: 0
Thanked 0 Times in 0 Posts
Quote:
Originally Posted by exdesi View Post
Hello

i have a website where i run my streams for cricket matches live so lot of peoples stoles my video link and leech it to other website so my server goes down please give me the script which i can put on my page that only on my website can play that links, not even in windows media player.restrict right click and also the copying of link
the stream is in Windows Media Format

help Plz Thanks very much.
I guess that would cost you a good amount of money since you need to hire a coding guru to get it done for you. Scripts like them may not be available free.
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiShare on FacebookShare on Stumble UponShare on Twitter
Reply With Quote
  #5 (permalink)  
Old 06-24-09, 09:11 AM
UberStreaming-Chris UberStreaming-Chris is offline
Disabled
 
Join Date: Jun 2009
Posts: 8
Thanks: 0
Thanked 0 Times in 0 Posts
It isn't easy to protect live streaming video. Try hiring someone who is really an expert in making such scripts.
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiShare on FacebookShare on Stumble UponShare on Twitter
Reply With Quote
  #6 (permalink)  
Old 07-01-09, 09:20 AM
aliester aliester is offline
New Member
 
Join Date: Jul 2009
Location: India,Nagpur
Posts: 2
Thanks: 0
Thanked 0 Times in 0 Posts
As we can understand, the main problem for you is not that users are able to see the direct link but the fact that users are using the direct link to download your videos. If yes, then did you try to implement the above solution?
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiShare on FacebookShare on Stumble UponShare on Twitter
Reply With Quote
  #7 (permalink)  
Old 07-01-09, 10:51 AM
Boraan's Avatar
Boraan Boraan is offline
Coding Addict
 
Join Date: Jul 2007
Location: Clayton, NC
Posts: 292
Thanks: 0
Thanked 1 Time in 1 Post
there is nothing you can do about temporary caches, but you can "wrap" it so to speak. limit the information to something like an id.

for example. a database named profiles with a table called videos. The goal would be wrap the video and serve it from a protected source.

serve.cgi would get the information including the real url and serve that file on the page. Furthermore you could put the cgi in a frame and neatly disable things like left clicking on the form. Here's an example.

Database setup:
id (auto_increment)
name (name of the link)
destination (shortname for the video or live stream url)

Code:
#!/usr/bin/perl
print "Content-type:text/html\n\n";

# use custom header (see sub header below to modify)
&header;

# Get standard input and form data.
read(STDIN, $buffer, $ENV{'CONTENT_LENGTH'});
@pairs = split(/&/, $buffer);
foreach $pair (@pairs) {
($name, $value) = split(/=/, $pair);
$value =~ tr/+/ /;
$value =~ s/%([a-fA-F0-9][a-fA-F0-9])/pack("C", hex($1))/eg;
$FORM{$name} = $value;
}

# Declare variables
my $vid = "$FORM{id}";

# If the id is blank kick an error.
if ($vid eq "") {
print <<EndError;
<p>Invalid video error. Click <a href="http://www.yoursite.com/">here</a> to return.
EndError
exit;
}

# Connect to the database.
$dbh = DBI->connect("dbi:mysql:profiles", "root", "password", { RaiseError => 1, AutoCommit => 1 }) or &dienice("Can't connect to database: $DBI::errstr");

# Select the information from the database.
$sth = $dbh->prepare("select * from videos where id=?") or &dbdie;
$rv = $sth->execute($vid);
$f = $sth->fetchrow_hashref;

# Define database variables.
my $vname = "$f->{name};
my $vdest = "$f->{destination};

# If the video id is invalid in the database, the subroutine &dbdie will print that error
# in a friendly way to the screen, otherwise it will continue to run the script.

## BEGIN PRINT VIDEO TO SCREEN ##
## Input your video code here. It will print to the screen and display ##
## Basically put the code to your video player and use $vdest           ##
## where you would normally put the stream url                                   ##

# For example if you're using windows media player.
print <<EndVideo;

<OBJECT ID="MediaPlayer" WIDTH="192" HEIGHT="190" CLASSID="CLSID:22D6F312-B0F6-11D0-94AB-0080C74C7E95"
STANDBY="Loading Windows Media Player components..." TYPE="application/x-oleobject">
<PARAM NAME="FileName" VALUE="$vname">
<PARAM name="ShowControls" VALUE="true">
<param name="ShowStatusBar" value="false">
<PARAM name="ShowDisplay" VALUE="false">
<PARAM name="autostart" VALUE="false">
<EMBED TYPE="application/x-mplayer2" SRC="$vdest" NAME="MediaPlayer"
WIDTH="192" HEIGHT="190" ShowControls="1" ShowStatusBar="0" ShowDisplay="0" autostart="0"> </EMBED>
</OBJECT>

EndVideo

## END PRINT VIDEO TO SCREEN ##

# print custom footer (see sub footer below)
&footer;

# dbdie and dienice subroutines
sub dienice {
    my($msg) = @_;
    my($user, $pass, $pid);
    print qq($msg\n);
    exit;
}

sub dbdie {
    my($package, $filename, $line) = caller;
    my($errmsg) = "Database error: $DBI::errstr<br>\n called from $package 
    $filename line $line";
    &dienice($errmsg);
}

# Page header
sub header {
print <<EndHeader;
<html>
<head>
<title></title>
<script language="JavaScript">
if (document.all) {
//IE 5.+
document.oncontextmenu =
	function () {
	return false;
	};
document.onkeydown =
	function () {
		if ((window.event.keyCode == 78 && window.event.ctrlKey == true) || window.event.keyCode == 93) {
	 	window.event.keyCode = 0;
	 	window.event.cancelBubble = true;
	 	window.event.returnValue = false;
	 	return false;
	 	}
	};
} else if (document.layers) {	 		
//NS 4.x
document.captureEvents(Event.MOUSEDOWN);
document.onmousedown =
	function (evt) {
	 	if (evt.which == 3)
	 	return false;
	 	};
} else if (parseInt(navigator.appVersion) >= 5 && navigator.appName == "Netscape") {
//NS 6.+
document.oncontextmenu =
	function () {
	return false;
	};
}

function chloc(x,y){
setCookie('chlocal', 'true');
temp = x + ".shtml"
	if (y){
		temp = temp + y
	}
document.location = temp;
delCookie('chlocal');
}

function getCookie(NameOfCookie)
{
if (document.cookie.length > 0) 
{ 
begin = document.cookie.indexOf(NameOfCookie+"="); 
if (begin != -1) // Note: != means "is not equal to"
{ 
begin += NameOfCookie.length+1; 
end = document.cookie.indexOf(";", begin);
if (end == -1) end = document.cookie.length;
return unescape(document.cookie.substring(begin, end)); } 
}
return null; 
}

function setCookie(NameOfCookie, value, expiredays) 
{
var ExpireDate = new Date ();
ExpireDate.setTime(ExpireDate.getTime() + (expiredays * 24 * 3600 * 1000));
document.cookie = NameOfCookie + "=" + escape(value) + 
((expiredays == null) ? "" : "; expires=" + ExpireDate.toGMTString());
}

function delCookie (NameOfCookie) 
{
if (getCookie(NameOfCookie)) {
document.cookie = NameOfCookie + "=" +
"; expires="+ new Date();
}
}
</script>
</head>
<body>
}

sub footer {
</body>
</html>
}
That code there should work nicely. The javascript in the sub header will disable right clicking. You can add meta's for expiration and no-caching as well to stop most browsers (especially IE) from storing the generated page in the history.

So when you have a new video, just add it to the database and link to it on your pages via the serve.cgi. http://174.139.248.92/atnlq would become. http://yoursite.com/cgi-bin/serve.cgi?id=1 and so on.

Edit: if you are gonna use that script it must be in a script enabled directory like cgi-bin and permissions (chmod) to 755.
__________________
Dexter Nelson
Techdex Development & Solutions
========================
Internet Marketing For Programmers | Free Market Research in 15 Minutes or Less
My Software: Hotscripts Softpedia software.techdex.net

Last edited by Boraan; 07-01-09 at 10:54 AM. Reason: one more note
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiShare on FacebookShare on Stumble UponShare on Twitter
Reply With Quote
  #8 (permalink)  
Old 07-04-09, 11:12 AM
digioz's Avatar
digioz digioz is offline
Community VIP
 
Join Date: Oct 2003
Location: Chicago, IL
Posts: 2,167
Thanks: 3
Thanked 8 Times in 8 Posts
What I have done in the past to prevent this from happening is to place the videos outside of the web directory (wwwroot or htdocs or public_html), and then write code to read and show the video for the user from that outside directory only if they are logged in.

I actually have the code for both PHP and ASP.NET. Let me know if either of those two would help you and I will be happy to post what I have for you.

Pete
__________________
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiShare on FacebookShare on Stumble UponShare on Twitter
Reply With Quote
  #9 (permalink)  
Old 07-06-09, 11:19 PM
End User's Avatar
End User End User is offline
Level II Curmudgeon
 
Join Date: Dec 2004
Posts: 3,027
Thanks: 14
Thanked 35 Times in 33 Posts
Quote:
Originally Posted by digioz View Post
What I have done in the past to prevent this from happening is to place the videos outside of the web directory (wwwroot or htdocs or public_html), and then write code to read and show the video for the user from that outside directory only if they are logged in.

I actually have the code for both PHP and ASP.NET. Let me know if either of those two would help you and I will be happy to post what I have for you.
I'd be interested in the PHP code, if you don't mind sharing.
__________________
I don't live on the edge, but sometimes I go there to visit.
-------------------------------------------------------------------------
Sanitize Your Data | Oracle Date & Substring Functions | Code Snippet Library | [url=http://www.codmb.com/Call Of Duty[/url]
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiShare on FacebookShare on Stumble UponShare on Twitter
Reply With Quote
Reply

Bookmarks

Tags
protect live streaming


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On

Forum Jump


All times are GMT -5. The time now is 02:03 PM.
vBulletin® Copyright ©2000 - 2012, Jelsoft Enterprises Ltd.