I'm here to help those who have tried to create their own live server, whether it be for only audio or both audio and video.
When I say live server I mean exactly like Ustream.tv or livestream except it is exactly the way YOU want it. I.E. without all the advertisements, bandwidth limits, watermarks (Ustream), and spam.
You can create your own live streaming server using just xmoov.php (yes, the php script by itself).
You can also install ffmpeg (linux) like I'm doing to convert the video that is being saved by your HD Canon 5D mk2 camera or a more basic webcam, whatever you choose because this is your server!
Now, let's get started:
1.) Go to: http://stream.xmoov....load/xmoov-php/
No worries, this link is completely valid and mcafee siteadvisor can proove it.
2.) Click "xmoov-php" and on the next page, scroll down slightly and click on accept to down load a zip file
3.) Extract that zipped files or open in your Archive Manager (linux)
4.) (LINUX) In the archive manager, double-click the zip folder and single-click/select ONLY the xmoov.php file and extract it.
4.1) (WINDOWS) Extract the xmoov.php file.
5.) Go to your website's http document root and copy the xmoov.php file there
6.) (LINUX) if you want to at this time, open your terminal, log in as root (su root/sudo root), and install ffmpeg.
7.) That should be it for right now. Reset your mind.
8.) open your xmoov.php file
I'm assuming that your xmoov.php file and video file will be in the same folder, that's why the next two steps below are the same
9.) Look for "XMOOV_PATH_ROOT" and set the second parameter to '', i.e. nothing should be in between the apostrophes.
10.) Look for "XMOOV_PATH_FILES" and set the second parameter to '', i.e. nothing should be in between the apostrophes. You can change this later on if you move xmoov.php to another folder. Just put the folder name with a "/" after its name that will contain your xmoov.php and video files.
11.) Look for "XMOOV_BW_PACKET_SIZE" and set the second parameter to '65'. This is best for me because ffmpeg converts at 600kbits/s, or 75 bytes a second, only sightly higher than that xmoov bandwidth limit so that we don't reach the end of file before we want to.
12.) Look for "XMOOV_BW_PACKET_INTERVAL" and set the second parameter to '1'.
13.) Look for "XMOOV_GET_FILE" and set the second parameter to 'YOUR VIDEO FILE NAME'. I.E. "myvid.flv" Remember, the video file is in the same folder as your xmoov.php file.
14.) Look for "XMOOV_GET_POSITION" and set the second parameter to 'start'.
15.) Scroll down to the first "if" statement that has "isset($_GET[XMOOV_GET_FILE]) && isset($_GET[XMOOV_GET_POSITION])" as its parameter and change it to "true".
16.) scroll down a couple lines to "$fileName" that is being assigned to "htmlspecialchars($_GET[XMOOV_GET_FILE]);" and change that to "myvid.flv" INCLUDE the quotations.
17.) Move down two lines to "$file" that is being assigned to "XMOOV_PATH_ROOT . XMOOV_PATH_FILES . $fileName;" and assign it to "$fileName" DO NOT include quotations. REMEMBER, $fileName has a capital "N".
18.) scroll down to the headers, in particular, "header("Content-Length: " . $fileSize);", delete that. You're not going to need that , remember, this is a live stream, you aren't supposed to know how long the file will be...
19.) Go to file bottom. Inside the while and if statement look for "# clean up" or "$time_difference = $time_stop - $time_start;". Right below "$time_difference = $time_stop - $time_start;" or right above "# clean up" insert "set_time_limit(0);"
20.) Save the file and you're ready to go!
21.) If using ffmpeg, open your terminal, log in as root, and type in "ffmpeg -i INPUT-FILE-LOCATION -s hd480 OUTPUT-FILE-LOCATION/myvid.flv
If xmoov.php is in /var/www/html, output file should be /var/www/html/myvid.flv
start converting your vid live with ffmpeg and watch the live video on your website!
Now you're probably thinking that I am only using already converted files, but you can list files in xmoov.php that are being converted on the spot by ffmpeg. I only gave names because your live streaming files need to have a name while being converted/streamed.
I have it on my server at: http://www.valevarka...om/LiveFeed.php
even though it is not live at this time, but it works! I can do what ever I want, change the cameras at any time, audio, bitrate, microphones, whenever. Even though the up-time is up to me, I don't have to worry about whether or not I will be able to post on demand.
ANY questions, leave them here...