1

I used the following tutorial flow player secure streaming with Apache , the problem i am facing now is only certain mp4 files can be played. i am new to flow player and i searched Google for this problem and have no solution to my problem.

i checked uploading a file that is of 50 mb , it works fine , but when the same video file of 67 mb failed to play … please any help regarding this will be grateful, any particular reason why the player fails to play ?

my code is as follows file upload.php page

<?php
$videofilename = $name;
$hash = md5('1234');
$timestamp = time();
$videoPath = $hash.'/'.$timestamp.'/'.$videofilename;
$baseUrl = “uploads/”;
$videoPath = $baseUrl. $videoPath ;
echo $videoPath;
echo“<script src='scripts/flowplayer-3.1.4.min.js' type='text/javascript'></script> ”;
echo “<a href='$videoPath' style='display:block; width:400px; height:300px;' id='player'></a>”;
echo“<script language='javascript'>
flowplayer('player', ‘swf/flowplayer-3.1.5.swf’);
</script>”;
?>

video.php inside uploads folder

<?php
$hash = $_GET['h'];
$streamname = $_GET['v'];
$originaltimestamp = $_GET['t'];
header('Content-Description: File Transfer');
header('Content-type: video/mp4');
header(“Content-length: ” . filesize($streamname));
header(“Expires: 0”);
header(“Content-Transfer-Encoding: binary”);
$file = fopen($streamname, ‘r’);
echo streamgetcontents($file);
fclose($file);
?>

.htaccess inside uploads folder

RewriteEngine on
RewriteRule ^(.)/(.)/(.*)$ 127.0.0.1/…/video.php?h=$1&t=$2&v=$3
RewriteRule ^$ – [F]
RewriteRule ^[^/]+\.(mov|mp4|flv)$ – [F]

I have no much information about .htaccess, just know that it is used to restrict access to the uploads folder . And the video.php is called by the fileuload.php pages href tag.

I get the following error 200, stream not found,NetStream.Play.StreamNotFound,clip:'[Clip] "path of video file"

Community
  • 1
  • 1
user3734861
  • 21
  • 1
  • 8

0 Answers0