Lorenzo Benjamin of xmoov.com has taken the PHP approach to the next level and added a bunch of nice features to it. He's also providing a productized offering around it which add some real value to anyone who's looking for a turn key solution. He's also followed my example and open sourced his PHP code. Nice job Lorenzo. I've seen other 'companies' take the code I posted and use it for commerical purposes without as much as an attribution, let alone posting their modified sources.
It's therefore even better to see all the efforts that people are putting into this concept, posting their findings, sharing their code and writing about their experiences. It also shows a clear need for a low cost streaming video platform for Flash video.

I've been working with this concept (... are you the originator of the idea?)... and have run into some bugs with Win2K IE6 and WinXP IE7 - using multiple NetStream objects causes IE to not be able to connect to the streaming server any more if window of the player is closed. Do you know anything about this?
At the risk of going on a rabbit trail - what's your take on open source vs closed source commercial? Thoughts on open-source commercial?
Regards, and thanks for the awesome resources on your website!
The zip with sources on their page is not working.
I hope they just uploaded the files in ASCII mode.
Sorry to hear that
I zipped the files with a mac, maybe there are compatibility problems? I sure hope not! The Fla source will only be available here as soon as it is posted.
http://flashcomguru.com/downloads/phpstream_update...
am I wrong when I use this script to skip the first (for example) 50 seconds of a flv-file?
but this script only works with bytes and therefore very probably starts in the middle of a sequence and therefore delivers a corrupt flv-file.
how can i jump to a time-position in an flv-file?
xmoov.php?file=video.flv&position=0
did you use the latest package with the flashcomguru example player?
I'm just curious and also would like to know "How to use xmoov-php with JW FLV Player?"... It was mentioned that xmoov-php is compatible with JW FLV Player but I was so unfortunate to find any information on how to do this.
xmoov.php?file=video.flv&position=0
And all I get is a Download Dialog, I cannot see any player. Can anyone point me to a documentation how to use xmoov-php? Please?
Best regards
The download package is almost plug-and-play. you must publish the FLA, upload the files to your server and call the html document produced while publishing.
if it is not working meaning you see the "buffering" text forever, then try:
xmoov.php?file=video.flv&position=0
to see if the php posts any errors.
- Any news on this?
I do use the latest package, but I do not know what you mean by the flashcomguru example player. I used the JW FLV Player.
It works when I use position 0, but it does not deliver me any working data as soon as is set position > 0. I even tried other programs to play the generate flv and did not get it playing.
It is hard for me to imaging, that I do get a working file, if I just jump into that file at a random position and start playing (this is approximately what the program does, right?)
I think I am waiting eagerly for the implementation of the xmoov-php with the JW FLV Player.
best regards
Knowing that apache is set by default to handle a maximum of 256 concurrent clients, the scalability of php as streaming engine on the same server as the web application is quit limited, not to mention that HTTP is not very efficient to transfer streaming data...
Clearly this trick is usefull as is for not too visited websites
tested on mac (safari/firefox) and it played at once, no bs
btw, thanx 4 the advice gaouzief
in order for this system to work you need to know the bytes at a given time within the FLV. FLVMDI injects this info; as far as I know it does not add new keyframes but merely indexes existing ones. So in essence I think flvmdi does exactly what you would want it to do.
Thanks very much! What you're saying was what I was hoping was true. It was confusing to me, though -- I wonder why FLVMDI seems to provide access to keyframe indexing only if you choose the Data Injection option, not if you choose "Extra Metadata -- No injection." It seems as if it *is* only extracting metadata. Or maybe I'm confused about what the concept of "injection" is.
the actual and primary feature of flvmdi is to inject metadata into flvs. It is needed as many encoders used to and some still are injecting the wrong metadata (like width, height, duration etc) during the encode. FLVMDI was one way of fixing that. The keyframe indexing was added later and specifically to support this PHP approach. Hope this helps.
I have a question- I'm going to be converting my site from using WMV files to FLV so that I can have seeking ability.
I will have to go back and re-render all my movies files as FLV.
My question is this- since I will be having to go back and re-render my files to FLV format, is there a program I can use that will properly inject the keyframe data during the original render
or do I *HAVE* to inject the data using FLVMDI after I have created the FLV files using another program?
you will have to use something like FLVMDI. But that's no big deal as it can process a whole folder for you in one batch I believe.
I watched your video on how to use FLVMDI and it seems very fast, so it won't be a time consuming task.
Can it process files that are inside subfolders? As my movie files all need to have the same name, but I can put them in individual folders inside one main folder.
all I get is a download popup box am I doing something wrong ?
No readme, nothing to help. By Lorenzo:
"The download package is almost plug-and-play. you must publish the FLA, upload the files to your server and call the html document produced while publishing."
Explain me that part: "publish the FLA".
eh?
Thanks.
Well we already have the .FLV with the keyframes, do we really need to use Flash to "publish" FLA files we don't have?
I actually did that but I am runing php on windows.
I downloaded the phpstream_update.zip file and extracted it a folder named streaming but I am stock from that point.
When I try http://localhost/streaming/xmoov.php?file=golfers.... I get nothing only errors, here is what I get.
ERROR: xmoov-php could not find (' . $fileName . ') please check your settings.'); exit(); } if(file_exists($file) && strrchr($fileName, '.') == '.flv' && strlen($fileName) > 2 && !eregi(basename($_SERVER['PHP_SELF']), $fileName) && ereg('^[^./][^/]*$', $fileName)) { $fh = fopen($file, 'rb') or die ('ERROR: xmoov-php could not open (' . $fileName . ')'); $fileSize = filesize($file) - (($seekPos > 0) ? $seekPos + 1 : 0); // SEND HEADERS if(!XMOOV_CONF_ALLOW_FILE_CACHE) { # prohibit caching (different methods for different clients) session_cache_limiter("nocache"); header("Expires: Thu, 19 Nov 1981 08:52:00 GMT"); header("Last-Modified: " . gmdate("D, d M Y H:i:s") . " GMT"); header("Cache-Control: no-store, no-cache, must-revalidate, post-check=0, pre-check=0"); header("Pragma: no-cache"); } # content headers header("Content-Type: video/x-flv"); header("Content-Disposition: attachment; filename=\"" . $fileName . "\""); header("Content-Length: " . $fileSize); # FLV file format header if($seekPos != 0) { print('FLV'); print(pack('C', 1)); print(pack('C', 1)); print(pack('N', 9)); print(pack('N', 9)); } # seek to requested file position fseek($fh, $seekPos); # output file while(!feof($fh)) { # use bandwidth limiting - by Terry if(XMOOV_CONF_LIMIT_BANDWIDTH) { # get start time list($usec, $sec) = explode(' ', microtime()); $time_start = ((float)$usec + (float)$sec); # output packet print(fread($fh, $packet_size)); # get end time list($usec, $sec) = explode(' ', microtime()); $time_stop = ((float)$usec + (float)$sec); # wait if output is slower than $packet_interval $time_difference = $time_stop - $time_start; if($time_difference < (float)$packet_interval) { usleep((float)$packet_interval * 1000000 - (float)$time_difference * 1000000); } } else { # output file without bandwidth limiting print(fread($fh, filesize($file))); } } } } ?>
I think the problem is when setting the XMOOV_PATH_ROOT path I am using 'C:/wamp/www/streaming/' but not sure if this is good. Please lets create this step by step doc so all of we can clear our inqueries.
Thanks all for helping people like me to start video streaming, and I sure if we have this step by step a lot of people will come and use it.
:)
The popup box asking to download the file.
So any one can send a step by step to post it here to benefit all of us.
Thanks!!!!
YOU MUST PUBLISH THE FLA WITH FLASH 8 or above, upload the files to your server and call the html document produced while publishing.
if it is not working meaning you see the "buffering" text forever, THEN TRY :
xmoov.php?file=video.flv&position=0
to see if the php posts any errors.
THIS IS ONLY TO MAKE SURE XMOOV-PHP IS ACCESSING THE VIDEO FILE ON YOUR SERVER!
the html document you PUBLISH WITH FLASH 8 or above holds the player.
hope this helps.
the path to you video files are relative from the location of xmoov-php:
use "../" to access a folder one level above the location of xmoov-php.
so if the location of xmoov-php is:
http://mysite.com/scripts/video/xmoov.php
and the video files are located:
http://mysite.com/video_files/
xmoov-php should look like this
define('XMOOV_PATH_ROOT', '../../');
define('XMOOV_PATH_FILES', 'video_files/');
this way you could host your video files outside of the server root forcing every file through xmoov-php. since there is no direct access to the video you could implement tracking and logging scripts into xmoov-php.
You are the man ;)
before publishing the FLA file, should I change the actionscript ? in the script i saw:
var domain:String = "http://www.yourdomain.com";
var bandwidth = "mid"; //low, mid or high
var _vidName:String = "golfers.flv";
var _vidURL:String = domain + "/" + _vidName;
var _phpURL:String = domain + "/xmoov.php";
does it mean that it only access golfers.flv on the yourdomain.com ? should i change it or not ? because when i try xmoov.php?file=golfers.flv&position=0 the php files stream down the binary file and no error found.
i'm waiting for the further instructions thx.
if so how can i do that ? because when i use FlashVars the swf player still showing looping buffer text...
that is actually the most basic of flash knowledge. i see this is attracting quite a novice crowd which i think is great. i just don't think the package is very novice friendly the way it is as it was brought on by a crowd of nerds (sorry guys ;-) the next package version will keep you guys in mind though. but i would also like to encourage the thorough reading of the other entries including the original posting by Stefan Richter that kicked this whole thing off. you can find many answers to ->repeated :-) questions.
now to your question:
yes you can also set the video dynamically using a flashvar BUT you must remove the variable from the FLA. an internal variable will always override a flashvar and this is a good thing!
set a flashvar: _vidName=anotherVideo.flv and it will work. let us know how it goes.
Nice work, is it possible to make it auto play on the first time you load your website? Because my lack of knowledge in actionscript, been tried couple time and no progress what so ever.
Thanks for any reply.
I'm trying to modify actionscript to reach a precise point in the flv when I click on a button (and restart loading from that point). It's the same of when you drag the cursor but from a link.
Is it possible?
I tried with this code on a button:
on (press) {
ns.seek(10);
}
to start from the 10
I'm trying to modify actionscript to reach a precise point in the flv when I click on a button (and restart loading from that point). It's the same of when you drag the cursor but from a link.
Is it possible?
I tried with this code on a button:
on (press) {
ns.seek(10);
}
to start from the 10 second, but it goes there only when the loading has reached that point..
Thanks in advance for your help
Giuseppe
I have developed a player using XMOOV.php.
Actually i didn't change the php.The player is able to seek to any position in the cached file and it can start caching anywhere from the file.I have uploaded it in my blog.
http://logicmania-lab.blogspot.com/2008/01/flash-f...
visit this link to download the files
please let me know your suggestions and comments.
I AM NEW AND DONT KNOW HOW TO USE IT. HOW TO CREATE A PLAYER.
PLEASE HELP ME conctact : globalprompt@gmail.com
THanks
any idea ?
thanks
kavia
thanks
I am new to this and your help is much apprfeciated
Thanks for response. I know I am asking very basics becaue media and flash is totally new for me.
Can you please help me to connect FLA, php and publishing part as well and how they work all together. publishing FLA means generating swf file? and how php file gets connected to it?
can you send me link to nay document which can help me to come upto speed on this?
thanks a lot
I got everything working except where to add php file information. I have created actionfile but don't know where to add. When I am trying to add with player it says the actionscript 2 mist be created outside.
please help.
please help.
Is there a workaround for this? Aside from having many, many servers is there a way to use Xmoov when you want to serve many simultaneous connections?
<object classid="clsid:d27cdb6e-ae6d-11cf-96b8-444553540000" codebase="http://fpdownload.macromedia.com/pub/shockwave/cab...=7,0,0,0" width="400" height="300" id="scrubber_flash8" align="middle">
<param name="allowScriptAccess" value="sameDomain" />
<param name="movie" value="scrubber_flash8.swf" />
<param name="FlashVars" value="movname=golfers.flv" />
<param name="quality" value="high" /><param name="bgcolor" value="#ffffff" />
<embed src="scrubber_flash8.swf" FlashVars="movname=golfers.flv" quality="high" bgcolor="#ffffff" width="400" height="300" name="scrubber_flash8" align="middle" allowScriptAccess="sameDomain" type="application/x-shockwave-flash" pluginspage="http://www.macromedia.com/go/getflashplayer" />
</object>
In the Action Script I have the following
var _vidName:String = _level0.movname;
During Debug mode in Flash 8.0 the _vidname remains undefined. I appreciate any assistance.
Is there an AS3.0 version in the works at all?
I'll be working on it over the next week. I'll try to keep you updated.
I want to buy a xmoov license, each email I send I get a reply, but further questions (not available at the official site) I never get a reply.
Not even to the question regarding how to pay.
Is this a product to be sold, or just to make a "show off" and never allow people to buy it? It was gonna be great for my website, but the lack of interest from the authors is going to push me into another product.
Is there a way to get it work with external FLVs? Which means xmoov.php and the player (SWF) are on one Domain (www.server1.de) and the FLV is on another domain (www.server2.com)? At the moment it does not seem to work.
i keep getting the msg 'ERROR: xmoov-php could not find (golfers.flv) please check your settings.'
url: http://127.0.0.1/phpstream_update/xmoov.php?file=g...
video: http://127.0.0.1/phpstream_update/video/golfers.fl...
i have added
//define('XMOOV_PATH_ROOT', 'C:\\Program Files\\EasyPHP 2.0b1\\www');
//define('XMOOV_PATH_ROOT', 'phpstream_update/');
//define('XMOOV_PATH_ROOT', '../../');
define('XMOOV_PATH_ROOT', 'www/');
// points to the folder containing the video files.
define('XMOOV_PATH_FILES', 'phpstream_update/video/');
could anyone help + i updated the fla and puiblished it - looked at the html too - the player appears but no video???
Just as a first check I would put the FLV & Player in the same dir. No need to enter a path then. Now if that works it is worth moving the flv file and testing a new path ;)
define('XMOOV_PATH_ROOT', $_SERVER['DOCUMENT_ROOT'].'/phpstream_update/');
echo XMOOV_PATH_ROOT."<br/>";
// points to the folder containing the video files.
define('XMOOV_PATH_FILES', 'video/');
echo XMOOV_PATH_FILES."<br/>";
i updated the fla file too and published it as flash 8 - now when i load the html - i get a progress bar doing something but i dont get any video - does anyone else get this???
THis is very sad, and the worse part is that I always get late emails telling me to check my spam folder. The truth is that I use a google apis account and the spam folder is with no more than 10 junk emails each day, never from xmoov.
The website is still under construction (how many months?).
SO now a days I am looking for an alternative. If anyone knows another software please let me know.