FlashComGuru Home InfluxisCDNImediaseeUvault
                                                                                       Forum Index | Active Topics | Register
                                                                                                          List Overview | List Archives
                                                                                                                           About this site | Advertise
 

home

Adobe AIR (11)
Applications (40)
Books & Training (11)
Collaboration (18)
Components (10)
Events (80)
Flash Player (35)
Flex (39)
FMS (110)
General (123)
Hosting (6)
Jobs (17)
Off topic (36)
OSMF (3)
Press Releases (23)
Site Check (11)
Tools (53)
Videos & Players (74)

Follow me on Twitter

 
The most popular post by far on my site is the one covering pseudo video streams via PHP. In a nutshell, this method allows you to provide a streaming-like experience to your users without having to deploy a streaming server. This offers the benefits of a low cost architecture using only a webserver which runs PHP or one of the ports that users have posted in the comments, including .NET, ColdFusion and others.

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.

Related Articles

Comments
[Add Comment]
The only thing better would be an AS3 version of the PHP streaming :)
# Posted By Nicolas | 8/14/07 4:02 PM
about time someone broke the monopoly on rich-media-project.com! lousy support and product upgrades.
# Posted By john | 8/15/07 9:32 PM
That is an awesome looking player; very nice.

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!
# Posted By Leo Thiessen | 8/18/07 12:16 AM
thnaks for the comment, as far as open source goes I have no firm stance on that, each to their own. But I do try and share a lot of my work as much as I learn from others. If that's open source then I'm all for it.
# Posted By Stefan | 8/18/07 11:01 AM
Seems like xmoov.com is not wanting to release the modified .FLA of the player.

The zip with sources on their page is not working.

I hope they just uploaded the files in ASCII mode.
# Posted By Peter | 9/2/07 9:29 AM
I have all of xmoov's files and will post them soon.
# Posted By Stefan | 9/2/07 11:39 AM
The files don't work out of the box with most players as it requires the pos= on all calls, including the start of the file. Looking over the php revealed a few little things like that...
# Posted By Sean Moran | 9/3/07 4:44 AM
Hi Peter,
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.
# Posted By Lorenzo | 9/3/07 4:55 AM
the updates sources are now available at
http://flashcomguru.com/downloads/phpstream_update...
# Posted By Stefan | 9/3/07 10:20 AM
hi , i've got a trouble with the .fla , macromediaflash doesn't open the file.
# Posted By youp | 9/3/07 2:24 PM
source now available as flash8 and flash cs file.
# Posted By Lorenzo - xmoov.com | 9/3/07 3:24 PM
maybe I am getting this all wrong, but I tried this script to jump at a random position in the flv-file, but it only delivered corrupt data.

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?
# Posted By Christian | 9/13/07 4:33 PM
the script works fine. you should try entering the http data directly into your browser:

xmoov.php?file=video.flv&position=0

did you use the latest package with the flashcomguru example player?
# Posted By Lorenzo - xmoov.com | 9/13/07 5:51 PM
Greetings!

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.
# Posted By Gerald | 9/15/07 2:37 PM
Oh! One more thing... I downloaded the latest package with the flashcomguru example player, tried on Firefox:

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
# Posted By Gerald | 9/15/07 2:40 PM
@Gerald: there will be more information on implementing xmoov-php with JW FLV Player soon.

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.
# Posted By Lorenzo | 9/18/07 8:22 AM
"there will be more information on implementing xmoov-php with JW FLV Player soon."

- Any news on this?
# Posted By Lumimies | 9/26/07 8:45 AM
sorry for my late reply.

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
# Posted By Christian | 9/27/07 10:03 AM
I tried it with JW Flv Player, but the thing is not working. Seems like it's does not support it. Can anyone help me regarding this????
# Posted By Prakash | 10/4/07 12:22 AM
Must be said that streaming flv using php putch huge stress on server since every call reserves an apache/php process until playing is over, not to mention recurrent file open/close operations when users change play position.
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
# Posted By gaouzief | 10/6/07 12:51 PM
uau, great tool, extreme simple solution, congratulations and thanks for sharing this!

tested on mac (safari/firefox) and it played at once, no bs

btw, thanx 4 the advice gaouzief
# Posted By rudolfo | 10/9/07 4:16 AM
Thanks for these very helpful posts! I have a newbie question about the role of FLVMDI in all this. In your original post that started all this, in 2005, you said we *need* FLVMDI to inject keyframes or it won't work. I see how FLVMDI injects keyframes (appears to be every 2 seconds) and produces lists of timecodes and file positions. Is there a way to do this by simply reading out (somehow) the file position info for keyframes that were already added in at the time of encoding? I.e., is it strictly necessary for FLVMDI to add lots of *new* keyframes, or if the original encoding specified some keyframe times, can FLVMDI or another tool translate that info into file positions that can then be used? I'm a real beginner with this stuff, and I appreciate anything you can do to make it clearer for me.
# Posted By Karen van Hoek | 10/9/07 6:41 PM
Hi Karen,
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.
# Posted By Stefan | 10/9/07 7:36 PM
Stefan,

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.
# Posted By Karen | 10/9/07 10:06 PM
Oops -- I meant "*extract* metadata"
# Posted By Karen | 10/9/07 10:07 PM
Karen,
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.
# Posted By Stefan | 10/9/07 10:15 PM
Thanks, Stefan. Now I think I understand. And one thing I really appreciate as I'm learning to work with FLV is the fact that experienced people like yourself take the time to answer these basic questions about the tools.
# Posted By Karen | 10/10/07 5:04 AM
Hey Everyone- Thanks for posting this useful code and information.

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?
# Posted By Brian | 10/10/07 9:15 PM
hi Brian,
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.
# Posted By Stefan | 10/11/07 9:45 AM
Ah OK- thanks for the info.. that definitely clears things up.

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.
# Posted By Brian | 10/11/07 4:17 PM
I'm trying to get this to work however when I use http://www.exmaple.com/xmoov.php?file=golfers.flv&...
all I get is a download popup box am I doing something wrong ?
# Posted By Nathan | 10/24/07 1:52 AM
How are xmoov-php and flv player connected? as I can't get it to work. The same problem as above : I get is a download popup box downloading flv file when I enter xmoov.php?file=video.flv&position=0 .Hope somebody could explain.
# Posted By Tom | 11/2/07 7:48 AM
Can the script be used for streaming wma files? if yes, is there any modification? thank you in advance
# Posted By Dan | 11/3/07 3:35 AM
The funny thing is, you get an explanation blog entry to use the VERY SIMPLE flvmdi command line but there is no documentation at all regarding HOW to actually make this think work. Like the people above, I get a download dialog box.

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.
# Posted By John | 12/2/07 4:39 AM
After a few searches, it looks like publishing FLA files works with Macromedia Flash CS3 or MX 2004...

Well we already have the .FLV with the keyframes, do we really need to use Flash to "publish" FLA files we don't have?
# Posted By John | 12/2/07 5:03 AM
I am trying get this xmoov-php to work but I have no idea on how to do it. What I do see is many compains about documentation, I have an idea, why dont one of you post the step by step on how to get this work starting from downloading the file and extracting it on a www folder.

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.


:)
# Posted By Jonathan | 12/9/07 6:59 AM
OK I fixed the issue about the error I was getting, and basically I just had to add <?php at the begining insted of <? and it worked, but now I am getting the same like all of you guys.

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!!!!
# Posted By Jonathan | 12/9/07 3:29 PM
the FLA included in the package is an FLV video player. the video player accesses xmoov-php which sends the video to the player rather than accessing the video directly.

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.
# Posted By Lorenzo | 12/9/07 6:04 PM
SETTING THE PATHS

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.
# Posted By Lorenzo | 12/9/07 6:21 PM
Thank you very much Lorenzo I am running it now, very good.

You are the man ;)
# Posted By Jonathan | 12/11/07 6:24 AM
hi Lorenzo,

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.
# Posted By Herru | 12/18/07 9:11 AM
And another question, if we want to use this swf player for other flv, we must publish another player again and again ? can I control the flash variables via the FlashVars ?
if so how can i do that ? because when i use FlashVars the swf player still showing looping buffer text...
# Posted By Herru | 12/18/07 10:01 AM
well....

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.
# Posted By Lorenzo | 12/18/07 11:15 AM
I agree, this is definitely not the place to learn about the usage of flashvars or the basics of Flash. Thanks for your understanding.
# Posted By Stefan | 12/18/07 12:07 PM
Okay thx alot for the quick reply. fyi, before this, i never played alot with flash actionscript ^^, I'll try the instruction now.
# Posted By Herru | 12/18/07 3:38 PM
Hai Stefan,
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.
# Posted By Norman | 1/6/08 4:44 PM
Hi, and thanks a lot for your work, very precious.
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
# Posted By Giuseppe | 1/16/08 1:55 PM
Hi, and thanks a lot for your work, very precious.
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
# Posted By Giuseppe | 1/16/08 1:57 PM
Hai.
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.
# Posted By logicmania | 1/23/08 3:41 PM
HELLO BUDDY,

I AM NEW AND DONT KNOW HOW TO USE IT. HOW TO CREATE A PLAYER.

PLEASE HELP ME conctact : globalprompt@gmail.com

THanks
# Posted By Justin | 2/11/08 8:58 PM
How to create the swf object ?
# Posted By Justin | 2/11/08 8:59 PM
great tool, but i have a problem with my videos, there is a moment when i see that the load bar become completely full in a second, and when the video is in that moment the video stop.
any idea ?
thanks
kavia
# Posted By kavia | 2/15/08 3:17 PM
In my own server i don't have this problem there is a php proprety that can give me problems in my customer's server ? thanks
# Posted By kavia | 2/15/08 3:27 PM
When i run xmoov.php, i got invalid characters as display. Please help me
# Posted By Kalish | 3/3/08 8:28 AM
I am trying to test the player but I am not able to. Do I have to buy it? and if so, where do I buy it and how much does it cost?

thanks
# Posted By verney | 3/7/08 4:10 AM
Do we need to have Macromedia Flash Media Server installed in the php server get it working. can you please also elaborate publushing FLA.

I am new to this and your help is much apprfeciated
# Posted By Ram | 3/11/08 2:24 AM
Ram, you do not need FMS for this.
# Posted By Stefan Richter | 3/11/08 8:14 AM
Thanks Stefan,
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
# Posted By Ram | 3/11/08 4:01 PM
I mean do we need to modify actionscript in FLA file to add PHP? this is what I understood so for from some searches in google/adobe?
# Posted By Ram | 3/11/08 4:44 PM
I could open FLA file with adobe cs3.

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.
# Posted By ram | 3/11/08 9:36 PM
Finally I got it working and I am able to play flv file hardcoded in actionscript. but now problem is that flv video file name is hardcoded in the Actionscript file. how to change it programatically. you all mentioned that passing that as parameter in php file. how to do that as php file name is also hard coded in actionscript?

please help.
# Posted By Ram | 3/11/08 10:05 PM
am, google for 'flashvars'
# Posted By Stefan Richter | 3/12/08 8:12 AM
I am worried. I have heard it said that Xmoov is not a viable solution for larger scale delivery because it puts too big of a stress on server resources. Specifically, with each call Xmoov reserves an apache/php process during the entire time the video is playing. Furthermore, I hear that apache is set by default to handle a maximum of 256 concurrent clients.
   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?
# Posted By ArtKohn | 3/14/08 12:16 AM
I'm using Flash 8 PRO/WinXP PRO, I'm wondering why when I double click on the golfers.FLV file, it doesn't play in the flash player, all I see is a white flash player box.
# Posted By Kevon | 3/19/08 4:02 PM
I need help with passing the flv file name as a flashvars.

<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.
# Posted By Sam | 4/16/08 3:03 PM
You mentioned that the source includes a CS version. I've had a look and I'm forced to assume that you didn't mean CS3.

Is there an AS3.0 version in the works at all?
# Posted By Chris D. | 4/22/08 12:51 AM
Chris D did you get this to work? If so, did you just drop a flash movie in a php page and use the file name of the flash movie?
# Posted By Kevon | 4/22/08 1:02 AM
I didn't try it. ...once I saw "_root" and "createEmptyMovieClip" in the code, it was obvious that it was NOT written for use with AS3.0.

I'll be working on it over the next week. I'll try to keep you updated.
# Posted By Chris D. | 4/22/08 1:21 AM
I've been trying to get some answers from Eric but it seems impossible to do so!

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.
# Posted By COBRAws | 5/14/08 9:43 AM
Hi!
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.
# Posted By Florian | 5/14/08 9:46 PM
has anyone tried doing this with cgi? converting the php file to perl, it this possible?
# Posted By luan | 5/22/08 4:06 AM
I have been trying to get the phpstream_update working on my localhost.
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???
# Posted By oliver | 7/12/08 9:51 PM
Hi Ols,

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 ;)
# Posted By Mr T | 7/13/08 2:37 PM
i added this to get it working..

   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???
# Posted By oliver | 7/15/08 10:37 AM
Since my last comment I have not being able to buy a license of Xmoov.

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.
# Posted By COBRAws | 7/28/08 4:08 AM
Hi;
Thanks for everything but i have a problem.
It works with flowplayer on localhost(xampp). But it doesn't stream on my server. PHP versions are same and apache servers both of them. I think that i have to setup an extension to my server, so what is it? Or where am i going wrong?
# Posted By Tuyra POL | 10/26/08 9:42 PM
FORGET XMOOV! its no business...just a programmer with ZERO business experience, probably wont even be around too much longer
# Posted By videousa | 10/30/08 8:42 AM
var connection:NetConnection = new NetConnection();
connection.connect(null);   
var stream:NetStream = new NetStream(connection);
video.attachNetStream(stream);
stream.play(videoURL);
function jump(){
   stream.seek(stream.time + 5);
}

While I use:
var connection:NetConnection = new NetConnection();
connection.connect("rtmp://mysite.com/local/);   
var stream:NetStream = new NetStream(connection);
video.attachNetStream(stream);
stream.play(videoURL);
function jump(){
   stream.seek(stream.time + 5);
}

It this situation my video is playing but jump function is not working. Any one can help me for seek the video.

Thanks,
Uday
Sr. Flash Developer
uday_sgh@yahoo.com
# Posted By Uday | 11/17/08 10:20 AM
@videousa
sorry to disappoint you man but xmoov aka freaklancer been around since flash version 3 behind his computer 16-20 hours a day coding and servicing "paying" clients. i'm not apologizing for not having the time to support free software. but i will apologize for our server problems and bouncing emails (CORRAws). i never got an email from you. we had like 2-5k spams a day plus a pretty chaotic server move but all of that is under control now.

while WE are a team of freelancers, I alone do xmoov and it has not been easy taking care of contracts and trying to launch this new direction.

all of this will change the coming year. i have been on xmoov every free hour i have and hopefully i'll reach a point soon where i can do it full time.

but i do have to confirm one thing, yeah i'm just a coder. thats all i know how to do and i damn good at it. if i wasn't, id have more time to business instead of just making money. thats the way life is, you can't have or be everything.




and who are you?
# Posted By lorenzo | 11/24/08 8:01 PM
geesh, Lorenzo
that's only a sad and envy troll
# Posted By rudolf | 11/24/08 9:32 PM
i meant "full of envy", and he's surely very good at pissing people off!

but i came back to dedicate this song to all the trolls in this wild world web:
Devendra Banhart, White Reggae Troll
http://www.youtube.com/watch?v=hhEkhunQGT0
# Posted By rudolf | 11/24/08 10:50 PM
*looool*
# Posted By lorenzo | 11/25/08 10:17 AM
LORENZO! I love you man! you are the man!
I got this working with the scrubber player!
I want to know if you can recommend me another player, with fullscreen option and volume!
Thanks! man ill definately make a referency for you in my website!
# Posted By vitor | 12/4/08 1:58 PM
Dear All,

Can please someone post an example with xmoov.php and JW FLV player working together?

I've used: http://_my_web_site_/test/JW4.3/mediaplayer/xmoov.... and video downloads well (pop up save as window appears)

Here is my xmoov and JW files :
xmoov.php:
// points to server root
define('XMOOV_PATH_ROOT', '/srv/www/_my_web_site_absolute_path_/test/JW4.3/mediaplayer/');
// points to the folder containing the video files.
define('XMOOV_PATH_FILES', 'video/');

and

<p id='example' class="media">Here the video will be shown.</p>
<script type="text/javascript" src="swfobject.js"></script>
<script type='text/javascript'>
var s1 = new SWFObject('player.swf','ply','420','250','9','#ffffff');
s1.addParam('allowfullscreen','true');
s1.addParam('flashvars','file=golfers.flv&streamer=xmoov.php');
s1.write('example');
</script>

Then JW prints 'Video stram not found : golfers.flv'.

Why?

Thx for help
Herv
# Posted By Galmiche | 2/15/09 6:23 PM
For a newbie (such as myself), you can view this link for more help: http://www.longtailvideo.com/support/tutorials/HTT...

I hope this help.
# Posted By gxx | 2/16/09 12:04 AM
Can I use the possibility of xmoov-php in Joomla, to put videos inside articles which will be HTTP pseudostreaming, so to be something automatically, and not to create for every videos different html/js page?
# Posted By Burim | 3/24/09 12:47 PM
When i am trying to run the file it is getting saved can anyone please suggest where i have gone wrong.
# Posted By Ravi | 5/5/09 8:44 AM
@Ravi - Try reading the tutorial that Gxx posted. It's a fantastic read and should help you solve your problem.
# Posted By Brendan the Bookkeeper | 9/10/09 1:53 PM
Hello!
Days of no luck, help is really welcomed.

--Problem--
xmoov.php runs, but returns nothing.

--Envirovment--
It's a LAMP server, I'm root.
(And a Drupal site, but since xmoov.php itself returns nothing, the actual flv player doesn't count yet I think.)

site is in:
/srv/www/mysite/root
xmoov.php is at:
/srv/www/mysite/root/xmoov.php (accessible, set to executeable)
videos are in:
/srv/www/mysite/root/video

define('XMOOV_PATH_ROOT', '/srv/www/mysite/root');

define('XMOOV_PATH_FILES', './video');

Other parts of xmoov.php is the original 0.9.3 beta.

-Tried--
Several combinations of PATH settings...

When I point my browser to http://mysite/xmoov.php?file=video.flv&start=0... the browser returns nothing.

If I write a echo "test"; into xmoov.php to test it is really accessible, "test" is displayed. But that's all.

What did I do wrong?
# Posted By Nagy Dániel | 10/3/09 10:44 AM
I could never get xmoov to limit the bandwidth successfully at the beginning of a long clip without stopping for midstream caching. I'm not sure why this happens. It doesn't happen if I start in the middle of a long clip, but at the beginning, it seems to load slower.

It seems that YouTube uses bandwidth limiting similar to xmoov, but the first 5-10 seconds of the clip comes much faster than the rest of the clip. With my limited php skills, I tried to modify the moov.php code to increase the bandwindwith limitation for the first 10 seconds or so, and then drop back to a rate closer to the clip playback rate.

Here's what I've done... any suggestions? It seems to work, but to be honest, this is my first php mod...

<pre>
//------------------------------------------------------------------------------------------
// PROCESS FILE REQUEST
//------------------------------------------------------------------------------------------

if(isset($_GET[XMOOV_GET_FILE]) && isset($_GET[XMOOV_GET_POSITION]))
{
// PROCESS VARIABLES

# get seek position
$seekPos = intval($_GET[XMOOV_GET_POSITION]);
# get file name
$fileName = htmlspecialchars($_GET[XMOOV_GET_FILE]);
# assemble file path
$file = XMOOV_PATH_ROOT . XMOOV_PATH_FILES . $fileName;

# start change
$tensecondburst = time()+10;
# end change

# assemble packet interval
$packet_interval = (XMOOV_CONF_ALLOW_DYNAMIC_BANDWIDTH && isset($_GET[XMOOV_GET_BANDWIDTH])) ? getBandwidthLimit('interval') : XMOOV_BW_PACKET_INTERVAL;
# assemble packet size
$packet_size = ((XMOOV_CONF_ALLOW_DYNAMIC_BANDWIDTH && isset($_GET[XMOOV_GET_BANDWIDTH])) ? getBandwidthLimit('size') : XMOOV_BW_PACKET_SIZE) * 1024;

# security improved by by TRUI www.trui.net
if (!file_exists($file))
{
print('<b>ERROR:</b> 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 ('<b>ERROR:</b> 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 && $packet_interval > 0)
{
# get start time
list($usec, $sec) = explode(' ', microtime());
$time_start = ((float)$usec + (float)$sec);
# output packet
print(fread($fh, $packet_size));
# start changes--------
while(time() <= $tensecondburst)
{
print(fread($fh, $packet_size * 10));
}
# end changes------
# 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)));
}
}

}

}
</pre>
# Posted By myq larson | 10/9/09 7:28 AM
Hello myq larson,

once again things are moving faster than I can keep up. You are trying to implement something I have included in v2. It is an extra setting called "burst size". Contact me if you like or find xmoov in facebook so I can include you in the testing.

I will do my best to get it released before november.

Eric Lorenzo Benjamin jr.
http://xmoov.com/
# Posted By Eric Lorenzo Benjamin jr. | 10/9/09 8:29 AM
Hi Eric,

Thank you very much for your work! It's great! It took me a while to get it working, but it was worth it because I learnt a little php. I posted too soon, however, because I found that a simple IF statement works better than a WHILE statement:
<pre>
# start changes--------
if(time() <= $initialburst)
{
print(fread($fh, $packet_size * 10));
}
# end changes------
</pre>

Feel free to use it if you like. I don't know much PHP, so your implementation might be better. I was thinking of setting it as a percentage of the total file size, but I don't know how to do that. Perhaps the first 3-5% of the file could be sent at 5-10x the bandwidth limit speed, then a limited speed.

Most of my videos are an hour long, so I noticed the pauses, especially at the beginning. I'm still not sure why it happens. Even if I scrub to a spot near the beginning, the lag is much longer than scrubbing to a spot in the middle or near the end.

Anyway, this works for me. I set it to 'burst' for about 20-30 seconds at 10x the normal rate.

I can't wait to see the improvements you're making. I'll join you on FB.

Cheers!
# Posted By myq larson | 10/9/09 11:40 AM
Veeery careful! Especially if you are on shared hosting. Just get me on facebook. The new script has answers to all your questions and much more.

Great work to you though. Lets me know I'm on the right track and will get me motivated to get the new script out soon.
# Posted By Eric Lorenzo Benjamin jr. | 10/9/09 11:49 AM
This is your problem, where you are pinting your browser:

http://mysite/xmoov.php?file=video.flv&start=0...

xmoov.php is located here:

/srv/www/mysite/root/xmoov.php

your browser should be pointing here:

http://mysite/root/xmoov.php?file=video.flv&st...

If the server root is:

/srv/www/mysite/root

Then just point your browser here:

http://xmoov.php?file=video.flv&start=0...
# Posted By Joseph Gutierrez | 11/24/09 4:28 PM
The new xmoov-php : xmoovStream release January 5 2010 http://stream.xmoov.com
# Posted By Eric Lorenzo Benjamin jr. | 12/9/09 4:42 AM
example of Jeroen Flash Player with xmoov.php FAILED.

http://www.longtailvideo.com/support/jw-player-set...


I detected the swf of Jerone player4.6.swf only pass file and token variables but not position, then show text Video not found.

The SOLUTION is pass the variable position as the name start.

Thanks to firebug.

Me ha vuelto loco encontrar el fallo, menos mal que está Firebug que si no hubiera abandonado.

Salu2

Mcalons
# Posted By mcalons | 12/15/09 6:00 PM
I am really pleased with Eric Lorenzo's XmoovStream server/player release.

It's installed here: http://www.docsvideo.com

Great Job, Eric! :)
# Posted By Doc | 2/15/10 3:57 PM