* @package PHPVideoToolkit * @license BSD * @copyright Copyright (c) 2008 Oliver Lillie * Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation * files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, * modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software * is furnished to do so, subject to the following conditions: The above copyright notice and this permission notice shall be * included in all copies or substantial portions of the Software. * * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE * WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR * COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, * ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. */ // print_r(array(__LINE__));exit; // from php notes on file_get_contents function curl_get_file_contents($URL) { if(ini_get('allow_url_fopen')) { return file_get_contents($URL); } $c = curl_init(); curl_setopt($c, CURLOPT_RETURNTRANSFER, 1); curl_setopt($c, CURLOPT_URL, $URL); $contents = curl_exec($c); curl_close($c); if ($contents) return $contents; else return FALSE; } if(isset($_SESSION['current_version'])) { $release_date = $_SESSION['current_version']['date']; $release_version = $_SESSION['current_version']['version']; $release_link = $_SESSION['current_version']['link']; } else { $downloads_page = curl_get_file_contents('http://sourceforge.net/project/showfiles.php?group_id=222844'); if($downloads_page !== false) { $_SESSION['current_version'] = array(); $downloads_page = str_replace(array("\r\n", "\r", "\n", "\t"), '', $downloads_page); preg_match('!\(.*)
The latest file releases
!', $downloads_page, $matches); preg_match('!(.*)!', $matches[1], $matches); $data = substr($matches[1], 0, strpos($matches[1], '', strpos($matches[1], '')+4)); preg_match('!([^]+)!', $matches[1], $matches); $_SESSION['current_version']['date'] = $release_date = $matches[1]; preg_match_all('!href="([^\"]+)"!', $data, $matches); $_SESSION['current_version']['link'] = $release_link = 'http://sourceforge.net'.$matches[1][1]; $_SESSION['current_version']['version'] = $release_version = substr($data, -5); } else { $release_date = 'unknown'; $release_version = 'unknown'; $release_link = 'http://sourceforge.net/project/showfiles.php?group_id=222844'; } } $changelog = file_get_contents('../CHANGELOG'); $most_recent_changes = trim(substr($changelog, 0, strpos($changelog, "[", 15))); ?> PHPVideoToolkit, © Oliver Lillie <?php echo date('Y'); ?> PHPVideoToolkit © Oliver Lillie, 2008

version; $current_is_old = $release_date == 'unknown' ? -1 : version_compare($current_version, $release_version) === -1; ?> 1. About & Current Version
2. Most Recent Changes
3. Installation
4. Support & Feedback
5. Examples
6. Documentation
7. License
8. Changes


About & Current Version

The version of PHPVideoToolkit you currently have is "".
WARNING: It was not possible to retrieve the latest version number from the remote server.
Please check you are using the latest version by visiting the Sourceforge downloads page.



Your current version of PHPVideoToolkit is old. The newer version, "" was released on . Please click here to download the newer version.
Your current version is up to date.

Please note, it has been detected that you are running PHP4 and the examples will be automatically configured to use the phpvideotoolbox.php4.php class and the php4 examples instead of the php5 versions. Please note that whilst every effort has been made to unsure all the php5 development work is backported to the php4 class, I don't actually use php4 anymore so if something doesn't work as expected please let me know.

Please also note that as php4 is now officially dead I won't support php4 from version 0.2.0 of PHPVideoToolkit onwards.


This class is a wrapper around the FFmpeg, FLVTools2 and Mencoder programs to allow PHP developers to manipulate and convert video files in any easy to use object oriented way. It also currently provides FFmpeg-PHP emulation in pure PHP so you wouldn't need to compile and install the module. Note, it isn't intended as a FFmpeg-PHP replacement, only an alternative solution and it is recommended that if you make heavy use of the FFmpeg-PHP functionality you should install the module as it is more efficient.

PHPVideoToolkit is pretty much the only video/audio class that you will need from now on. It performs several types of manipulation operations that include video format conversion, extract video frames into separate image files, assemble a video stream from a set of separate video images, extract audio from video, watermark videos and extracted frames. Several parameters can also be configured like the output video file format (which can be Flash video or any other supported by ffmpeg), video and audio bit rate and sample rate, video dimensions and aspect ratio. It can also retrieve information about the media file, such as duration, bitrate, framerate, format, dimensions, display aspect ratio, pixel aspect ratio, audio stereo, audio frequency and audio format, without any other additional library such as ffmpeg-php.

The home of PHPVideoToolkit is located at Sourceforge. Whilst I will make every effort to update the files at every location it is updated you should always check the Sourceforge repository for the latest version.

http://sourceforge.net/projects/phpvideotoolkit/

↑ Back to top


Most Recent Changes
↑ Back to top

Installation

If you already have FFmpeg, and optionally FLVTools2 and Mencoder installed on your server then you will not have to install anything. However if you do not have these binaries then please read the following help file. Please be aware that I will not answer support requests for helping in installing FFmpeg or the other binaries as there is much information on the internet. If you are really stuck hire someone to do it, ie at rent-a-coder etc.

↑ Back to top


Support & Feedback

I am currently redesigning the website and ask that all bug reports go through the SourceForge forums/issue trackers. However you may post support or help requests in the PHP Video Toolkit Forum.

↑ Back to top


Examples

I have compiled a great number of examples to show you how to use PHPVideoToolkit. You can find links to the demo files and brief explanations about each below.
Please be sure to edit the example-config.php file located in the examples folder.


↑ Back to top


License

The PHPVideoToolkit class, the VideoTo adapter class, the Toolkit adapter classes, the FFmpeg-PHP adapter classes and all associated examples are subject to the BSD style license laid out below.

PHPVideoToolkit Copyright (c) 2008 Oliver Lillie
http://www.buggedcom.co.uk


Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.

↑ Back to top


Changes
↑ Back to top