├── .gitignore ├── CREDITS ├── ChangeLog ├── EXPERIMENTAL ├── INSTALL ├── LICENSE ├── README ├── TODO ├── config.m4 ├── ffmpeg-php.c ├── ffmpeg-phpinfo.php ├── ffmpeg_errorhandler.c ├── ffmpeg_errorhandler.h ├── ffmpeg_frame.c ├── ffmpeg_frame.h ├── ffmpeg_movie.c ├── ffmpeg_movie.h ├── ffmpeg_tools.c ├── ffmpeg_tools.h ├── gd.h ├── gd_io.h ├── php_ffmpeg.h ├── run-tests.php ├── test_ffmpeg.php └── tests ├── .gitignore ├── getAudioBitRate.phpt ├── getAudioChannels.phpt ├── getAudioCodec.phpt ├── getAudioSampleRate.phpt ├── getAudioStreamId.phpt ├── getBitRate.phpt ├── getDuration.phpt ├── getFileName.phpt ├── getFrame.phpt ├── getFrameCount.phpt ├── getFrameHeight.phpt ├── getFrameNumber.phpt ├── getFrameRate.phpt ├── getFrameResampled.phpt ├── getFrameWidth.phpt ├── getFramesForward.phpt ├── getFramesForwardPassedEnd.phpt ├── getFramesInReverseOrder.phpt ├── getFramesNoArg.phpt ├── getID3Info.phpt ├── getNextKeyFrame.phpt ├── getPTS.phpt ├── getPixelAspectRatio.phpt ├── getPixelFormat.phpt ├── getVideoBitRate.phpt ├── getVideoCodec.phpt ├── getVideoStreamId.phpt ├── hasAudio.phpt ├── isKeyFrame.phpt ├── persistentMovie.phpt └── test_media ├── 16Hz-20kHz-Exp-1f-5sec.mp3 └── robot.avi /.gitignore: -------------------------------------------------------------------------------- 1 | run-tests.php 2 | modules 3 | mkinstalldirs 4 | missing 5 | ltmain.sh 6 | libtool 7 | install-sh 8 | include 9 | configure.in 10 | configure 11 | config.sub 12 | config.status 13 | config.nice 14 | config.log 15 | config.h.in 16 | config.h 17 | config.guess 18 | build 19 | autom4te.cache 20 | aclocal.m4 21 | acinclude.m4 22 | Makefile.objects 23 | Makefile.global 24 | Makefile.fragments 25 | Makefile 26 | .libs 27 | .deps 28 | *.lo 29 | *.o 30 | *.la 31 | -------------------------------------------------------------------------------- /CREDITS: -------------------------------------------------------------------------------- 1 | Todd Kirby (ffmpeg.php AT gmail.com) 2 | Martin Prangl (martin.prangl AT itec.uni-klu.ac.at) 3 | Alexey Zakhlestin 4 | -------------------------------------------------------------------------------- /ChangeLog: -------------------------------------------------------------------------------- 1 | ChangeLog for ffmpeg-php (ffmpeg-php.sourceforge.net) 2 | 3 | version 0.6.3 (3/30/2009) 4 | Bug Fixes 5 | * Fixed compatibility with ffmpeg 0.5.0 release. ffmpeg-php is only 6 | supporting offical releases from here on. 7 | 8 | version 0.6.2 (3/25/2009) 9 | Bug Fixes 10 | * Fixed building on php4 11 | * Fixed compatibility with ffmpeg 0.5.0 release 12 | 13 | version 0.6.0 (10/15/2008) 14 | New Features: 15 | * Support for ffmpeg swscale API 16 | 17 | API Changes: 18 | * Removed obsolete resize() and crop() functions. These operations are 19 | more flexibly done using the gd commands. 20 | * Removed animated gif class since it was way out of date and the 21 | quality of animated gifs created by ffmpeg sucks anyway 22 | 23 | Bug Fixes: 24 | * Added check to ensure that gd loads before ffmpeg-php if both are 25 | compiled as extensions. 26 | * Replaced large mp3 test file with smaller sample to avoid copyright 27 | issues and reduce package size. 28 | * Convert from deprecated img_* functions to swscale. 29 | * Builds against php4 correctly again. 30 | 31 | version 0.5.3 (05/30/2008) 32 | New Features: 33 | * Added 'ffmpeg.show_warnings' ini flag to control whether ffmpeg 34 | warnings are converted to php warnings. 35 | * Applied patch to add getAudioStreamId and getVideoStreamId functions 36 | 37 | version 0.5.2.1 (04/03/2008) 38 | 39 | Bug Fixes: 40 | * Minor build fixes and cleanups 41 | 42 | version 0.5.2 (04/02/2008) 43 | 44 | Bug Fixes: 45 | * ffmpeg-php should compile on macos-x now 46 | * Failure to find the proper codec is not a fatal error anymore 47 | * Updated build script to deal with new ffmpeg include file layout. 48 | 49 | 50 | New Features: 51 | * Added gd image bounds checking. 52 | * Added config flag to skip the compile-time gd check. 53 | * ffmpeg's logs are mapped to php's warnings and notices (no more stderr pollution) 54 | 55 | version 0.5.1 (06/11/2007) 56 | 57 | Bug Fixes: 58 | * Fixed some of the tests (Thanks to Raphael Geissert for the patch) 59 | * Improved build process (Thanks to Raphael Geissert for the suggestions) 60 | * Fixed the test script so it won't generate warnings when video/audio 61 | stream is missing. 62 | 63 | New Features: 64 | * Added $movie->hasVideo() function to test for video stream. 65 | * Copyright updated for better compatibilty with the PHP license. 66 | 67 | version 0.5.0 (09/29/2006) 68 | 69 | Bug Fixes: 70 | * Fixed problem with params to av_open_input_file not getting initialized 71 | correctly. (Thanks to SilverCode for the fix) 72 | 73 | version 0.4.9 (09/04/2006) 74 | 75 | New Features: 76 | * Better error reporting when opening a movie fails 77 | * INSTALL doc clarifications 78 | 79 | Bug Fixes: 80 | * Fixed compilation error in ffmpeg_animated_gif.c when building against 81 | old ffmpeg 82 | 83 | 84 | version 0.4.8 (08/04/2006) 85 | 86 | New Features: 87 | * Added new functions for audio streams: getAudioSampleRate(), 88 | getAudioBitRate() (Martin Prangl) 89 | * Changed getBitRate function to like getAudioSampleRate() and 90 | getAudioBitRate(). Now returns bits per second instead of 91 | calculating kb/s. (To get kb/s just do movie->getBitRate() / 1000 92 | in php.) (tkirby) 93 | 94 | Bug Fixes: 95 | * Fix possible error in hasAudio calculation if audio stream is the 96 | first stream. (tkirby) 97 | 98 | version 0.4.7 (06/08/2006) 99 | 100 | Bug Fixes: 101 | * Fixed framerate calculation to be compatible with ffmpeg cvs 6/8/06 102 | (tkirby) 103 | 104 | version 0.4.6 (08/30/2005) 105 | 106 | Bug Fixes: 107 | * Fixed compatiblity with ffmpeg cvs after 7/30/05 or so (tkirby) 108 | 109 | version 0.4.5 (07/12/2005) 110 | Bug Fixes: 111 | * Minor build fixes for older ffmpeg versions (tkirby) 112 | 113 | version 0.4.4 (06/24/2005) 114 | New Features: 115 | * Added ability to create animated gifs via new ffmpeg_animated_gif 116 | class (tkirby) 117 | * Fixed ffmpeg_frame constructor to allow creating ffmpeg_frames from 118 | gd images. This allows to make animated gifs directly from a series 119 | of gd images. I believe this is currently the only way to make 120 | animated gifs using PHP since the bundled version of gd does not 121 | support animated gif creation (tkirby) 122 | * Added flag to php.ini to allow server admins to disable persistent 123 | movies since injudicious use of persistent movies in scripts can eat 124 | up server resources quickly (tkirby) 125 | * Added frame->isKeyFrame() and movie->getNextKeyFrame() methods (tkirby) 126 | * Now displays ffmpeg-php ini values in php_info() table (tkirby) 127 | 128 | Bug Fixes: 129 | * Fixed parsing of 'persistent' boolean flag in ffmpeg_movie constructor 130 | * Fixed segfault when a script tries to read more frames than exist in 131 | a movie. (tkirby) 132 | * Patch to use native time bases. This allows building against libavcodec 133 | build 4754+ (Steve Brown) 134 | * Patch to corrctly init gd before attempting to fetch gd image resources. 135 | This fixes the "togdimage() supplied resource is not a valid Image 136 | resource" error that a few people have reported (Steve Brown) 137 | 138 | version 0.4.3 (03/12/2005) 139 | Bug Fixes: 140 | * Added ability to open movies as persistent resources. This greatly 141 | increases speed of repeatedly accessing the same movie from separate 142 | php scripts. This is still somewhat experimental so don't use it 143 | unless you have a specific need (tkirby) 144 | * Increased strictness of compiler warnings to catch issues like 145 | undefined symbol errors. (tkirby) 146 | * Track frame number within ffmpeg-php since the frame_number variable 147 | in ffmpeg's decoder context seems to give inaccurate results on some 148 | 3GP movies. (tkirby) 149 | * Fixed bug #1099229 - Stride problems if ffmpeg_frame is resized upwards 150 | (tkirby) 151 | * Functions now use safe_emalloc() to avoid possible integer overflows 152 | (tkirby) 153 | * Changed lrint() to a macro to allow compiling on Windows (tkirby) 154 | 155 | version 0.4.2.1 (02/15/2005) 156 | Bug Fixes: 157 | * Fixed error handling when ffmpeg_movie object creation fails (tkirby) 158 | * Fixed undefined symbol error in ffmpeg_output_movie (tkirby) 159 | 160 | version 0.4.2 (01/15/2005) 161 | New Features: 162 | * Added more ID3 methods getAlbum(), getArtist(), getGenre()), 163 | getTrackNumber(), getYear() for audio files. (tkirby) 164 | * Cleaned up to build without gd (tkirby) 165 | * Added ability to build against current ffmpeg cvs (tkirby) 166 | 167 | Bug Fixes: 168 | * Fixed segfault in ffmpeg_movie free when decoder is not found (tkirby) 169 | 170 | version 0.4.1 (01/08/2005) 171 | New Features: 172 | * Added getVideoCodec(), getAudioCodec() and getAudioChannels() functions 173 | per feature request #1097373 (tkirby) 174 | * Added constructor for ffmpeg_frame that allows to create from a gd 175 | image. This won't be all that useful until encoding support is added. 176 | (tkirby) 177 | 178 | Bug Fixes: 179 | * Fixed incorrect error reporting in get_decoder (tkirby) 180 | * Don't error if decoder can't be found, just warn (tkirby) 181 | * Fixed nasty memory leak in free ffmpeg_frame (tkirby) 182 | * Code cleanup (tkirby) 183 | 184 | version 0.4.0a "Festivus" (12/23/2004) 185 | New Features: 186 | * Added ffmpeg_frame object to encapsulate frame specific methods. This 187 | cleans up the explosion of getFrame methods and makes eventual encoding 188 | support easier (tkirby) 189 | 190 | Bug Fixes: 191 | * Fixed bug where image resampling context was not getting freed 192 | (tkirby) 193 | * Fixed bug in getDuration() where duration was return as an int, which 194 | was causing frame counts to be off (tkirby) 195 | 196 | version 0.3.8a (12/15/2004) 197 | New Features: 198 | * Added getFrameIntoImage() function to reuse the same gd image for speed 199 | (tkirby) 200 | 201 | Bug Fixes: 202 | * Fixed bug in getFrameResampled() argument parsing (tkirby) 203 | * Fixed broken alias for getBitRate() function (tkirby) 204 | * Fixed memory leak in gd image allocation function (tkirby) 205 | 206 | version 0.3.7a (12/05/2004) 207 | New Features: 208 | * Added support for PHP5 209 | 210 | Bug Fixes: 211 | * Fixed incorrect module initialization that was causing segfault in PHP5 212 | (tkirby) 213 | 214 | version 0.3.6a (12/04/2004) 215 | New Features: 216 | * More malloc optimizations in frame conversion/resampling (tkirby) 217 | * Added cropping support to getFrameResampled() and getFrame() (tkirby) 218 | 219 | Bug Fixes: 220 | * Fixed bug #1079237 getFrame fails when getting the same frame twice 221 | (tkirby) 222 | * Fixed memory leak when freeing ffmpeg_movie objects (tkirby) 223 | * Fixed bug #1078753 cropping doesn't work correctly if image is not 224 | resized (tkirby) 225 | * Fixed bug #1077952 Segfault with multiple calls to getFrameResampled() 226 | (tkirby) 227 | * Fixed tiny memory leak in _php_get_gd_image() (tkirby) 228 | * Added configure warning if trying to build against php 5 since it 229 | is not supported yet. (tkirby) 230 | 231 | version 0.3.5a (11/29/2004): 232 | New Features: 233 | * Can now be built independently of PHP sources. (tkirby) 234 | * Added ebuild goodness for the Gentoo Type/R crowd 235 | (tkirby - Gentoo User :-) 236 | 237 | Bug Fixes: 238 | * Fixed a couple of really stupid conversion bugs in getFrame() and 239 | getFrameResampled() (tkirby) 240 | 241 | version 0.3.4a (11/28/2004): 242 | New Features: 243 | * Added new method getFrameResampled() which returns a frame resized 244 | using ffmpeg's resampling. ffmpeg resmpling IMHO is better than GD's 245 | resampling and will speed up greatly returning say a thumbnail sized 246 | frame since less data has to be copied into the returned GD image. 247 | The only caveat to ffmpeg based resampling is that the width and 248 | height of the resized image must be even numbers (tkirby) 249 | * Initial support for audio only files such as mp3 (tkirby) 250 | * getDuration() now works for mp3 files (tkirby) 251 | * getVideoBitrate() will return bit rate for mp3 files though this will 252 | change in the future when more audio specific methods are added (tkirby) 253 | 254 | version 0.3.3a (11/25/2004): 255 | New Features: 256 | * Added PHP constants for libavcodec version and build numbers (tkirby) 257 | * Added getVideoBitRate() method (tkirby) 258 | * More optimizations for successive calls to getFrame() (tkirby) 259 | 260 | Bug Fixes: 261 | * Don't error if stream params not found since some formats don't need 262 | them (tkirby) 263 | * Return zero if can't get a valid duration for the movie (tkirby) 264 | * Zero out alpha channel when copying frame to gd so gd will not try to 265 | apply alpha when image is passed to gdImageCopyResampled() (tkirby) 266 | * getFrame() no longer bounds checks the framenumber param against 267 | framecount since framecount may not always be accurate (tkirby) 268 | * getFrame() now returns false if the wanted frame is not found instead 269 | of generating an error (tkirby) 270 | 271 | version 0.3.2a (11/22/2004): 272 | New Features: 273 | * Added getPixelFormat() method (tkirby) 274 | * Added hasAudio() method (tkirby) 275 | * Optimized getFrame() method so that reading successive frames is much 276 | faster (tkirby) 277 | * getFrame() can now be called without an argument to get the next frame in 278 | the stream (tkirby) 279 | 280 | Bug Fixes: 281 | * Fixed getFrame() returning one frame off of the requested frame (tkirby) 282 | 283 | version 0.3.1a (11/19/2004): 284 | Bug Fixes: 285 | * Full getFrame() rework, should now work with all ffmpeg movie types 286 | (tkirby) 287 | 288 | version 0.3.0a (11/17/2004): 289 | New Features: 290 | * Initial support for framer() (tkirby) 291 | -------------------------------------------------------------------------------- /EXPERIMENTAL: -------------------------------------------------------------------------------- 1 | THE FFMPEG-PHP EXTENSION IS EXPERIMENTAL! USE IT AT YOUR OWN RISK :-O 2 | 3 | -------------------------------------------------------------------------------- /INSTALL: -------------------------------------------------------------------------------- 1 | REQUIREMENTS 2 | ============ 3 | 4 | ffmpeg-0.5.0 or higher built with the --enable-shared option 5 | php-5.0.x or higher. For php-4, use ffmpeg-php-0.5.1 or older. 6 | gd-2.0.x or higher or the version of GD bundled with PHP 7 | 8 | INSTALLATION INSTRUCTIONS 9 | ========================= 10 | 11 | These instructions are for Linux/Unix. Windows is not offically supported at this time however, 12 | there are user-contributed builds that will run on window. Search the sourceforge downloads page 13 | for these. 14 | 15 | INSTALLING FROM A PACKAGE MANAGER 16 | --------------------------------- 17 | 18 | There are prebuilt packages for many Linux distros. 19 | 20 | Gentoo: 21 | emerge ffmpeg-php 22 | 23 | Debian/Ubuntu: 24 | apt-get install php5-ffmpeg 25 | 26 | Other: 27 | check your docs for specific info on how to invoke the package manager. 28 | 29 | 30 | BUILDING FFMPEG 31 | --------------- 32 | 33 | cd /path/to/ffmpeg 34 | ./configure --enable-shared --prefix=/usr 35 | make clean && make 36 | [become root] 37 | make install 38 | 39 | 40 | BUILDING FFMPEG-PHP AS A SHARED EXTENSION 41 | ----------------------------------------- 42 | 43 | 1. Build php if not already built or installed by your distro (See the file INSTALL in your php source directory) 44 | 45 | 2. Unpack the archive 46 | 47 | tar -xjf ffmpeg-php.X.x.x.tbz2 -C /path/to/php_sources/ext/ 48 | 49 | 3. cd into the ffmpeg extension directory 50 | 51 | cd /path/to/php_sources/ext/ffmpeg-php.X.X.X/ 52 | 53 | 4. Run phpize (included with your php install) to build configuration files 54 | 55 | phpize 56 | 57 | 5. Configure and build 58 | 59 | ./configure && make 60 | 61 | 6. Install the shared extension 62 | 63 | make install (as root) 64 | 65 | If everything went as planned, ffmpeg-php is now installed as a shared library. 66 | You must explicitly load it in your scripts using dl(ffmpeg.so) or if you want 67 | it available to all scripts by default add extension=ffmpeg.so to your php.ini 68 | file which will tell php to load it when starting up. 69 | 70 | 71 | BUILDING FFMPEG-PHP AS PART OF THE PHP BINARY 72 | --------------------------------------------- 73 | 74 | 1. Unpack the archive and copy the ffmpeg extension directory into your the php 75 | sources extensions directory 76 | 77 | tar -xjf ffmpeg-php.X.x.x.tbz2 -C /path/to/php_sources/ext/ 78 | 79 | 2. Run autoconf to rebuild the php configure script and add the --with-ffmpeg 80 | option 81 | 82 | cd /path/to/php_sources 83 | autoconf 84 | 85 | 2. configure php using... 86 | 87 | ./configure --with-ffmpeg=yes 88 | 89 | ...and build and install php. 90 | 91 | The ffmpeg-php methods should now be built directly into php and so no need to 92 | explicitly load the extension at runtime. 93 | 94 | 95 | TESTING THE INSTALLATION 96 | ------------------------ 97 | 98 | 1. Put the directory test_media and test_ffmpeg.php script under your web root 99 | somewhere (put both in the same directory). 100 | 101 | 2. Load test_ffmpeg.php into your browser. 102 | 103 | RESULTS: You should get a listing of the methods provided by the ffmpeg-php 104 | module as well as some test output from the methods. 105 | 106 | TROUBLESHOOTING 107 | --------------- 108 | 109 | Q: I get '`gdImage' undeclared or `gdImagePtr''undeclared when I try to 110 | build ffmpeg-php 111 | 112 | A: Your version of php is compiled without gd support. Make sure to use the 113 | '--with-gd' flag when configuring php. If you're sure you have gd but 114 | it is not being detected, reconfigure the build with 115 | '--enable-skip-gd-check' to force ffmpeg-php to build with gd support. 116 | 117 | Q: I get 'avcodec.h: No such file or directory' when I try to 'make' ffmpeg-php 118 | 119 | A: ffmpeg-php can't find ffmpeg header files. Make sure when you configure 120 | ffmpeg you use the '--enable-shared' option and make sure it installs 121 | somewhere where other programs can find the libs/headers. See 122 | 'BUILDING FFMPEG' above for an example. 123 | 124 | Q: Can I just pay you to install it? 125 | 126 | A: Yes. I will install ffmpeg + codecs, ffmpeg-php and flvtool2 on your server for $75 USD. This 127 | is everything you need to convert just about any movie type to flash. 128 | Shoot me an email at ffmpeg.php AT gmail.com if you are interested. 129 | 130 | FURTHER HELP 131 | ------------ 132 | 133 | If you get stuck, post a message to the ffmpeg-php google group (http://groups-beta.google.com/group/ffmpeg-php) 134 | -------------------------------------------------------------------------------- /LICENSE: -------------------------------------------------------------------------------- 1 | GNU GENERAL PUBLIC LICENSE 2 | Version 2, June 1991 3 | 4 | Copyright (C) 1989, 1991 Free Software Foundation, Inc. 5 | 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA 6 | Everyone is permitted to copy and distribute verbatim copies 7 | of this license document, but changing it is not allowed. 8 | 9 | Preamble 10 | 11 | The licenses for most software are designed to take away your 12 | freedom to share and change it. By contrast, the GNU General Public 13 | License is intended to guarantee your freedom to share and change free 14 | software--to make sure the software is free for all its users. This 15 | General Public License applies to most of the Free Software 16 | Foundation's software and to any other program whose authors commit to 17 | using it. (Some other Free Software Foundation software is covered by 18 | the GNU Library General Public License instead.) You can apply it to 19 | your programs, too. 20 | 21 | When we speak of free software, we are referring to freedom, not 22 | price. Our General Public Licenses are designed to make sure that you 23 | have the freedom to distribute copies of free software (and charge for 24 | this service if you wish), that you receive source code or can get it 25 | if you want it, that you can change the software or use pieces of it 26 | in new free programs; and that you know you can do these things. 27 | 28 | To protect your rights, we need to make restrictions that forbid 29 | anyone to deny you these rights or to ask you to surrender the rights. 30 | These restrictions translate to certain responsibilities for you if you 31 | distribute copies of the software, or if you modify it. 32 | 33 | For example, if you distribute copies of such a program, whether 34 | gratis or for a fee, you must give the recipients all the rights that 35 | you have. You must make sure that they, too, receive or can get the 36 | source code. And you must show them these terms so they know their 37 | rights. 38 | 39 | We protect your rights with two steps: (1) copyright the software, and 40 | (2) offer you this license which gives you legal permission to copy, 41 | distribute and/or modify the software. 42 | 43 | Also, for each author's protection and ours, we want to make certain 44 | that everyone understands that there is no warranty for this free 45 | software. If the software is modified by someone else and passed on, we 46 | want its recipients to know that what they have is not the original, so 47 | that any problems introduced by others will not reflect on the original 48 | authors' reputations. 49 | 50 | Finally, any free program is threatened constantly by software 51 | patents. We wish to avoid the danger that redistributors of a free 52 | program will individually obtain patent licenses, in effect making the 53 | program proprietary. To prevent this, we have made it clear that any 54 | patent must be licensed for everyone's free use or not licensed at all. 55 | 56 | The precise terms and conditions for copying, distribution and 57 | modification follow. 58 | 59 | GNU GENERAL PUBLIC LICENSE 60 | TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION 61 | 62 | 0. This License applies to any program or other work which contains 63 | a notice placed by the copyright holder saying it may be distributed 64 | under the terms of this General Public License. The "Program", below, 65 | refers to any such program or work, and a "work based on the Program" 66 | means either the Program or any derivative work under copyright law: 67 | that is to say, a work containing the Program or a portion of it, 68 | either verbatim or with modifications and/or translated into another 69 | language. (Hereinafter, translation is included without limitation in 70 | the term "modification".) Each licensee is addressed as "you". 71 | 72 | Activities other than copying, distribution and modification are not 73 | covered by this License; they are outside its scope. The act of 74 | running the Program is not restricted, and the output from the Program 75 | is covered only if its contents constitute a work based on the 76 | Program (independent of having been made by running the Program). 77 | Whether that is true depends on what the Program does. 78 | 79 | 1. You may copy and distribute verbatim copies of the Program's 80 | source code as you receive it, in any medium, provided that you 81 | conspicuously and appropriately publish on each copy an appropriate 82 | copyright notice and disclaimer of warranty; keep intact all the 83 | notices that refer to this License and to the absence of any warranty; 84 | and give any other recipients of the Program a copy of this License 85 | along with the Program. 86 | 87 | You may charge a fee for the physical act of transferring a copy, and 88 | you may at your option offer warranty protection in exchange for a fee. 89 | 90 | 2. You may modify your copy or copies of the Program or any portion 91 | of it, thus forming a work based on the Program, and copy and 92 | distribute such modifications or work under the terms of Section 1 93 | above, provided that you also meet all of these conditions: 94 | 95 | a) You must cause the modified files to carry prominent notices 96 | stating that you changed the files and the date of any change. 97 | 98 | b) You must cause any work that you distribute or publish, that in 99 | whole or in part contains or is derived from the Program or any 100 | part thereof, to be licensed as a whole at no charge to all third 101 | parties under the terms of this License. 102 | 103 | c) If the modified program normally reads commands interactively 104 | when run, you must cause it, when started running for such 105 | interactive use in the most ordinary way, to print or display an 106 | announcement including an appropriate copyright notice and a 107 | notice that there is no warranty (or else, saying that you provide 108 | a warranty) and that users may redistribute the program under 109 | these conditions, and telling the user how to view a copy of this 110 | License. (Exception: if the Program itself is interactive but 111 | does not normally print such an announcement, your work based on 112 | the Program is not required to print an announcement.) 113 | 114 | These requirements apply to the modified work as a whole. If 115 | identifiable sections of that work are not derived from the Program, 116 | and can be reasonably considered independent and separate works in 117 | themselves, then this License, and its terms, do not apply to those 118 | sections when you distribute them as separate works. But when you 119 | distribute the same sections as part of a whole which is a work based 120 | on the Program, the distribution of the whole must be on the terms of 121 | this License, whose permissions for other licensees extend to the 122 | entire whole, and thus to each and every part regardless of who wrote it. 123 | 124 | Thus, it is not the intent of this section to claim rights or contest 125 | your rights to work written entirely by you; rather, the intent is to 126 | exercise the right to control the distribution of derivative or 127 | collective works based on the Program. 128 | 129 | In addition, mere aggregation of another work not based on the Program 130 | with the Program (or with a work based on the Program) on a volume of 131 | a storage or distribution medium does not bring the other work under 132 | the scope of this License. 133 | 134 | 3. You may copy and distribute the Program (or a work based on it, 135 | under Section 2) in object code or executable form under the terms of 136 | Sections 1 and 2 above provided that you also do one of the following: 137 | 138 | a) Accompany it with the complete corresponding machine-readable 139 | source code, which must be distributed under the terms of Sections 140 | 1 and 2 above on a medium customarily used for software interchange; or, 141 | 142 | b) Accompany it with a written offer, valid for at least three 143 | years, to give any third party, for a charge no more than your 144 | cost of physically performing source distribution, a complete 145 | machine-readable copy of the corresponding source code, to be 146 | distributed under the terms of Sections 1 and 2 above on a medium 147 | customarily used for software interchange; or, 148 | 149 | c) Accompany it with the information you received as to the offer 150 | to distribute corresponding source code. (This alternative is 151 | allowed only for noncommercial distribution and only if you 152 | received the program in object code or executable form with such 153 | an offer, in accord with Subsection b above.) 154 | 155 | The source code for a work means the preferred form of the work for 156 | making modifications to it. For an executable work, complete source 157 | code means all the source code for all modules it contains, plus any 158 | associated interface definition files, plus the scripts used to 159 | control compilation and installation of the executable. However, as a 160 | special exception, the source code distributed need not include 161 | anything that is normally distributed (in either source or binary 162 | form) with the major components (compiler, kernel, and so on) of the 163 | operating system on which the executable runs, unless that component 164 | itself accompanies the executable. 165 | 166 | If distribution of executable or object code is made by offering 167 | access to copy from a designated place, then offering equivalent 168 | access to copy the source code from the same place counts as 169 | distribution of the source code, even though third parties are not 170 | compelled to copy the source along with the object code. 171 | 172 | 4. You may not copy, modify, sublicense, or distribute the Program 173 | except as expressly provided under this License. Any attempt 174 | otherwise to copy, modify, sublicense or distribute the Program is 175 | void, and will automatically terminate your rights under this License. 176 | However, parties who have received copies, or rights, from you under 177 | this License will not have their licenses terminated so long as such 178 | parties remain in full compliance. 179 | 180 | 5. You are not required to accept this License, since you have not 181 | signed it. However, nothing else grants you permission to modify or 182 | distribute the Program or its derivative works. These actions are 183 | prohibited by law if you do not accept this License. Therefore, by 184 | modifying or distributing the Program (or any work based on the 185 | Program), you indicate your acceptance of this License to do so, and 186 | all its terms and conditions for copying, distributing or modifying 187 | the Program or works based on it. 188 | 189 | 6. Each time you redistribute the Program (or any work based on the 190 | Program), the recipient automatically receives a license from the 191 | original licensor to copy, distribute or modify the Program subject to 192 | these terms and conditions. You may not impose any further 193 | restrictions on the recipients' exercise of the rights granted herein. 194 | You are not responsible for enforcing compliance by third parties to 195 | this License. 196 | 197 | 7. If, as a consequence of a court judgment or allegation of patent 198 | infringement or for any other reason (not limited to patent issues), 199 | conditions are imposed on you (whether by court order, agreement or 200 | otherwise) that contradict the conditions of this License, they do not 201 | excuse you from the conditions of this License. If you cannot 202 | distribute so as to satisfy simultaneously your obligations under this 203 | License and any other pertinent obligations, then as a consequence you 204 | may not distribute the Program at all. For example, if a patent 205 | license would not permit royalty-free redistribution of the Program by 206 | all those who receive copies directly or indirectly through you, then 207 | the only way you could satisfy both it and this License would be to 208 | refrain entirely from distribution of the Program. 209 | 210 | If any portion of this section is held invalid or unenforceable under 211 | any particular circumstance, the balance of the section is intended to 212 | apply and the section as a whole is intended to apply in other 213 | circumstances. 214 | 215 | It is not the purpose of this section to induce you to infringe any 216 | patents or other property right claims or to contest validity of any 217 | such claims; this section has the sole purpose of protecting the 218 | integrity of the free software distribution system, which is 219 | implemented by public license practices. Many people have made 220 | generous contributions to the wide range of software distributed 221 | through that system in reliance on consistent application of that 222 | system; it is up to the author/donor to decide if he or she is willing 223 | to distribute software through any other system and a licensee cannot 224 | impose that choice. 225 | 226 | This section is intended to make thoroughly clear what is believed to 227 | be a consequence of the rest of this License. 228 | 229 | 8. If the distribution and/or use of the Program is restricted in 230 | certain countries either by patents or by copyrighted interfaces, the 231 | original copyright holder who places the Program under this License 232 | may add an explicit geographical distribution limitation excluding 233 | those countries, so that distribution is permitted only in or among 234 | countries not thus excluded. In such case, this License incorporates 235 | the limitation as if written in the body of this License. 236 | 237 | 9. The Free Software Foundation may publish revised and/or new versions 238 | of the General Public License from time to time. Such new versions will 239 | be similar in spirit to the present version, but may differ in detail to 240 | address new problems or concerns. 241 | 242 | Each version is given a distinguishing version number. If the Program 243 | specifies a version number of this License which applies to it and "any 244 | later version", you have the option of following the terms and conditions 245 | either of that version or of any later version published by the Free 246 | Software Foundation. If the Program does not specify a version number of 247 | this License, you may choose any version ever published by the Free Software 248 | Foundation. 249 | 250 | 10. If you wish to incorporate parts of the Program into other free 251 | programs whose distribution conditions are different, write to the author 252 | to ask for permission. For software which is copyrighted by the Free 253 | Software Foundation, write to the Free Software Foundation; we sometimes 254 | make exceptions for this. Our decision will be guided by the two goals 255 | of preserving the free status of all derivatives of our free software and 256 | of promoting the sharing and reuse of software generally. 257 | 258 | NO WARRANTY 259 | 260 | 11. BECAUSE THE PROGRAM IS LICENSED FREE OF CHARGE, THERE IS NO WARRANTY 261 | FOR THE PROGRAM, TO THE EXTENT PERMITTED BY APPLICABLE LAW. EXCEPT WHEN 262 | OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR OTHER PARTIES 263 | PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED 264 | OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF 265 | MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. THE ENTIRE RISK AS 266 | TO THE QUALITY AND PERFORMANCE OF THE PROGRAM IS WITH YOU. SHOULD THE 267 | PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF ALL NECESSARY SERVICING, 268 | REPAIR OR CORRECTION. 269 | 270 | 12. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING 271 | WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY AND/OR 272 | REDISTRIBUTE THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES, 273 | INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING 274 | OUT OF THE USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED 275 | TO LOSS OF DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY 276 | YOU OR THIRD PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER 277 | PROGRAMS), EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE 278 | POSSIBILITY OF SUCH DAMAGES. 279 | 280 | END OF TERMS AND CONDITIONS 281 | 282 | How to Apply These Terms to Your New Programs 283 | 284 | If you develop a new program, and you want it to be of the greatest 285 | possible use to the public, the best way to achieve this is to make it 286 | free software which everyone can redistribute and change under these terms. 287 | 288 | To do so, attach the following notices to the program. It is safest 289 | to attach them to the start of each source file to most effectively 290 | convey the exclusion of warranty; and each file should have at least 291 | the "copyright" line and a pointer to where the full notice is found. 292 | 293 | 294 | Copyright (C) 295 | 296 | This program is free software; you can redistribute it and/or modify 297 | it under the terms of the GNU General Public License as published by 298 | the Free Software Foundation; either version 2 of the License, or 299 | (at your option) any later version. 300 | 301 | This program is distributed in the hope that it will be useful, 302 | but WITHOUT ANY WARRANTY; without even the implied warranty of 303 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 304 | GNU General Public License for more details. 305 | 306 | You should have received a copy of the GNU General Public License 307 | along with this program; if not, write to the Free Software 308 | Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA 309 | 310 | 311 | Also add information on how to contact you by electronic and paper mail. 312 | 313 | If the program is interactive, make it output a short notice like this 314 | when it starts in an interactive mode: 315 | 316 | Gnomovision version 69, Copyright (C) year name of author 317 | Gnomovision comes with ABSOLUTELY NO WARRANTY; for details type `show w'. 318 | This is free software, and you are welcome to redistribute it 319 | under certain conditions; type `show c' for details. 320 | 321 | The hypothetical commands `show w' and `show c' should show the appropriate 322 | parts of the General Public License. Of course, the commands you use may 323 | be called something other than `show w' and `show c'; they could even be 324 | mouse-clicks or menu items--whatever suits your program. 325 | 326 | You should also get your employer (if you work as a programmer) or your 327 | school, if any, to sign a "copyright disclaimer" for the program, if 328 | necessary. Here is a sample; alter the names: 329 | 330 | Yoyodyne, Inc., hereby disclaims all copyright interest in the program 331 | `Gnomovision' (which makes passes at compilers) written by James Hacker. 332 | 333 | , 1 April 1989 334 | Ty Coon, President of Vice 335 | 336 | This General Public License does not permit incorporating your program into 337 | proprietary programs. If your program is a subroutine library, you may 338 | consider it more useful to permit linking proprietary applications with the 339 | library. If this is what you want to do, use the GNU Library General 340 | Public License instead of this License. 341 | -------------------------------------------------------------------------------- /README: -------------------------------------------------------------------------------- 1 | PHP extension for ffmpeg 2 | ======================== 3 | 4 | Description 5 | ----------- 6 | ffmpeg-php is an extension for PHP that adds an easy to use, object-oriented API for accessing and retrieving information from video and audio files. It has methods for returning frames from movie files as images that can be manipulated using PHP's image functions. This works well for automatically creating thumbnail images from movies. ffmpeg-php is also useful for reporting the duration and bitrate of audio files (mp3, wma...). ffmpeg-php can access many of the video formats supported by ffmpeg (mov, avi, mpg, wmv...). 7 | 8 | Originally hosted at http://ffmpeg-php.sourceforge.net, the project seems to be abandoned right now. 9 | So here is a fork of it with minor modifications required to make it work with recent PHP versions. 10 | -------------------------------------------------------------------------------- /TODO: -------------------------------------------------------------------------------- 1 | Use ffmpeg's output_example.c to generate video for tests. This will allow to remove the test videos, making the distribution smaller. 2 | Add option to preserve aspect in frame->resize() 3 | -------------------------------------------------------------------------------- /config.m4: -------------------------------------------------------------------------------- 1 | PHP_ARG_WITH(ffmpeg,for ffmpeg support, 2 | [ --with-ffmpeg[=DIR] Include ffmpeg support (requires ffmpeg >= 0.5).]) 3 | 4 | PHP_ARG_ENABLE(skip-gd-check, whether to force gd support in ffmpeg-php, [ --enable-skip-gd-check skip checks for gd libs and assume they are present.], no, no) 5 | 6 | if test "$PHP_SKIP_GD_CHECK" != "no"; then 7 | AC_DEFINE(HAVE_LIBGD20, 1, [Define to 1 if the GD functions are available in php]) 8 | fi 9 | 10 | dnl Determine path to ffmpeg libs 11 | if test "$PHP_FFMPEG" != "no"; then 12 | 13 | dnl Default directories to check for ffmpeg headers 14 | INC_CHECK_DIRS="/usr/local /usr" 15 | 16 | dnl User has specified using --with=ffmpeg=[dir] a directory where we should 17 | dnl look for ffmpeg headers. 18 | if test "$PHP_FFMPEG" != "yes"; then 19 | INC_CHECK_DIRS="$PHP_FFMPEG" 20 | fi 21 | 22 | AC_MSG_CHECKING(for ffmpeg headers) 23 | for i in $INC_CHECK_DIRS ; do 24 | if test -f $i/include/libavcodec/avcodec.h; then 25 | dnl ffmpeg svn revision 12194 and newer put each header in its own dir 26 | dnl so we have to include them all. 27 | dnl PHP_ADD_INCLUDE($i/include/libavcodec/) 28 | dnl PHP_ADD_INCLUDE($i/include/libavformat/) 29 | dnl PHP_ADD_INCLUDE($i/include/libavutil/) 30 | dnl PHP_ADD_INCLUDE($i/include/libswscale/) 31 | dnl PHP_ADD_INCLUDE($i/include/libavfilter/) 32 | dnl PHP_ADD_INCLUDE($i/include/libavdevice/) 33 | FFMPEG_INC_FOUND=$i/include 34 | break 35 | fi 36 | done 37 | 38 | if test -z "$FFMPEG_INC_FOUND"; then 39 | AC_MSG_RESULT() 40 | AC_MSG_ERROR([ffmpeg headers not found. Make sure ffmpeg is compiled as shared libraries using the --enable-shared option]) 41 | else 42 | AC_MSG_RESULT(...found in $FFMPEG_INC_FOUND) 43 | fi 44 | 45 | 46 | AC_MSG_CHECKING(for ffmpeg libavcodec.so) 47 | for i in $PHP_FFMPEG /usr/local /usr ; do 48 | if test -f $i/lib/libavcodec.so; then 49 | FFMPEG_LIBDIR=$i/lib 50 | fi 51 | dnl PATCH: 1785450 x86_64 support (Bent Nagstrup Terp) 52 | if test -f $i/lib64/libavcodec.so; then 53 | FFMPEG_LIBDIR=$i/lib64 54 | fi 55 | dnl MacOS-X support (Alexey Zakhlestin) 56 | if test -f $i/lib/libavcodec.dylib; then 57 | FFMPEG_LIBDIR=$i/lib 58 | fi 59 | done 60 | 61 | PHP_ADD_LIBRARY_WITH_PATH(avcodec, $FFMPEG_LIBDIR, FFMPEG_SHARED_LIBADD) 62 | PHP_ADD_LIBRARY_WITH_PATH(avformat, $FFMPEG_LIBDIR, FFMPEG_SHARED_LIBADD) 63 | PHP_ADD_LIBRARY_WITH_PATH(avutil, $FFMPEG_LIBDIR, FFMPEG_SHARED_LIBADD) 64 | 65 | 66 | if test -z "$FFMPEG_LIBDIR"; then 67 | AC_MSG_RESULT() 68 | AC_MSG_ERROR(ffmpeg shared libraries not found. Make sure ffmpeg is compiled as shared libraries using the --enable-shared option) 69 | else 70 | dnl For debugging 71 | AC_MSG_RESULT(...found in $FFMPEG_LIBDIR) 72 | fi 73 | 74 | dnl check if libavcodec contains img_convert 75 | dnl if not, that means that libswscale is compiled in 76 | AC_MSG_CHECKING(for ffmpeg swscale support) 77 | SAVED_LIBS=$LIBS 78 | LIBS="$LIBS -lavcodec" 79 | SAVED_CFLAGS=$CFLAGS 80 | CFLAGS="$CFLAGS -I $INCLUDES" 81 | 82 | AC_TRY_LINK([ #include ], 83 | [ img_convert(0, 0, 0, 0, 0, 0) ], 84 | [ enable_ffmpeg_swscale=no ], 85 | [ enable_ffmpeg_swscale=yes ] ) 86 | AC_MSG_RESULT($enable_ffmpeg_swscale) 87 | LIBS=$SAVED_LIBS 88 | CFLAGS=$SAVED_CFLAGS 89 | 90 | if test "$enable_ffmpeg_swscale" == yes; then 91 | AC_DEFINE(HAVE_SWSCALER, 1, [Define to 1 if software scaler is compiled into ffmpeg]) 92 | PHP_ADD_LIBRARY_WITH_PATH(swscale, $FFMPEG_LIBDIR, FFMPEG_SHARED_LIBADD) 93 | else 94 | dnl Ignore deprecation warnings that using img_convert generates these days 95 | CFLAGS="$CFLAGS -Wno-deprecated-declarations" 96 | fi 97 | 98 | dnl CFLAGS="$CFLAGS -Wall -fno-strict-aliasing" 99 | 100 | PHP_NEW_EXTENSION(ffmpeg, ffmpeg-php.c ffmpeg_movie.c ffmpeg_frame.c ffmpeg_errorhandler.c ffmpeg_tools.c, $ext_shared) 101 | dnl PHP_ADD_EXTENSION_DEP(ffmpeg, gd) 102 | 103 | PHP_SUBST(FFMPEG_SHARED_LIBADD) 104 | AC_DEFINE(HAVE_FFMPEG_PHP,1,[ ]) 105 | 106 | dnl PHP_DEBUG_MACRO(test.dbg) 107 | fi 108 | -------------------------------------------------------------------------------- /ffmpeg-php.c: -------------------------------------------------------------------------------- 1 | /* 2 | This file is part of ffmpeg-php 3 | 4 | Copyright (C) 2004-2008 Todd Kirby (ffmpeg.php AT gmail.com) 5 | 6 | This program is free software; you can redistribute it and/or modify 7 | it under the terms of the GNU General Public License as published by 8 | the Free Software Foundation; either version 2 of the License, or 9 | (at your option) any later version. 10 | 11 | This program is distributed in the hope that it will be useful, 12 | but WITHOUT ANY WARRANTY; without even the implied warranty of 13 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 14 | GNU General Public License for more details. 15 | 16 | You should have received a copy of the GNU General Public License 17 | along with this program; if not, write to the Free Software 18 | Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA 19 | 20 | In addition, as a special exception, the copyright holders of ffmpeg-php 21 | give you permission to combine ffmpeg-php with code included in the 22 | standard release of PHP under the PHP license (or modified versions of 23 | such code, with unchanged license). You may copy and distribute such a 24 | system following the terms of the GNU GPL for ffmpeg-php and the licenses 25 | of the other code concerned, provided that you include the source code of 26 | that other code when and as the GNU GPL requires distribution of source code. 27 | 28 | You must obey the GNU General Public License in all respects for all of the 29 | code used other than standard release of PHP. If you modify this file, you 30 | may extend this exception to your version of the file, but you are not 31 | obligated to do so. If you do not wish to do so, delete this exception 32 | statement from your version. 33 | 34 | */ 35 | 36 | #ifdef HAVE_CONFIG_H 37 | #include "config.h" 38 | #endif 39 | 40 | #include "php.h" 41 | 42 | #include 43 | #include 44 | 45 | #if HAVE_SWSCALER 46 | #include 47 | #endif 48 | 49 | #include "php_ini.h" 50 | #include "php_globals.h" 51 | #include "ext/standard/info.h" 52 | 53 | #include "php_ffmpeg.h" 54 | #include "ffmpeg_errorhandler.h" 55 | 56 | #define FFMPEG_PHP_VERSION "0.7.0" 57 | 58 | zend_module_entry ffmpeg_module_entry = { 59 | #if ZEND_MODULE_API_NO >= 20010901 60 | STANDARD_MODULE_HEADER, 61 | #endif 62 | "ffmpeg", 63 | NULL, 64 | PHP_MINIT(ffmpeg), 65 | PHP_MSHUTDOWN(ffmpeg), 66 | NULL, 67 | NULL, 68 | PHP_MINFO(ffmpeg), 69 | #if ZEND_MODULE_API_NO >= 20010901 70 | FFMPEG_PHP_VERSION, 71 | #endif 72 | STANDARD_MODULE_PROPERTIES 73 | }; 74 | 75 | 76 | #ifdef COMPILE_DL_FFMPEG 77 | ZEND_GET_MODULE(ffmpeg); 78 | #endif 79 | 80 | #define FFMPEG_AVMEDIA_TYPE(flag) (flag == AVMEDIA_TYPE_VIDEO ? "v" : (flag == AVMEDIA_TYPE_AUDIO ? "a" : (flag == AVMEDIA_TYPE_SUBTITLE ? "s" : "u"))) 81 | 82 | extern void register_ffmpeg_movie_class(int); 83 | extern void register_ffmpeg_frame_class(int); 84 | 85 | PHP_INI_BEGIN() 86 | PHP_INI_ENTRY("ffmpeg.allow_persistent", "0", PHP_INI_ALL, NULL) 87 | PHP_INI_ENTRY("ffmpeg.show_warnings", "0", PHP_INI_ALL, NULL) 88 | PHP_INI_END() 89 | 90 | 91 | /* {{{ php module init function 92 | */ 93 | PHP_MINIT_FUNCTION(ffmpeg) 94 | { 95 | /* register all codecs */ 96 | av_register_all(); 97 | 98 | REGISTER_INI_ENTRIES(); 99 | 100 | if (INI_BOOL("ffmpeg.show_warnings")) { 101 | av_log_set_callback(ffmpeg_errorhandler); 102 | } else { 103 | av_log_set_callback(ffmpeg_hide_errors); 104 | } 105 | 106 | register_ffmpeg_movie_class(module_number); 107 | register_ffmpeg_frame_class(module_number); 108 | 109 | REGISTER_STRING_CONSTANT("FFMPEG_PHP_VERSION_STRING", 110 | FFMPEG_PHP_VERSION, CONST_CS | CONST_PERSISTENT); 111 | REGISTER_STRING_CONSTANT("FFMPEG_PHP_BUILD_DATE_STRING", 112 | __DATE__ " " __TIME__, CONST_CS | CONST_PERSISTENT); 113 | REGISTER_LONG_CONSTANT("LIBAVCODEC_VERSION_NUMBER", 114 | avcodec_version(), CONST_CS | CONST_PERSISTENT); 115 | #ifdef LIBAVCODEC_BUILD 116 | REGISTER_LONG_CONSTANT("LIBAVCODEC_BUILD_NUMBER", 117 | LIBAVCODEC_BUILD, CONST_CS | CONST_PERSISTENT); 118 | #else 119 | REGISTER_LONG_CONSTANT("LIBAVCODEC_BUILD_NUMBER", 120 | avcodec_build(), CONST_CS | CONST_PERSISTENT); 121 | #endif 122 | 123 | #if HAVE_LIBGD20 124 | REGISTER_LONG_CONSTANT("FFMPEG_PHP_GD_ENABLED", 1, CONST_CS | CONST_PERSISTENT); 125 | #else 126 | REGISTER_LONG_CONSTANT("FFMPEG_PHP_GD_ENABLED", 0, CONST_CS | CONST_PERSISTENT); 127 | #endif // HAVE_LIBGD20 128 | 129 | return SUCCESS; 130 | } 131 | /* }}} */ 132 | 133 | 134 | /* {{{ php module shutdown function 135 | */ 136 | PHP_MSHUTDOWN_FUNCTION(ffmpeg) 137 | { 138 | // TODO: Free any remaining persistent movies here? 139 | 140 | UNREGISTER_INI_ENTRIES(); 141 | 142 | return SUCCESS; 143 | } 144 | /* }}} */ 145 | 146 | 147 | /* {{{ php info function 148 | Add an entry for ffmpeg-php support in phpinfo() */ 149 | PHP_MINFO_FUNCTION(ffmpeg) 150 | { 151 | php_info_print_table_start(); 152 | // php_info_print_table_header(2, "ffmpeg-php", "enabled"); 153 | php_info_print_table_row(2, "ffmpeg-php version", FFMPEG_PHP_VERSION); 154 | php_info_print_table_row(2, "ffmpeg-php built on", __DATE__ " " __TIME__); 155 | #if HAVE_LIBGD20 156 | php_info_print_table_row(2, "ffmpeg-php gd support ", "enabled"); 157 | #else 158 | php_info_print_table_row(2, "ffmpeg-php gd support ", "disabled"); 159 | #endif // HAVE_LIBGD20 160 | php_info_print_table_row(2, "ffmpeg libavcodec version", LIBAVCODEC_IDENT); 161 | php_info_print_table_row(2, "ffmpeg libavcodec license", avcodec_license()); //people need to know if they can distribute 162 | php_info_print_table_row(2, "ffmpeg libavformat version", LIBAVFORMAT_IDENT); 163 | php_info_print_table_row(2, "ffmpeg libavformat license", avformat_license()); 164 | #if HAVE_SWSCALER 165 | php_info_print_table_row(2, "ffmpeg swscaler version", LIBSWSCALE_IDENT); 166 | php_info_print_table_row(2, "ffmpeg swscaler license", swscale_license()); 167 | #else 168 | php_info_print_table_row(2, "ffmpeg swscaler", "disabled"); 169 | #endif 170 | 171 | //phpinfo should show the codec list available to aid developers 172 | AVCodec *next_codec = NULL; 173 | char *m_codec_list = NULL; 174 | long m_codec_list_len = 0; 175 | long m_codec_len = 0; 176 | while((next_codec = av_codec_next(next_codec))) { 177 | //go through each codec and add to the list 178 | m_codec_len = (strlen(next_codec->name) + 5); 179 | m_codec_list_len += m_codec_len; 180 | m_codec_list = realloc(m_codec_list, m_codec_list_len); 181 | 182 | //wtf? always gives buffer overflows... 183 | //sprintf(m_codec_list+(m_codec_list_len-m_codec_len), "%s(%c), ", next_codec->name, FFMPEG_AVMEDIA_TYPE(next_codec->type)); 184 | 185 | //doing it the long way instead 186 | memcpy(m_codec_list+(m_codec_list_len-m_codec_len), next_codec->name, m_codec_len); 187 | memcpy(m_codec_list+(m_codec_list_len-5), "(", 1); 188 | memcpy(m_codec_list+(m_codec_list_len-4), FFMPEG_AVMEDIA_TYPE(next_codec->type), 1); 189 | memcpy(m_codec_list+(m_codec_list_len-3), ")", 1); 190 | memcpy(m_codec_list+(m_codec_list_len-2), ", ", 2); 191 | } 192 | 193 | m_codec_list = realloc(m_codec_list, m_codec_list_len+1); 194 | m_codec_list[m_codec_list_len] = '\0'; 195 | 196 | //give the user a list of available codecs 197 | //should really add (dec/enc) on the end of each to show each is capable of 198 | //consider giving each codec its own row in in a codec table displaying if the codec is cable of a/v/s and enc/dec 199 | php_info_print_table_row(2, "ffmpeg codec_list", m_codec_list); 200 | 201 | php_info_print_table_end(); 202 | 203 | DISPLAY_INI_ENTRIES(); 204 | } 205 | /* }}} */ 206 | 207 | 208 | /* 209 | * Local variables: 210 | * tab-width: 4 211 | * c-basic-offset: 4 212 | * End: 213 | * vim600: noet sw=4 ts=4 214 | * vim<600: noet sw=4 ts=4 215 | */ 216 | -------------------------------------------------------------------------------- /ffmpeg-phpinfo.php: -------------------------------------------------------------------------------- 1 | '; 10 | echo ''; 11 | echo ''; 12 | echo 'Ffmpeg-php Extension Test Page'; 13 | echo ''; 14 | echo ''; 38 | echo ''; 39 | echo '
'; 40 | echo ''; 41 | echo ""; 42 | echo "
Ffmpeg-php Extension Version Info
"; 43 | printf("Ffmpeg-php version string: %s
", FFMPEG_PHP_VERSION_STRING); 44 | printf("libavcodec build number: %d
", LIBAVCODEC_BUILD_NUMBER); 45 | printf("libavcodec version number: %d
", LIBAVCODEC_VERSION_NUMBER); 46 | printf("libavcodec build number: %d
", LIBAVCODEC_BUILD_NUMBER); 47 | echo "
"; 48 | 49 | echo "

"; 50 | print_class_methods("ffmpeg_movie"); 51 | echo "

"; 52 | print_class_methods("ffmpeg_frame"); 53 | 54 | // get an array for movies from the test media directory 55 | $movies = getDirFiles(dirname(__FILE__) . '/tests/test_media'); 56 | 57 | $i = 1; 58 | foreach($movies as $movie) { 59 | $mov = new ffmpeg_movie($movie); 60 | 61 | echo ''; 62 | printf('', basename($mov->getFilename())); 63 | printf('', $mov->getFileName()); 64 | printf("", $mov->getFileName()); 65 | printf("", $mov->getDuration()); 66 | printf("", $mov->getFrameCount()); 67 | printf("", $mov->getFrameRate()); 68 | printf("", $mov->getComment()); 69 | printf("", $mov->getTitle()); 70 | printf("", $mov->getAuthor()); 71 | printf("", $mov->getCopyright()); 72 | printf("", $mov->getBitRate()); 73 | printf("", $mov->hasAudio() == 0 ? 'No' : 'Yes'); 74 | if ($mov->hasAudio()) { 75 | printf("", $mov->getAudioStreamId()); 76 | printf("", $mov->getAudioCodec()); 77 | printf("", $mov->getAudioBitRate()); 78 | printf("", $mov->getAudioSampleRate()); 79 | printf("", $mov->getAudioChannels()); 80 | } 81 | printf("", $mov->hasVideo() == 0 ? 'No' : 'Yes'); 82 | if ($mov->hasVideo()) { 83 | printf("", $mov->getFrameHeight()); 84 | printf("", $mov->getFrameWidth()); 85 | printf("", $mov->getVideoStreamId()); 86 | printf("", $mov->getVideoCodec()); 87 | printf("", $mov->getVideoBitRate()); 88 | printf("", $mov->getPixelFormat()); 89 | printf("", $mov->getPixelAspectRatio()); 90 | printf("", is_object($mov->getFrame(10)) ? 'true' : 'false'); 91 | printf("", $mov->getFrameNumber()); 92 | $thumbpath = "$i.png"; 93 | if (make_test_thumbnail(rand(1,100), $mov->getFilename(), $thumbpath)) { 94 | printf('', $thumbpath); 95 | } 96 | } 97 | 98 | echo "
Processing Test File: %s...
MethodResult
file name:%s
duration%s seconds
frame count%s
frame rate%0.3f fps
comment%s
title%s
author%s
copyright%s
get bit rate%d
has audio%s
get audio stream id%s
get audio codec%s
get audio bit rate%d
get audio sample rate%d
get audio channels%s
has video%s
frame height%d pixels
frame width%d pixels
get video stream id%s
get video codec%s
get video bit rate%d
get pixel format%s
get pixel aspect ratio%s
get frame%s
get frame number%d
Random ThumbnailTest Image
"; 99 | echo "

"; 100 | $i++; 101 | } 102 | 103 | echo '

'; 104 | 105 | if (php_sapi_name() == 'cli') { 106 | $content = ob_get_clean(); 107 | $content = br2nl($content); 108 | $content = strip_tags($content); 109 | echo $content; 110 | } else { 111 | ob_end_flush(); 112 | } 113 | 114 | function make_test_thumbnail($frame, $input, $outpath) { 115 | 116 | $mov = new ffmpeg_movie($input); 117 | $ff_frame = $mov->getFrame($frame); 118 | if ($ff_frame) { 119 | $gd_image = $ff_frame->toGDImage(); 120 | if ($gd_image) { 121 | imagepng($gd_image, $outpath); 122 | imagedestroy($gd_image); 123 | } else { 124 | return false; 125 | } 126 | } else { 127 | return false; 128 | } 129 | return true; 130 | } 131 | 132 | 133 | function print_class_methods($class) { 134 | $methods = get_class_methods($class); 135 | echo ''; 136 | echo ""; 137 | if (is_array($methods)) { 138 | foreach($methods as $method) { 139 | echo ""; 140 | } 141 | } else { 142 | echo ""; 143 | } 144 | echo "
Methods available in class '$class'
$method
No Methods Defined
"; 145 | } 146 | 147 | function getDirFiles($dirPath) 148 | { 149 | if ($handle = opendir($dirPath)) 150 | { 151 | while (false !== ($file = readdir($handle))) { 152 | $fullpath = $dirPath . '/' . $file; 153 | if (!is_dir($fullpath) && $file != "CVS" && $file != "." && $file != "..") 154 | $filesArr[] = trim($fullpath); 155 | } 156 | closedir($handle); 157 | } 158 | 159 | return $filesArr; 160 | } 161 | 162 | function br2nl($string) { 163 | return preg_replace('/\/i', "\n", $string); 164 | } 165 | 166 | ?> 167 | -------------------------------------------------------------------------------- /ffmpeg_errorhandler.c: -------------------------------------------------------------------------------- 1 | /* 2 | This file is part of ffmpeg-php 3 | 4 | Copyright (C) 2004-2008 Alexey Zakhlestin 5 | 6 | This program is free software; you can redistribute it and/or modify 7 | it under the terms of the GNU General Public License as published by 8 | the Free Software Foundation; either version 2 of the License, or 9 | (at your option) any later version. 10 | 11 | This program is distributed in the hope that it will be useful, 12 | but WITHOUT ANY WARRANTY; without even the implied warranty of 13 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 14 | GNU General Public License for more details. 15 | 16 | You should have received a copy of the GNU General Public License 17 | along with this program; if not, write to the Free Software 18 | Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA 19 | 20 | In addition, as a special exception, the copyright holders of ffmpeg-php 21 | give you permission to combine ffmpeg-php with code included in the 22 | standard release of PHP under the PHP license (or modified versions of 23 | such code, with unchanged license). You may copy and distribute such a 24 | system following the terms of the GNU GPL for ffmpeg-php and the licenses 25 | of the other code concerned, provided that you include the source code of 26 | that other code when and as the GNU GPL requires distribution of source code. 27 | 28 | You must obey the GNU General Public License in all respects for all of the 29 | code used other than standard release of PHP. If you modify this file, you 30 | may extend this exception to your version of the file, but you are not 31 | obligated to do so. If you do not wish to do so, delete this exception 32 | statement from your version. 33 | 34 | */ 35 | 36 | #ifdef HAVE_CONFIG_H 37 | #include "config.h" 38 | #endif 39 | 40 | #include "php.h" 41 | #include 42 | 43 | /* {{{ ffmpeg_errorhandler() 44 | */ 45 | void ffmpeg_errorhandler(void *ptr, int level, const char *msg, va_list args) 46 | { 47 | int php_level; 48 | TSRMLS_FETCH(); 49 | 50 | switch (level) { 51 | case AV_LOG_ERROR: 52 | php_level = E_WARNING; 53 | break; 54 | 55 | case AV_LOG_INFO: 56 | case AV_LOG_DEBUG: 57 | default: 58 | php_level = E_NOTICE; 59 | break; 60 | } 61 | 62 | php_verror("", "", php_level, msg, args TSRMLS_CC); 63 | } 64 | /* }}} */ 65 | 66 | 67 | /* {{{ ffmpeg_hide_errors() 68 | */ 69 | void ffmpeg_hide_errors(void *ptr, int level, const char *msg, va_list args) 70 | { 71 | // NO OP 72 | } 73 | /* }}} */ 74 | 75 | 76 | /* 77 | * Local variables: 78 | * tab-width: 4 79 | * c-basic-offset: 4 80 | * End: 81 | * vim600: noet sw=4 ts=4 82 | * vim<600: noet sw=4 ts=4 83 | */ 84 | -------------------------------------------------------------------------------- /ffmpeg_errorhandler.h: -------------------------------------------------------------------------------- 1 | /* 2 | This file is part of ffmpeg-php 3 | 4 | Copyright (C) 2004-2008 Alexey Zakhlestin 5 | 6 | This program is free software; you can redistribute it and/or modify 7 | it under the terms of the GNU General Public License as published by 8 | the Free Software Foundation; either version 2 of the License, or 9 | (at your option) any later version. 10 | 11 | This program is distributed in the hope that it will be useful, 12 | but WITHOUT ANY WARRANTY; without even the implied warranty of 13 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 14 | GNU General Public License for more details. 15 | 16 | You should have received a copy of the GNU General Public License 17 | along with this program; if not, write to the Free Software 18 | Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA 19 | 20 | In addition, as a special exception, the copyright holders of ffmpeg-php 21 | give you permission to combine ffmpeg-php with code included in the 22 | standard release of PHP under the PHP license (or modified versions of 23 | such code, with unchanged license). You may copy and distribute such a 24 | system following the terms of the GNU GPL for ffmpeg-php and the licenses 25 | of the other code concerned, provided that you include the source code of 26 | that other code when and as the GNU GPL requires distribution of source code. 27 | 28 | You must obey the GNU General Public License in all respects for all of the 29 | code used other than standard release of PHP. If you modify this file, you 30 | may extend this exception to your version of the file, but you are not 31 | obligated to do so. If you do not wish to do so, delete this exception 32 | statement from your version. 33 | 34 | */ 35 | 36 | 37 | void ffmpeg_errorhandler(void *ptr, int level, const char *msg, va_list args); 38 | void ffmpeg_hide_errors(void *ptr, int level, const char *msg, va_list args); 39 | -------------------------------------------------------------------------------- /ffmpeg_frame.h: -------------------------------------------------------------------------------- 1 | /* 2 | This file is part of ffmpeg-php 3 | 4 | Copyright (C) 2004-2008 Todd Kirby (ffmpeg.php AT gmail.com) 5 | 6 | This program is free software; you can redistribute it and/or modify 7 | it under the terms of the GNU General Public License as published by 8 | the Free Software Foundation; either version 2 of the License, or 9 | (at your option) any later version. 10 | 11 | This program is distributed in the hope that it will be useful, 12 | but WITHOUT ANY WARRANTY; without even the implied warranty of 13 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 14 | GNU General Public License for more details. 15 | 16 | You should have received a copy of the GNU General Public License 17 | along with this program; if not, write to the Free Software 18 | Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA 19 | 20 | In addition, as a special exception, the copyright holders of ffmpeg-php 21 | give you permission to combine ffmpeg-php with code included in the 22 | standard release of PHP under the PHP license (or modified versions of 23 | such code, with unchanged license). You may copy and distribute such a 24 | system following the terms of the GNU GPL for ffmpeg-php and the licenses 25 | of the other code concerned, provided that you include the source code of 26 | that other code when and as the GNU GPL requires distribution of source code. 27 | 28 | You must obey the GNU General Public License in all respects for all of the 29 | code used other than standard release of PHP. If you modify this file, you 30 | may extend this exception to your version of the file, but you are not 31 | obligated to do so. If you do not wish to do so, delete this exception 32 | statement from your version. 33 | 34 | */ 35 | 36 | #ifndef FFMPEG_FRAME_H 37 | #define FFMPEG_FRAME_H 38 | 39 | #ifdef HAVE_CONFIG_H 40 | #include "config.h" 41 | #endif 42 | 43 | #include "php_version.h" 44 | 45 | #include 46 | #include 47 | #include 48 | 49 | /* frame methods */ 50 | FFMPEG_PHP_METHOD(ffmpeg_frame, getWidth); 51 | FFMPEG_PHP_METHOD(ffmpeg_frame, getHeight); 52 | FFMPEG_PHP_METHOD(ffmpeg_frame, resize); 53 | FFMPEG_PHP_METHOD(ffmpeg_frame, isKeyFrame); 54 | FFMPEG_PHP_METHOD(ffmpeg_frame, getPresentationTimestamp); 55 | 56 | #if HAVE_LIBGD20 57 | FFMPEG_PHP_CONSTRUCTOR(ffmpeg_frame, __construct); 58 | 59 | FFMPEG_PHP_METHOD(ffmpeg_frame, toGDImage); 60 | #endif // HAVE_LIBGD20 61 | 62 | typedef struct { 63 | AVFrame *av_frame; 64 | int width; 65 | int height; 66 | int pixel_format; 67 | int keyframe; 68 | int64_t pts; 69 | } ff_frame_context; 70 | 71 | ff_frame_context* _php_create_ffmpeg_frame(INTERNAL_FUNCTION_PARAMETERS); 72 | 73 | int _php_convert_frame(ff_frame_context *ff_frame, int new_fmt); 74 | 75 | #define GET_FRAME_RESOURCE(ffmpeg_frame_object, ffmpeg_frame) {\ 76 | zval **_tmp_zval;\ 77 | if (zend_hash_find(Z_OBJPROP_P(ffmpeg_frame_object), "ffmpeg_frame",\ 78 | sizeof("ffmpeg_frame"), (void **)&_tmp_zval) == FAILURE) {\ 79 | php_error_docref(NULL TSRMLS_CC, E_WARNING, "Unable to locate ffmpeg_frame resource in this object.");\ 80 | RETURN_FALSE;\ 81 | }\ 82 | \ 83 | ZEND_FETCH_RESOURCE(ffmpeg_frame, ff_frame_context*, _tmp_zval, -1,\ 84 | "ffmpeg_frame", le_ffmpeg_frame);\ 85 | }\ 86 | 87 | #endif // FFMPEG_FRAME_H 88 | 89 | /* 90 | * Local variables: 91 | * tab-width: 4 92 | * c-basic-offset: 4 93 | * End: 94 | * vim600: noet sw=4 ts=4 95 | * vim<600: noet sw=4 ts=4 96 | */ 97 | -------------------------------------------------------------------------------- /ffmpeg_movie.h: -------------------------------------------------------------------------------- 1 | /* 2 | This file is part of ffmpeg-php 3 | 4 | Copyright (C) 2004-2008 Todd Kirby (ffmpeg.php AT gmail.com) 5 | 6 | This program is free software; you can redistribute it and/or modify 7 | it under the terms of the GNU General Public License as published by 8 | the Free Software Foundation; either version 2 of the License, or 9 | (at your option) any later version. 10 | 11 | This program is distributed in the hope that it will be useful, 12 | but WITHOUT ANY WARRANTY; without even the implied warranty of 13 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 14 | GNU General Public License for more details. 15 | 16 | In addition, as a special exception, the copyright holders of ffmpeg-php 17 | give you permission to combine ffmpeg-php with code included in the 18 | standard release of PHP under the PHP license (or modified versions of 19 | such code, with unchanged license). You may copy and distribute such a 20 | system following the terms of the GNU GPL for ffmpeg-php and the licenses 21 | of the other code concerned, provided that you include the source code of 22 | that other code when and as the GNU GPL requires distribution of source code. 23 | 24 | You must obey the GNU General Public License in all respects for all of the 25 | code used other than standard release of PHP. If you modify this file, you 26 | may extend this exception to your version of the file, but you are not 27 | obligated to do so. If you do not wish to do so, delete this exception 28 | statement from your version. 29 | 30 | */ 31 | 32 | #ifndef FFMPEG_MOVIE_H 33 | #define FFMPEG_MOVIE_H 34 | 35 | /* movie constructor */ 36 | FFMPEG_PHP_CONSTRUCTOR(ffmpeg_movie, __construct); 37 | 38 | /* movie methods */ 39 | FFMPEG_PHP_METHOD(ffmpeg_movie, getDuration); 40 | FFMPEG_PHP_METHOD(ffmpeg_movie, getFrameCount); 41 | FFMPEG_PHP_METHOD(ffmpeg_movie, getFrameRate); 42 | FFMPEG_PHP_METHOD(ffmpeg_movie, getFileName); 43 | FFMPEG_PHP_METHOD(ffmpeg_movie, getComment); 44 | FFMPEG_PHP_METHOD(ffmpeg_movie, getTitle); 45 | FFMPEG_PHP_METHOD(ffmpeg_movie, getAuthor); 46 | FFMPEG_PHP_METHOD(ffmpeg_movie, getArtist); 47 | FFMPEG_PHP_METHOD(ffmpeg_movie, getCopyright); 48 | FFMPEG_PHP_METHOD(ffmpeg_movie, getAlbum); 49 | FFMPEG_PHP_METHOD(ffmpeg_movie, getGenre); 50 | FFMPEG_PHP_METHOD(ffmpeg_movie, getTrackNumber); 51 | FFMPEG_PHP_METHOD(ffmpeg_movie, getYear); 52 | FFMPEG_PHP_METHOD(ffmpeg_movie, getFrameWidth); 53 | FFMPEG_PHP_METHOD(ffmpeg_movie, getFrameHeight); 54 | FFMPEG_PHP_METHOD(ffmpeg_movie, getFrameNumber); 55 | FFMPEG_PHP_METHOD(ffmpeg_movie, getPixelFormat); 56 | FFMPEG_PHP_METHOD(ffmpeg_movie, getBitRate); 57 | FFMPEG_PHP_METHOD(ffmpeg_movie, hasAudio); 58 | FFMPEG_PHP_METHOD(ffmpeg_movie, hasVideo); 59 | FFMPEG_PHP_METHOD(ffmpeg_movie, getNextKeyFrame); 60 | FFMPEG_PHP_METHOD(ffmpeg_movie, getFrame); 61 | FFMPEG_PHP_METHOD(ffmpeg_movie, getVideoCodec); 62 | FFMPEG_PHP_METHOD(ffmpeg_movie, getAudioCodec); 63 | FFMPEG_PHP_METHOD(ffmpeg_movie, getAudioChannels); 64 | FFMPEG_PHP_METHOD(ffmpeg_movie, getAudioSampleRate); 65 | FFMPEG_PHP_METHOD(ffmpeg_movie, getAudioBitRate); 66 | FFMPEG_PHP_METHOD(ffmpeg_movie, getVideoBitRate); 67 | FFMPEG_PHP_METHOD(ffmpeg_movie, getPixelAspectRatio); 68 | FFMPEG_PHP_METHOD(ffmpeg_movie, getVideoStreamId); 69 | FFMPEG_PHP_METHOD(ffmpeg_movie, getAudioStreamId); 70 | 71 | #endif // FFMPEG_MOVIE_H 72 | 73 | /* 74 | * Local variables: 75 | * tab-width: 4 76 | * c-basic-offset: 4 77 | * End: 78 | * vim600: noet sw=4 ts=4 79 | * vim<600: noet sw=4 ts=4 80 | */ 81 | -------------------------------------------------------------------------------- /ffmpeg_tools.c: -------------------------------------------------------------------------------- 1 | /* 2 | This file is part of ffmpeg-php 3 | 4 | Copyright (C) 2004-2008 Todd Kirby (ffmpeg.php AT gmail.com) 5 | 6 | This program is free software; you can redistribute it and/or modify 7 | it under the terms of the GNU General Public License as published by 8 | the Free Software Foundation; either version 2 of the License, or 9 | (at your option) any later version. 10 | 11 | This program is distributed in the hope that it will be useful, 12 | but WITHOUT ANY WARRANTY; without even the implied warranty of 13 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 14 | GNU General Public License for more details. 15 | 16 | You should have received a copy of the GNU General Public License 17 | along with this program; if not, write to the Free Software 18 | Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA 19 | 20 | In addition, as a special exception, the copyright holders of ffmpeg-php 21 | give you permission to combine ffmpeg-php with code included in the 22 | standard release of PHP under the PHP license (or modified versions of 23 | such code, with unchanged license). You may copy and distribute such a 24 | system following the terms of the GNU GPL for ffmpeg-php and the licenses 25 | of the other code concerned, provided that you include the source code of 26 | that other code when and as the GNU GPL requires distribution of source code. 27 | 28 | You must obey the GNU General Public License in all respects for all of the 29 | code used other than standard release of PHP. If you modify this file, you 30 | may extend this exception to your version of the file, but you are not 31 | obligated to do so. If you do not wish to do so, delete this exception 32 | statement from your version. 33 | 34 | */ 35 | 36 | #ifdef HAVE_CONFIG_H 37 | #include "config.h" 38 | #endif 39 | 40 | //#include 41 | 42 | #include "ffmpeg_tools.h" 43 | 44 | #if LIBAVCODEC_VERSION_MAJOR >= 52 45 | #include 46 | 47 | /* {{{ ffmpeg_img_convert() 48 | * wrapper around ffmpeg image conversion routines 49 | */ 50 | int img_convert(AVPicture *dst, int dst_pix_fmt, 51 | AVPicture *src, int src_pix_fmt, int src_width, int src_height) 52 | { 53 | struct SwsContext *sws_ctx = NULL; 54 | 55 | // TODO: Try to get cached sws_context first 56 | sws_ctx = sws_getContext(src_width, src_height, 0, 57 | src_width, src_height, dst_pix_fmt, 58 | SWS_BICUBIC, NULL, NULL, NULL); 59 | 60 | if (sws_ctx == NULL){ 61 | return 2; 62 | } 63 | 64 | sws_scale(sws_ctx, src->data, src->linesize, 0, src_height, dst->data, dst->linesize); 65 | sws_freeContext(sws_ctx); 66 | 67 | return 0; 68 | } 69 | /* }}} */ 70 | 71 | 72 | 73 | void img_resample(ImgReSampleContext * context, AVPicture * pxOut, const AVPicture * pxIn) 74 | { 75 | if (context != NULL && context->context != NULL) { 76 | AVPicture shiftedInput; // = {0}; 77 | shiftedInput.data[0] = pxIn->data[0] + pxIn->linesize[0] * 78 | context->bandTop + context->bandLeft; 79 | shiftedInput.data[1] = pxIn->data[1] + (pxIn->linesize[1] * 80 | (context->bandTop / 2)) + (context->bandLeft+1) / 2; 81 | shiftedInput.data[2] = pxIn->data[2] + (pxIn->linesize[2] * 82 | (context->bandTop / 2)) + (context->bandLeft+1) / 2; 83 | shiftedInput.linesize[0] = pxIn->linesize[0]; 84 | shiftedInput.linesize[1] = pxIn->linesize[1]; 85 | shiftedInput.linesize[2] = pxIn->linesize[2]; 86 | sws_scale(context->context, (uint8_t**)shiftedInput.data, 87 | (int*)shiftedInput.linesize, 0, context->height - context->bandBottom - 88 | context->bandTop, pxOut->data, pxOut->linesize); 89 | } 90 | } 91 | 92 | ImgReSampleContext * img_resample_full_init (int owidth, int oheight, int iwidth, int iheight, int topBand, int bottomBand, int leftBand, int rightBand, int padtop, int padbottom, int padleft, int padright) 93 | { 94 | ImgReSampleContext * s = (ImgReSampleContext *)av_malloc(sizeof(ImgReSampleContext)); 95 | if (s == NULL) { 96 | return NULL; 97 | } 98 | int srcSurface = (iwidth - rightBand - leftBand)* (iheight - topBand - bottomBand); 99 | // We use bilinear when the source surface is big, and bicubic when the number of pixels to handle is less than 1 MPixels 100 | s->context = sws_getContext(iwidth - rightBand - leftBand, 101 | iheight - topBand - bottomBand, AV_PIX_FMT_YUV420P, owidth, oheight, 102 | AV_PIX_FMT_YUV420P, srcSurface > 1024000 ? SWS_FAST_BILINEAR : SWS_BICUBIC, 103 | NULL, NULL, NULL); 104 | if (s->context == NULL) { 105 | av_free(s); 106 | return NULL; } 107 | s->bandLeft = leftBand; 108 | s->bandRight = rightBand; 109 | s->bandTop = topBand; 110 | s->bandBottom = bottomBand; 111 | 112 | s->padLeft = padleft; 113 | s->padRight = padright; 114 | s->padTop = padtop; 115 | s->padBottom = padbottom; 116 | 117 | s->width = iwidth; 118 | s->height = iheight; 119 | 120 | s->outWidth = owidth; 121 | s->outHeight = oheight; 122 | 123 | return s; 124 | } 125 | 126 | ImgReSampleContext * img_resample_init (int owidth, int oheight, int iwidth, int iheight) 127 | { 128 | return img_resample_full_init(owidth, oheight, iwidth, iheight, 0, 0, 0, 0, 0, 0, 0, 0); 129 | } 130 | 131 | void img_resample_close(ImgReSampleContext * s) 132 | { 133 | if (s == NULL) return; 134 | sws_freeContext(s->context); 135 | 136 | av_free(s); 137 | } 138 | 139 | #endif 140 | 141 | 142 | /* 143 | * Local variables: 144 | * tab-width: 4 145 | * c-basic-offset: 4 146 | * End: 147 | * vim600: noet sw=4 ts=4 148 | * vim<600: noet sw=4 ts=4 149 | */ 150 | -------------------------------------------------------------------------------- /ffmpeg_tools.h: -------------------------------------------------------------------------------- 1 | /* 2 | This file is part of ffmpeg-php 3 | 4 | Copyright (C) 2004-2008 Todd Kirby (ffmpeg.php AT gmail.com) 5 | 6 | This program is free software; you can redistribute it and/or modify 7 | it under the terms of the GNU General Public License as published by 8 | the Free Software Foundation; either version 2 of the License, or 9 | (at your option) any later version. 10 | 11 | This program is distributed in the hope that it will be useful, 12 | but WITHOUT ANY WARRANTY; without even the implied warranty of 13 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 14 | GNU General Public License for more details. 15 | 16 | You should have received a copy of the GNU General Public License 17 | along with this program; if not, write to the Free Software 18 | Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA 19 | 20 | In addition, as a special exception, the copyright holders of ffmpeg-php 21 | give you permission to combine ffmpeg-php with code included in the 22 | standard release of PHP under the PHP license (or modified versions of 23 | such code, with unchanged license). You may copy and distribute such a 24 | system following the terms of the GNU GPL for ffmpeg-php and the licenses 25 | of the other code concerned, provided that you include the source code of 26 | that other code when and as the GNU GPL requires distribution of source code. 27 | 28 | You must obey the GNU General Public License in all respects for all of the 29 | code used other than standard release of PHP. If you modify this file, you 30 | may extend this exception to your version of the file, but you are not 31 | obligated to do so. If you do not wish to do so, delete this exception 32 | statement from your version. 33 | 34 | */ 35 | 36 | #ifndef FFMPEG_TOOLS_H 37 | #define FFMPEG_TOOLS_H 38 | 39 | #include 40 | 41 | #if LIBAVCODEC_VERSION_MAJOR >= 52 42 | 43 | #include 44 | 45 | // Starting from this version, ImgReSampleContext doesn't exist anymore. 46 | // This code implements the previous functions with a similar interface 47 | typedef struct ImgReSampleContext { 48 | /** The context used for resizing */ 49 | struct SwsContext *context; 50 | /** The source's width */ 51 | int width; 52 | /** The source's height */ 53 | int height; 54 | /** The banding used */ 55 | int bandLeft; 56 | /** The banding used */ 57 | int bandRight; 58 | /** The banding used */ 59 | int bandTop; 60 | /** The banding used */ 61 | int bandBottom; 62 | /** The padding used */ 63 | int padLeft; 64 | /** The padding used */ 65 | int padRight; 66 | /** The padding used */ 67 | int padTop; 68 | /** The padding used */ 69 | int padBottom; 70 | /** The output width */ 71 | int outWidth; 72 | /** The output height */ 73 | int outHeight; 74 | } ImgReSampleContext; 75 | 76 | int img_convert(AVPicture *dst, int dst_pix_fmt, 77 | AVPicture *src, int src_pix_fmt, int src_width, int src_height); 78 | 79 | void img_resample_close(ImgReSampleContext *s); 80 | 81 | void img_resample(ImgReSampleContext * context, AVPicture * out, const AVPicture * in); 82 | 83 | ImgReSampleContext * img_resample_full_init (int owidth, int oheight, 84 | int iwidth, int iheight, 85 | int topBand, int 86 | bottomBand, int leftBand, int rightBand, 87 | int padtop, int 88 | padbottom, int padleft, int padright); 89 | 90 | ImgReSampleContext * img_resample_init (int owidth, int oheight, int iwidth, int iheight); 91 | #endif 92 | 93 | #endif // FFMPEG_TOOLS_H 94 | 95 | /* 96 | * Local variables: 97 | * tab-width: 4 98 | * c-basic-offset: 4 99 | * End: 100 | * vim600: noet sw=4 ts=4 101 | * vim<600: noet sw=4 ts=4 102 | */ 103 | -------------------------------------------------------------------------------- /gd_io.h: -------------------------------------------------------------------------------- 1 | #ifndef GD_IO_H 2 | #define GD_IO_H 1 3 | 4 | #include 5 | 6 | #ifdef VMS 7 | #define Putchar gdPutchar 8 | #endif 9 | 10 | typedef struct gdIOCtx { 11 | int (*getC)(struct gdIOCtx*); 12 | int (*getBuf)(struct gdIOCtx*, void*, int); 13 | 14 | void (*putC)(struct gdIOCtx*, int); 15 | int (*putBuf)(struct gdIOCtx*, const void*, int); 16 | 17 | int (*seek)(struct gdIOCtx*, const int); 18 | long (*tell)(struct gdIOCtx*); 19 | 20 | void (*gd_free)(struct gdIOCtx*); 21 | 22 | } gdIOCtx; 23 | 24 | typedef struct gdIOCtx *gdIOCtxPtr; 25 | 26 | void Putword(int w, gdIOCtx *ctx); 27 | void Putchar(int c, gdIOCtx *ctx); 28 | 29 | void gdPutC(const unsigned char c, gdIOCtx *ctx); 30 | int gdPutBuf(const void *, int, gdIOCtx*); 31 | void gdPutWord(int w, gdIOCtx *ctx); 32 | void gdPutInt(int w, gdIOCtx *ctx); 33 | 34 | int gdGetC(gdIOCtx *ctx); 35 | int gdGetBuf(void *, int, gdIOCtx*); 36 | int gdGetByte(int *result, gdIOCtx *ctx); 37 | int gdGetWord(int *result, gdIOCtx *ctx); 38 | int gdGetInt(int *result, gdIOCtx *ctx); 39 | 40 | int gdSeek(gdIOCtx *ctx, const int); 41 | long gdTell(gdIOCtx *ctx); 42 | 43 | #endif 44 | -------------------------------------------------------------------------------- /php_ffmpeg.h: -------------------------------------------------------------------------------- 1 | /* 2 | This file is part of ffmpeg-php 3 | 4 | Copyright (C) 2004-2008 Todd Kirby (ffmpeg.php AT gmail.com) 5 | 6 | This program is free software; you can redistribute it and/or modify 7 | it under the terms of the GNU General Public License as published by 8 | the Free Software Foundation; either version 2 of the License, or 9 | (at your option) any later version. 10 | 11 | This program is distributed in the hope that it will be useful, 12 | but WITHOUT ANY WARRANTY; without even the implied warranty of 13 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 14 | GNU General Public License for more details. 15 | 16 | You should have received a copy of the GNU General Public License 17 | along with this program; if not, write to the Free Software 18 | Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA 19 | 20 | In addition, as a special exception, the copyright holders of ffmpeg-php 21 | give you permission to combine ffmpeg-php with code included in the 22 | standard release of PHP under the PHP license (or modified versions of 23 | such code, with unchanged license). You may copy and distribute such a 24 | system following the terms of the GNU GPL for ffmpeg-php and the licenses 25 | of the other code concerned, provided that you include the source code of 26 | that other code when and as the GNU GPL requires distribution of source code. 27 | 28 | You must obey the GNU General Public License in all respects for all of the 29 | code used other than standard release of PHP. If you modify this file, you 30 | may extend this exception to your version of the file, but you are not 31 | obligated to do so. If you do not wish to do so, delete this exception 32 | statement from your version. 33 | 34 | */ 35 | 36 | #ifndef PHP_FFMPEG_H 37 | #define PHP_FFMPEG_H 38 | 39 | #include "php_version.h" 40 | 41 | 42 | /* 43 | * PHP-4 doesn't have the METHOD, ME and MALIAS macros so map them back 44 | * to the function macros for PHP-4 45 | */ 46 | 47 | #if PHP_MAJOR_VERSION <= 4 // PHP4; use FUNCTION macros 48 | #define FFMPEG_PHP_CONSTRUCTOR(a,b) PHP_FUNCTION(a) 49 | #define FFMPEG_PHP_METHOD(a,b) PHP_FUNCTION(b) 50 | #define FFMPEG_PHP_ME(a,b,c,d) PHP_FE(a,c) 51 | #define FFMPEG_PHP_MALIAS(a,b,c,d,e) PHP_FALIAS(b,c,d) 52 | #define FFMPEG_PHP_END_METHODS {NULL, NULL, NULL} 53 | #else /* PHP5; Use METHOD macros */ 54 | #define FFMPEG_PHP_CONSTRUCTOR(a,b) PHP_METHOD(a,b) 55 | #define FFMPEG_PHP_METHOD(a,b) PHP_METHOD(a,b) 56 | #define FFMPEG_PHP_ME(a,b,c,d) PHP_ME(a,b,c,d) 57 | #define FFMPEG_PHP_MALIAS(a,b,c,d,e) PHP_MALIAS(a,b,c,d,e) 58 | #define FFMPEG_PHP_END_METHODS {NULL, NULL, NULL, 0, 0} 59 | #endif 60 | 61 | /* 62 | * fix for `undefined symbol: avcodec_alloc_frame in Unknown on line 0` 63 | */ 64 | #define av_frame_alloc avcodec_alloc_frame 65 | 66 | 67 | #define SAFE_STRING(s) ((s)?(s):"") 68 | 69 | #ifndef safe_emalloc 70 | # define safe_emalloc(a,b,c) emalloc((a)*(b)+(c)) 71 | #endif 72 | 73 | extern zend_module_entry ffmpeg_module_entry; 74 | #define phpext_ffmpeg_ptr &ffmpeg_module_entry 75 | 76 | #ifdef PHP_WIN32 77 | #define PHP_FFMPEG_API __declspec(dllexport) 78 | #else 79 | #define PHP_FFMPEG_API 80 | #endif 81 | 82 | #ifdef ZTS 83 | #include "TSRM.h" 84 | #endif 85 | 86 | PHP_MINIT_FUNCTION(ffmpeg); 87 | PHP_MSHUTDOWN_FUNCTION(ffmpeg); 88 | PHP_RINIT_FUNCTION(ffmpeg); 89 | PHP_RSHUTDOWN_FUNCTION(ffmpeg); 90 | PHP_MINFO_FUNCTION(ffmpeg); 91 | 92 | 93 | #ifdef ZTS 94 | #define FFMPEG_G(v) TSRMG(ffmpeg_globals_id, zend_ffmpeg_globals *, v) 95 | #else 96 | #define FFMPEG_G(v) (ffmpeg_globals.v) 97 | #endif 98 | 99 | #endif /* PHP_FFMPEG_H */ 100 | 101 | 102 | /* 103 | * Local variables: 104 | * tab-width: 4 105 | * c-basic-offset: 4 106 | * indent-tabs-mode: t 107 | * End: 108 | */ 109 | -------------------------------------------------------------------------------- /test_ffmpeg.php: -------------------------------------------------------------------------------- 1 | '; 22 | } 23 | 24 | printf("ffmpeg-php version string: %s\n", FFMPEG_PHP_VERSION_STRING); 25 | printf("ffmpeg-php build date string: %s\n", FFMPEG_PHP_BUILD_DATE_STRING); 26 | printf("libavcodec build number: %d\n", LIBAVCODEC_BUILD_NUMBER); 27 | printf("libavcodec version number: %d\n", LIBAVCODEC_VERSION_NUMBER); 28 | 29 | print_class_methods("ffmpeg_movie"); 30 | print_class_methods("ffmpeg_frame"); 31 | 32 | // get an array for movies from the test media directory 33 | $movies = getDirFiles(dirname(__FILE__) . '/tests/test_media'); 34 | 35 | echo "--------------------\n\n"; 36 | foreach($movies as $movie) { 37 | $mov = new ffmpeg_movie($movie); 38 | printf("file name = %s\n", $mov->getFileName()); 39 | printf("duration = %s seconds\n", $mov->getDuration()); 40 | printf("frame count = %s\n", $mov->getFrameCount()); 41 | printf("frame rate = %0.3f fps\n", $mov->getFrameRate()); 42 | printf("comment = %s\n", $mov->getComment()); 43 | printf("title = %s\n", $mov->getTitle()); 44 | printf("author = %s\n", $mov->getAuthor()); 45 | printf("copyright = %s\n", $mov->getCopyright()); 46 | printf("get bit rate = %d\n", $mov->getBitRate()); 47 | printf("has audio = %s\n", $mov->hasAudio() == 0 ? 'No' : 'Yes'); 48 | if ($mov->hasAudio()) { 49 | printf("get audio stream id= %s\n", $mov->getAudioStreamId()); 50 | printf("get audio codec = %s\n", $mov->getAudioCodec()); 51 | printf("get audio bit rate = %d\n", $mov->getAudioBitRate()); 52 | printf("get audio sample rate = %d \n", $mov->getAudioSampleRate()); 53 | printf("get audio channels = %s\n", $mov->getAudioChannels()); 54 | } 55 | printf("has video = %s\n", $mov->hasVideo() == 0 ? 'No' : 'Yes'); 56 | if ($mov->hasVideo()) { 57 | printf("frame height = %d pixels\n", $mov->getFrameHeight()); 58 | printf("frame width = %d pixels\n", $mov->getFrameWidth()); 59 | printf("get video stream id= %s\n", $mov->getVideoStreamId()); 60 | printf("get video codec = %s\n", $mov->getVideoCodec()); 61 | printf("get video bit rate = %d\n", $mov->getVideoBitRate()); 62 | printf("get pixel format = %s\n", $mov->getPixelFormat()); 63 | printf("get pixel aspect ratio = %s\n", $mov->getPixelAspectRatio()); 64 | $frame = $mov->getFrame(10); 65 | printf("get frame = %s\n", is_object($frame) ? 'true' : 'false'); 66 | printf(" get frame number = %d\n", $mov->getFrameNumber()); 67 | printf(" get frame width = %d\n", $frame->getWidth()); 68 | printf(" get frame height = %d\n", $frame->getHeight()); 69 | } 70 | echo "\n--------------------\n\n"; 71 | } 72 | 73 | if (php_sapi_name() != 'cli') { 74 | echo ''; 75 | } 76 | 77 | /* FUNCTIONS */ 78 | function print_class_methods($class) { 79 | echo "\nMethods available in class '$class':\n"; 80 | $methods = get_class_methods($class); 81 | if (is_array($methods)) { 82 | foreach($methods as $method) { 83 | echo $method . "\n"; 84 | } 85 | } else { 86 | echo "No Methods Defined\n"; 87 | } 88 | } 89 | 90 | function getDirFiles($dirPath) 91 | { 92 | if ($handle = opendir($dirPath)) 93 | { 94 | while (false !== ($file = readdir($handle))) { 95 | $fullpath = $dirPath . '/' . $file; 96 | if (!is_dir($fullpath) && $file != "CVS" && $file != "." && $file != "..") 97 | $filesArr[] = trim($fullpath); 98 | } 99 | closedir($handle); 100 | } 101 | 102 | return $filesArr; 103 | } 104 | 105 | 106 | ?> 107 | -------------------------------------------------------------------------------- /tests/.gitignore: -------------------------------------------------------------------------------- 1 | *.diff 2 | *.exp 3 | *.log 4 | *.php 5 | *.out 6 | -------------------------------------------------------------------------------- /tests/getAudioBitRate.phpt: -------------------------------------------------------------------------------- 1 | --TEST-- 2 | ffmpeg getAudioBitRate test 3 | --SKIPIF-- 4 | 5 | --FILE-- 6 | getAudioBitRate()); 9 | ?> 10 | --EXPECT-- 11 | ffmpeg getAudioBitRate(): 32000 12 | -------------------------------------------------------------------------------- /tests/getAudioChannels.phpt: -------------------------------------------------------------------------------- 1 | --TEST-- 2 | ffmpeg getAudioChannels test 3 | --SKIPIF-- 4 | 5 | --FILE-- 6 | getAudioChannels()); 9 | ?> 10 | --EXPECT-- 11 | ffmpeg getAudioChannels(): 1 12 | -------------------------------------------------------------------------------- /tests/getAudioCodec.phpt: -------------------------------------------------------------------------------- 1 | --TEST-- 2 | ffmpeg getAudioCodec test 3 | --SKIPIF-- 4 | 5 | --FILE-- 6 | getAudioCodec()); 9 | ?> 10 | --EXPECT-- 11 | ffmpeg getAudioCodec(): mp2 12 | -------------------------------------------------------------------------------- /tests/getAudioSampleRate.phpt: -------------------------------------------------------------------------------- 1 | --TEST-- 2 | ffmpeg getAudioSampleRate test 3 | --SKIPIF-- 4 | 5 | --FILE-- 6 | getAudioSampleRate()); 9 | ?> 10 | --EXPECT-- 11 | ffmpeg getAudioSampleRate(): 32000 12 | -------------------------------------------------------------------------------- /tests/getAudioStreamId.phpt: -------------------------------------------------------------------------------- 1 | --TEST-- 2 | ffmpeg getAudioStreamId test 3 | --SKIPIF-- 4 | 5 | --FILE-- 6 | getAudioStreamId()); 9 | ?> 10 | --EXPECT-- 11 | ffmpeg getAudioStreamId(): 0 12 | -------------------------------------------------------------------------------- /tests/getBitRate.phpt: -------------------------------------------------------------------------------- 1 | --TEST-- 2 | ffmpeg getBitRate test 3 | --SKIPIF-- 4 | 5 | --FILE-- 6 | getBitRate()); 9 | ?> 10 | --EXPECT-- 11 | ffmpeg getBitRate(): 183948 12 | -------------------------------------------------------------------------------- /tests/getDuration.phpt: -------------------------------------------------------------------------------- 1 | --TEST-- 2 | ffmpeg getDuration test 3 | --SKIPIF-- 4 | 5 | --FILE-- 6 | getDuration()); 9 | ?> 10 | --EXPECT-- 11 | ffmpeg getDuration(): 9.60 12 | -------------------------------------------------------------------------------- /tests/getFileName.phpt: -------------------------------------------------------------------------------- 1 | --TEST-- 2 | ffmpeg getFileName test 3 | --SKIPIF-- 4 | 5 | --FILE-- 6 | getFileName()); 9 | ?> 10 | --EXPECTREGEX-- 11 | ffmpeg getFileName\(\): .*\/robot.avi 12 | -------------------------------------------------------------------------------- /tests/getFrame.phpt: -------------------------------------------------------------------------------- 1 | --TEST-- 2 | ffmpeg getFrame test 3 | --SKIPIF-- 4 | 9 | --FILE-- 10 | getFrame($frame); 16 | if ($ff_frame) { 17 | $gd_image = $ff_frame->toGDImage(); 18 | if ($gd_image) { 19 | imagepng($gd_image, $img); 20 | imagedestroy($gd_image); 21 | // generate md5 of file (NOTE: different versions of ffmpeg may produce different 22 | // md5 hashes since resampling has been changed slightly due to a fix. Need to 23 | // use EXPECTREX to test for both md5 possibilities. 24 | printf("ffmpeg getFrame(): md5 = %s\n", md5(file_get_contents($img))); 25 | unlink($img); 26 | } 27 | } 28 | ?> 29 | --EXPECT-- 30 | ffmpeg getFrame(): md5 = f8eb6d231d353e8d98cf76f1fcf960c3 31 | -------------------------------------------------------------------------------- /tests/getFrameCount.phpt: -------------------------------------------------------------------------------- 1 | --TEST-- 2 | ffmpeg getFrameCount test 3 | --SKIPIF-- 4 | 5 | --FILE-- 6 | getFrameCount()); 9 | ?> 10 | --EXPECT-- 11 | ffmpeg getFrameCount(): 240 12 | -------------------------------------------------------------------------------- /tests/getFrameHeight.phpt: -------------------------------------------------------------------------------- 1 | --TEST-- 2 | ffmpeg getFrameHeight test 3 | --SKIPIF-- 4 | 5 | --FILE-- 6 | getFrameHeight()); 9 | ?> 10 | --EXPECT-- 11 | ffmpeg getFrameHeight(): 112 12 | -------------------------------------------------------------------------------- /tests/getFrameNumber.phpt: -------------------------------------------------------------------------------- 1 | --TEST-- 2 | ffmpeg getFrameNumber test 3 | --SKIPIF-- 4 | 5 | --FILE-- 6 | getFrame(5); 11 | printf("ffmpeg getFrameNumber(): %d\n", $mov->getFrameNumber()); 12 | ?> 13 | --EXPECT-- 14 | ffmpeg getFrameNumber(): 5 15 | -------------------------------------------------------------------------------- /tests/getFrameRate.phpt: -------------------------------------------------------------------------------- 1 | --TEST-- 2 | ffmpeg getFrameRate test 3 | --SKIPIF-- 4 | 5 | --FILE-- 6 | getFrameRate()); 9 | ?> 10 | --EXPECT-- 11 | ffmpeg getFrameRate(): 25.00 12 | -------------------------------------------------------------------------------- /tests/getFrameResampled.phpt: -------------------------------------------------------------------------------- 1 | --TEST-- 2 | ffmpeg getFrameResampled test 3 | --SKIPIF-- 4 | 9 | --FILE-- 10 | getFrame($frame); 16 | if ($ff_frame) { 17 | $ff_frame->resize(360, 460); 18 | $gd_image = $ff_frame->toGDImage(); 19 | if ($gd_image) { 20 | imagepng($gd_image, $img); 21 | imagedestroy($gd_image); 22 | // generate md5 of file (NOTE: different versions of ffmpeg may produce different 23 | // md5 hashes since resampling has been changed slightly due to a fix. Need to 24 | // use EXPECTREX to test for both md5 possibilities. 25 | printf("ffmpeg getFrameResampled(): md5 = %s\n", md5(file_get_contents($img))); 26 | // unlink($img); 27 | } 28 | } 29 | ?> 30 | --EXPECT-- 31 | ffmpeg getFrameResampled(): md5 = 9901af04cb0a276b11fa73eebb7df291 32 | -------------------------------------------------------------------------------- /tests/getFrameWidth.phpt: -------------------------------------------------------------------------------- 1 | --TEST-- 2 | ffmpeg getFrameWidth test 3 | --SKIPIF-- 4 | 5 | --FILE-- 6 | getFrameWidth()); 9 | ?> 10 | --EXPECT-- 11 | ffmpeg getFrameWidth(): 160 12 | -------------------------------------------------------------------------------- /tests/getFramesForward.phpt: -------------------------------------------------------------------------------- 1 | --TEST-- 2 | ffmpeg getFrames forward test 3 | --SKIPIF-- 4 | 9 | --FILE-- 10 | getFrameCount(); 14 | for($i = 1; $i <= $framecount; $i++) { 15 | $img = sprintf("%s/test-%04d.png", dirname(__FILE__), $i); 16 | $frame = $mov->getFrame($i); 17 | $image = $frame->toGDImage(); 18 | imagepng($image, $img); 19 | printf("ffmpeg getFramesForward($i): md5 = %s\n", md5(file_get_contents($img))); 20 | imagedestroy($image); 21 | unlink($img); 22 | } 23 | ?> 24 | --EXPECT-- 25 | ffmpeg getFramesForward(1): md5 = 054ca5377a0592ea15497bcfefa59181 26 | ffmpeg getFramesForward(2): md5 = 054ca5377a0592ea15497bcfefa59181 27 | ffmpeg getFramesForward(3): md5 = 054ca5377a0592ea15497bcfefa59181 28 | ffmpeg getFramesForward(4): md5 = bc3e96ad73e019583d449b6d2d857858 29 | ffmpeg getFramesForward(5): md5 = bc3e96ad73e019583d449b6d2d857858 30 | ffmpeg getFramesForward(6): md5 = bc3e96ad73e019583d449b6d2d857858 31 | ffmpeg getFramesForward(7): md5 = 0a7a900dc376afc5598d5b2ae50be442 32 | ffmpeg getFramesForward(8): md5 = 0a7a900dc376afc5598d5b2ae50be442 33 | ffmpeg getFramesForward(9): md5 = 0a7a900dc376afc5598d5b2ae50be442 34 | ffmpeg getFramesForward(10): md5 = 8de055e9eb38073ab35f75cfe4adae83 35 | ffmpeg getFramesForward(11): md5 = 8de055e9eb38073ab35f75cfe4adae83 36 | ffmpeg getFramesForward(12): md5 = 8de055e9eb38073ab35f75cfe4adae83 37 | ffmpeg getFramesForward(13): md5 = 73327939f7fc8b6080525dc259bdd136 38 | ffmpeg getFramesForward(14): md5 = 73327939f7fc8b6080525dc259bdd136 39 | ffmpeg getFramesForward(15): md5 = 73327939f7fc8b6080525dc259bdd136 40 | ffmpeg getFramesForward(16): md5 = 25fce65aaebf63d787415133ee525e0b 41 | ffmpeg getFramesForward(17): md5 = 25fce65aaebf63d787415133ee525e0b 42 | ffmpeg getFramesForward(18): md5 = 25fce65aaebf63d787415133ee525e0b 43 | ffmpeg getFramesForward(19): md5 = dbcd63a3fe7bc6e5ae746134462a582d 44 | ffmpeg getFramesForward(20): md5 = dbcd63a3fe7bc6e5ae746134462a582d 45 | ffmpeg getFramesForward(21): md5 = dbcd63a3fe7bc6e5ae746134462a582d 46 | ffmpeg getFramesForward(22): md5 = 5af7473006c39343accad86b6f9cf6ed 47 | ffmpeg getFramesForward(23): md5 = 5af7473006c39343accad86b6f9cf6ed 48 | ffmpeg getFramesForward(24): md5 = 5af7473006c39343accad86b6f9cf6ed 49 | ffmpeg getFramesForward(25): md5 = 405cc6f1453352460cf01875aa23ccff 50 | ffmpeg getFramesForward(26): md5 = 405cc6f1453352460cf01875aa23ccff 51 | ffmpeg getFramesForward(27): md5 = 405cc6f1453352460cf01875aa23ccff 52 | ffmpeg getFramesForward(28): md5 = cbdbcebeea6ea45f6965a83543b6c44b 53 | ffmpeg getFramesForward(29): md5 = cbdbcebeea6ea45f6965a83543b6c44b 54 | ffmpeg getFramesForward(30): md5 = cbdbcebeea6ea45f6965a83543b6c44b 55 | ffmpeg getFramesForward(31): md5 = 9620a937f1a19c3d5e95716fae1eb47f 56 | ffmpeg getFramesForward(32): md5 = 9620a937f1a19c3d5e95716fae1eb47f 57 | ffmpeg getFramesForward(33): md5 = 9620a937f1a19c3d5e95716fae1eb47f 58 | ffmpeg getFramesForward(34): md5 = 689ad71143a347f53417356eabb0037f 59 | ffmpeg getFramesForward(35): md5 = 689ad71143a347f53417356eabb0037f 60 | ffmpeg getFramesForward(36): md5 = 689ad71143a347f53417356eabb0037f 61 | ffmpeg getFramesForward(37): md5 = 4f9a4e239c4b9459a59b038b0be3d5df 62 | ffmpeg getFramesForward(38): md5 = 4f9a4e239c4b9459a59b038b0be3d5df 63 | ffmpeg getFramesForward(39): md5 = 4f9a4e239c4b9459a59b038b0be3d5df 64 | ffmpeg getFramesForward(40): md5 = 579618d56fe46acdb9bcfcff67808ae4 65 | ffmpeg getFramesForward(41): md5 = 579618d56fe46acdb9bcfcff67808ae4 66 | ffmpeg getFramesForward(42): md5 = 579618d56fe46acdb9bcfcff67808ae4 67 | ffmpeg getFramesForward(43): md5 = 9f77876e4926b92d5f7dc565ac94e366 68 | ffmpeg getFramesForward(44): md5 = 9f77876e4926b92d5f7dc565ac94e366 69 | ffmpeg getFramesForward(45): md5 = 9f77876e4926b92d5f7dc565ac94e366 70 | ffmpeg getFramesForward(46): md5 = faa5ef30ddeb97020250c150779e3399 71 | ffmpeg getFramesForward(47): md5 = faa5ef30ddeb97020250c150779e3399 72 | ffmpeg getFramesForward(48): md5 = faa5ef30ddeb97020250c150779e3399 73 | ffmpeg getFramesForward(49): md5 = c61c4e4620af5adba309237a84ef91df 74 | ffmpeg getFramesForward(50): md5 = c61c4e4620af5adba309237a84ef91df 75 | ffmpeg getFramesForward(51): md5 = c61c4e4620af5adba309237a84ef91df 76 | ffmpeg getFramesForward(52): md5 = 3953dcbdeb9b687b2b1e925183a16c39 77 | ffmpeg getFramesForward(53): md5 = 3953dcbdeb9b687b2b1e925183a16c39 78 | ffmpeg getFramesForward(54): md5 = 3953dcbdeb9b687b2b1e925183a16c39 79 | ffmpeg getFramesForward(55): md5 = c360fd94742147db7e97796a61eee19f 80 | ffmpeg getFramesForward(56): md5 = c360fd94742147db7e97796a61eee19f 81 | ffmpeg getFramesForward(57): md5 = c360fd94742147db7e97796a61eee19f 82 | ffmpeg getFramesForward(58): md5 = 7b1f32d4e4a1efce454c0b73ec015e75 83 | ffmpeg getFramesForward(59): md5 = 7b1f32d4e4a1efce454c0b73ec015e75 84 | ffmpeg getFramesForward(60): md5 = 7b1f32d4e4a1efce454c0b73ec015e75 85 | ffmpeg getFramesForward(61): md5 = 963b85dafe7ac84daf64a12931509de7 86 | ffmpeg getFramesForward(62): md5 = 963b85dafe7ac84daf64a12931509de7 87 | ffmpeg getFramesForward(63): md5 = 963b85dafe7ac84daf64a12931509de7 88 | ffmpeg getFramesForward(64): md5 = d86b04f95208b77c06e49ba9a76b477f 89 | ffmpeg getFramesForward(65): md5 = d86b04f95208b77c06e49ba9a76b477f 90 | ffmpeg getFramesForward(66): md5 = d86b04f95208b77c06e49ba9a76b477f 91 | ffmpeg getFramesForward(67): md5 = cc52ca71fc8daae8feba52fa329f9f66 92 | ffmpeg getFramesForward(68): md5 = cc52ca71fc8daae8feba52fa329f9f66 93 | ffmpeg getFramesForward(69): md5 = cc52ca71fc8daae8feba52fa329f9f66 94 | ffmpeg getFramesForward(70): md5 = 3cac4625a645a147a7e7cb8ab28ebf07 95 | ffmpeg getFramesForward(71): md5 = 3cac4625a645a147a7e7cb8ab28ebf07 96 | ffmpeg getFramesForward(72): md5 = 3cac4625a645a147a7e7cb8ab28ebf07 97 | ffmpeg getFramesForward(73): md5 = f8eb6d231d353e8d98cf76f1fcf960c3 98 | ffmpeg getFramesForward(74): md5 = f8eb6d231d353e8d98cf76f1fcf960c3 99 | ffmpeg getFramesForward(75): md5 = f8eb6d231d353e8d98cf76f1fcf960c3 100 | ffmpeg getFramesForward(76): md5 = 25ea525ec2630b123da3bd18b44e391b 101 | ffmpeg getFramesForward(77): md5 = 25ea525ec2630b123da3bd18b44e391b 102 | ffmpeg getFramesForward(78): md5 = 25ea525ec2630b123da3bd18b44e391b 103 | ffmpeg getFramesForward(79): md5 = 97ea17ae200e6ca4e2412ba5546d4cdb 104 | ffmpeg getFramesForward(80): md5 = 97ea17ae200e6ca4e2412ba5546d4cdb 105 | ffmpeg getFramesForward(81): md5 = 97ea17ae200e6ca4e2412ba5546d4cdb 106 | ffmpeg getFramesForward(82): md5 = d0bc5176b565500f09851abf059bf736 107 | ffmpeg getFramesForward(83): md5 = d0bc5176b565500f09851abf059bf736 108 | ffmpeg getFramesForward(84): md5 = d0bc5176b565500f09851abf059bf736 109 | ffmpeg getFramesForward(85): md5 = a73c78e3ae667682e9920a218353540b 110 | ffmpeg getFramesForward(86): md5 = a73c78e3ae667682e9920a218353540b 111 | ffmpeg getFramesForward(87): md5 = a73c78e3ae667682e9920a218353540b 112 | ffmpeg getFramesForward(88): md5 = 02172b5823992d273f7d4295f628309a 113 | ffmpeg getFramesForward(89): md5 = 02172b5823992d273f7d4295f628309a 114 | ffmpeg getFramesForward(90): md5 = 02172b5823992d273f7d4295f628309a 115 | ffmpeg getFramesForward(91): md5 = 5887bfa75094567d9aec180eda7e45c6 116 | ffmpeg getFramesForward(92): md5 = 5887bfa75094567d9aec180eda7e45c6 117 | ffmpeg getFramesForward(93): md5 = 5887bfa75094567d9aec180eda7e45c6 118 | ffmpeg getFramesForward(94): md5 = 3b93b082d52c4ccb8dc5beb22c8316ab 119 | ffmpeg getFramesForward(95): md5 = 3b93b082d52c4ccb8dc5beb22c8316ab 120 | ffmpeg getFramesForward(96): md5 = 3b93b082d52c4ccb8dc5beb22c8316ab 121 | ffmpeg getFramesForward(97): md5 = b6485f3287312414e90fc0508ce9b194 122 | ffmpeg getFramesForward(98): md5 = b6485f3287312414e90fc0508ce9b194 123 | ffmpeg getFramesForward(99): md5 = b6485f3287312414e90fc0508ce9b194 124 | ffmpeg getFramesForward(100): md5 = 57fe0edffdfcf06e88d7219662f04b05 125 | ffmpeg getFramesForward(101): md5 = 57fe0edffdfcf06e88d7219662f04b05 126 | ffmpeg getFramesForward(102): md5 = 57fe0edffdfcf06e88d7219662f04b05 127 | ffmpeg getFramesForward(103): md5 = 5e6ab28f31801cddb176f1c01d13f364 128 | ffmpeg getFramesForward(104): md5 = 5e6ab28f31801cddb176f1c01d13f364 129 | ffmpeg getFramesForward(105): md5 = 5e6ab28f31801cddb176f1c01d13f364 130 | ffmpeg getFramesForward(106): md5 = ab2142ee9ec11e01e42a072ad5762030 131 | ffmpeg getFramesForward(107): md5 = ab2142ee9ec11e01e42a072ad5762030 132 | ffmpeg getFramesForward(108): md5 = ab2142ee9ec11e01e42a072ad5762030 133 | ffmpeg getFramesForward(109): md5 = 84410c79c7cf32562a83fa8f4bb981f7 134 | ffmpeg getFramesForward(110): md5 = 84410c79c7cf32562a83fa8f4bb981f7 135 | ffmpeg getFramesForward(111): md5 = 84410c79c7cf32562a83fa8f4bb981f7 136 | ffmpeg getFramesForward(112): md5 = 5ea25236d676122a90799adefc529611 137 | ffmpeg getFramesForward(113): md5 = 5ea25236d676122a90799adefc529611 138 | ffmpeg getFramesForward(114): md5 = 5ea25236d676122a90799adefc529611 139 | ffmpeg getFramesForward(115): md5 = 0ac65e51db3d7b40f55df3a43f3f03d2 140 | ffmpeg getFramesForward(116): md5 = 0ac65e51db3d7b40f55df3a43f3f03d2 141 | ffmpeg getFramesForward(117): md5 = 0ac65e51db3d7b40f55df3a43f3f03d2 142 | ffmpeg getFramesForward(118): md5 = b0b6a709c28c75d9beffaaaba969ec12 143 | ffmpeg getFramesForward(119): md5 = b0b6a709c28c75d9beffaaaba969ec12 144 | ffmpeg getFramesForward(120): md5 = b0b6a709c28c75d9beffaaaba969ec12 145 | ffmpeg getFramesForward(121): md5 = 7c58a3bc631a7ec1dd48de99658a5cc4 146 | ffmpeg getFramesForward(122): md5 = 7c58a3bc631a7ec1dd48de99658a5cc4 147 | ffmpeg getFramesForward(123): md5 = 7c58a3bc631a7ec1dd48de99658a5cc4 148 | ffmpeg getFramesForward(124): md5 = a89b9a83054bf8737a97c080f07a59bd 149 | ffmpeg getFramesForward(125): md5 = a89b9a83054bf8737a97c080f07a59bd 150 | ffmpeg getFramesForward(126): md5 = a89b9a83054bf8737a97c080f07a59bd 151 | ffmpeg getFramesForward(127): md5 = 5d58afe8118077391b8523a065dd7fce 152 | ffmpeg getFramesForward(128): md5 = 5d58afe8118077391b8523a065dd7fce 153 | ffmpeg getFramesForward(129): md5 = 5d58afe8118077391b8523a065dd7fce 154 | ffmpeg getFramesForward(130): md5 = d7a36b7a67f4ca8941931a15517f5eb1 155 | ffmpeg getFramesForward(131): md5 = d7a36b7a67f4ca8941931a15517f5eb1 156 | ffmpeg getFramesForward(132): md5 = d7a36b7a67f4ca8941931a15517f5eb1 157 | ffmpeg getFramesForward(133): md5 = 3064adc7a54286b4c45f9fe3669e8b1d 158 | ffmpeg getFramesForward(134): md5 = 3064adc7a54286b4c45f9fe3669e8b1d 159 | ffmpeg getFramesForward(135): md5 = 3064adc7a54286b4c45f9fe3669e8b1d 160 | ffmpeg getFramesForward(136): md5 = 49feb765089580d9f3de8a6e36cbaed7 161 | ffmpeg getFramesForward(137): md5 = 49feb765089580d9f3de8a6e36cbaed7 162 | ffmpeg getFramesForward(138): md5 = 49feb765089580d9f3de8a6e36cbaed7 163 | ffmpeg getFramesForward(139): md5 = 3f4495bb347480746f2fb994465b25a9 164 | ffmpeg getFramesForward(140): md5 = 3f4495bb347480746f2fb994465b25a9 165 | ffmpeg getFramesForward(141): md5 = 3f4495bb347480746f2fb994465b25a9 166 | ffmpeg getFramesForward(142): md5 = 53343b23bb1a4aeb1f667608265fad9a 167 | ffmpeg getFramesForward(143): md5 = 53343b23bb1a4aeb1f667608265fad9a 168 | ffmpeg getFramesForward(144): md5 = 53343b23bb1a4aeb1f667608265fad9a 169 | ffmpeg getFramesForward(145): md5 = b84c2d59f936f7cae83e736dc2dd0ebc 170 | ffmpeg getFramesForward(146): md5 = b84c2d59f936f7cae83e736dc2dd0ebc 171 | ffmpeg getFramesForward(147): md5 = b84c2d59f936f7cae83e736dc2dd0ebc 172 | ffmpeg getFramesForward(148): md5 = abe4ae47b43678b60c192fbb4d0a69b5 173 | ffmpeg getFramesForward(149): md5 = abe4ae47b43678b60c192fbb4d0a69b5 174 | ffmpeg getFramesForward(150): md5 = abe4ae47b43678b60c192fbb4d0a69b5 175 | ffmpeg getFramesForward(151): md5 = 117c46c3a208183085c41eccf223c7e6 176 | ffmpeg getFramesForward(152): md5 = 117c46c3a208183085c41eccf223c7e6 177 | ffmpeg getFramesForward(153): md5 = 117c46c3a208183085c41eccf223c7e6 178 | ffmpeg getFramesForward(154): md5 = d587fae1b39f3a2ffae867f9652e1ed7 179 | ffmpeg getFramesForward(155): md5 = d587fae1b39f3a2ffae867f9652e1ed7 180 | ffmpeg getFramesForward(156): md5 = d587fae1b39f3a2ffae867f9652e1ed7 181 | ffmpeg getFramesForward(157): md5 = db17bcfe68abe673bf3df8b8062714ab 182 | ffmpeg getFramesForward(158): md5 = db17bcfe68abe673bf3df8b8062714ab 183 | ffmpeg getFramesForward(159): md5 = db17bcfe68abe673bf3df8b8062714ab 184 | ffmpeg getFramesForward(160): md5 = 316351119812a64ff994bbad9332286e 185 | ffmpeg getFramesForward(161): md5 = 316351119812a64ff994bbad9332286e 186 | ffmpeg getFramesForward(162): md5 = 316351119812a64ff994bbad9332286e 187 | ffmpeg getFramesForward(163): md5 = f4af5e8779fa40f07b0285a4dc1b049d 188 | ffmpeg getFramesForward(164): md5 = f4af5e8779fa40f07b0285a4dc1b049d 189 | ffmpeg getFramesForward(165): md5 = f4af5e8779fa40f07b0285a4dc1b049d 190 | ffmpeg getFramesForward(166): md5 = 274f9691f9d2360d53f299c1fba79614 191 | ffmpeg getFramesForward(167): md5 = 274f9691f9d2360d53f299c1fba79614 192 | ffmpeg getFramesForward(168): md5 = 274f9691f9d2360d53f299c1fba79614 193 | ffmpeg getFramesForward(169): md5 = 4973cb1e537815ee8b7ef73e759f5c39 194 | ffmpeg getFramesForward(170): md5 = 4973cb1e537815ee8b7ef73e759f5c39 195 | ffmpeg getFramesForward(171): md5 = 4973cb1e537815ee8b7ef73e759f5c39 196 | ffmpeg getFramesForward(172): md5 = 8629707f6d5c1a205564ac5f6f10d89f 197 | ffmpeg getFramesForward(173): md5 = 8629707f6d5c1a205564ac5f6f10d89f 198 | ffmpeg getFramesForward(174): md5 = 8629707f6d5c1a205564ac5f6f10d89f 199 | ffmpeg getFramesForward(175): md5 = f72576077cd616c026c7f56829f220ae 200 | ffmpeg getFramesForward(176): md5 = f72576077cd616c026c7f56829f220ae 201 | ffmpeg getFramesForward(177): md5 = f72576077cd616c026c7f56829f220ae 202 | ffmpeg getFramesForward(178): md5 = 017aaef2fe10b6aa2788d7ea0620c252 203 | ffmpeg getFramesForward(179): md5 = 017aaef2fe10b6aa2788d7ea0620c252 204 | ffmpeg getFramesForward(180): md5 = 017aaef2fe10b6aa2788d7ea0620c252 205 | ffmpeg getFramesForward(181): md5 = a5b5bfe8b20e018ef506d703b2af7ccc 206 | ffmpeg getFramesForward(182): md5 = a5b5bfe8b20e018ef506d703b2af7ccc 207 | ffmpeg getFramesForward(183): md5 = a5b5bfe8b20e018ef506d703b2af7ccc 208 | ffmpeg getFramesForward(184): md5 = cc781178ac22f4cf6641183926067215 209 | ffmpeg getFramesForward(185): md5 = cc781178ac22f4cf6641183926067215 210 | ffmpeg getFramesForward(186): md5 = cc781178ac22f4cf6641183926067215 211 | ffmpeg getFramesForward(187): md5 = b0338a88dff4cbabb1599a807e5c6ef0 212 | ffmpeg getFramesForward(188): md5 = b0338a88dff4cbabb1599a807e5c6ef0 213 | ffmpeg getFramesForward(189): md5 = b0338a88dff4cbabb1599a807e5c6ef0 214 | ffmpeg getFramesForward(190): md5 = d1ee4ba4a11217efd0cf8cba15a2eb1f 215 | ffmpeg getFramesForward(191): md5 = d1ee4ba4a11217efd0cf8cba15a2eb1f 216 | ffmpeg getFramesForward(192): md5 = d1ee4ba4a11217efd0cf8cba15a2eb1f 217 | ffmpeg getFramesForward(193): md5 = 0d2849f432fc9656c31629f6288feba0 218 | ffmpeg getFramesForward(194): md5 = 0d2849f432fc9656c31629f6288feba0 219 | ffmpeg getFramesForward(195): md5 = 0d2849f432fc9656c31629f6288feba0 220 | ffmpeg getFramesForward(196): md5 = c26f6d4cf0737c5c6b102c048312f0fc 221 | ffmpeg getFramesForward(197): md5 = c26f6d4cf0737c5c6b102c048312f0fc 222 | ffmpeg getFramesForward(198): md5 = c26f6d4cf0737c5c6b102c048312f0fc 223 | ffmpeg getFramesForward(199): md5 = 23d6d68503ec607327ee6216bc695593 224 | ffmpeg getFramesForward(200): md5 = 23d6d68503ec607327ee6216bc695593 225 | ffmpeg getFramesForward(201): md5 = 23d6d68503ec607327ee6216bc695593 226 | ffmpeg getFramesForward(202): md5 = 85c3d4dbcd9315b00e220d334a012083 227 | ffmpeg getFramesForward(203): md5 = 85c3d4dbcd9315b00e220d334a012083 228 | ffmpeg getFramesForward(204): md5 = 85c3d4dbcd9315b00e220d334a012083 229 | ffmpeg getFramesForward(205): md5 = 08d8b9d438667d710cacc0d9081a4883 230 | ffmpeg getFramesForward(206): md5 = 08d8b9d438667d710cacc0d9081a4883 231 | ffmpeg getFramesForward(207): md5 = 08d8b9d438667d710cacc0d9081a4883 232 | ffmpeg getFramesForward(208): md5 = d3ce913a9c16206990a6b9a80c0561f3 233 | ffmpeg getFramesForward(209): md5 = d3ce913a9c16206990a6b9a80c0561f3 234 | ffmpeg getFramesForward(210): md5 = d3ce913a9c16206990a6b9a80c0561f3 235 | ffmpeg getFramesForward(211): md5 = 64bcd46af5519ad65722bc94e71a5628 236 | ffmpeg getFramesForward(212): md5 = 64bcd46af5519ad65722bc94e71a5628 237 | ffmpeg getFramesForward(213): md5 = 64bcd46af5519ad65722bc94e71a5628 238 | ffmpeg getFramesForward(214): md5 = 55a1b21fb233ec1b965aa27fc5680ef7 239 | ffmpeg getFramesForward(215): md5 = 55a1b21fb233ec1b965aa27fc5680ef7 240 | ffmpeg getFramesForward(216): md5 = 55a1b21fb233ec1b965aa27fc5680ef7 241 | ffmpeg getFramesForward(217): md5 = cbf35af572f3947b04b391dbe8f01912 242 | ffmpeg getFramesForward(218): md5 = cbf35af572f3947b04b391dbe8f01912 243 | ffmpeg getFramesForward(219): md5 = cbf35af572f3947b04b391dbe8f01912 244 | ffmpeg getFramesForward(220): md5 = b68f724605514e4ae7676c04fff62461 245 | ffmpeg getFramesForward(221): md5 = b68f724605514e4ae7676c04fff62461 246 | ffmpeg getFramesForward(222): md5 = b68f724605514e4ae7676c04fff62461 247 | ffmpeg getFramesForward(223): md5 = e2d66cb30e1d942da4b603ecae95c64e 248 | ffmpeg getFramesForward(224): md5 = e2d66cb30e1d942da4b603ecae95c64e 249 | ffmpeg getFramesForward(225): md5 = e2d66cb30e1d942da4b603ecae95c64e 250 | ffmpeg getFramesForward(226): md5 = 70c86d74b825b685d3e90c2dfa21f307 251 | ffmpeg getFramesForward(227): md5 = 70c86d74b825b685d3e90c2dfa21f307 252 | ffmpeg getFramesForward(228): md5 = 70c86d74b825b685d3e90c2dfa21f307 253 | ffmpeg getFramesForward(229): md5 = 52e93862544f05c92375d2aaa2c7dc16 254 | ffmpeg getFramesForward(230): md5 = 52e93862544f05c92375d2aaa2c7dc16 255 | ffmpeg getFramesForward(231): md5 = 52e93862544f05c92375d2aaa2c7dc16 256 | ffmpeg getFramesForward(232): md5 = da9910064c0414e256056b769f942049 257 | ffmpeg getFramesForward(233): md5 = da9910064c0414e256056b769f942049 258 | ffmpeg getFramesForward(234): md5 = da9910064c0414e256056b769f942049 259 | ffmpeg getFramesForward(235): md5 = 2817e435640fc7c26685401007ad6177 260 | ffmpeg getFramesForward(236): md5 = 2817e435640fc7c26685401007ad6177 261 | ffmpeg getFramesForward(237): md5 = 2817e435640fc7c26685401007ad6177 262 | ffmpeg getFramesForward(238): md5 = 5da7388e5b099cfb030b36cefcb260aa 263 | ffmpeg getFramesForward(239): md5 = 5da7388e5b099cfb030b36cefcb260aa 264 | ffmpeg getFramesForward(240): md5 = 5da7388e5b099cfb030b36cefcb260aa 265 | -------------------------------------------------------------------------------- /tests/getFramesForwardPassedEnd.phpt: -------------------------------------------------------------------------------- 1 | --TEST-- 2 | ffmpeg getFrames forward test 3 | --SKIPIF-- 4 | 9 | --FILE-- 10 | getFrameCount(); 14 | for($i = 1; $i <= $framecount + 1; $i++) { 15 | $img = sprintf("%s/test-%04d.png", dirname(__FILE__), $i); 16 | $frame = $mov->getFrame($i); 17 | if ($frame == false) { 18 | break; 19 | } 20 | $image = $frame->toGDImage(); 21 | imagepng($image, $img); 22 | printf("ffmpeg getFrame($i): md5 = %s\n", md5(file_get_contents($img))); 23 | imagedestroy($image); 24 | unlink($img); 25 | } 26 | ?> 27 | --EXPECT-- 28 | ffmpeg getFrame(1): md5 = 054ca5377a0592ea15497bcfefa59181 29 | ffmpeg getFrame(2): md5 = 054ca5377a0592ea15497bcfefa59181 30 | ffmpeg getFrame(3): md5 = 054ca5377a0592ea15497bcfefa59181 31 | ffmpeg getFrame(4): md5 = bc3e96ad73e019583d449b6d2d857858 32 | ffmpeg getFrame(5): md5 = bc3e96ad73e019583d449b6d2d857858 33 | ffmpeg getFrame(6): md5 = bc3e96ad73e019583d449b6d2d857858 34 | ffmpeg getFrame(7): md5 = 0a7a900dc376afc5598d5b2ae50be442 35 | ffmpeg getFrame(8): md5 = 0a7a900dc376afc5598d5b2ae50be442 36 | ffmpeg getFrame(9): md5 = 0a7a900dc376afc5598d5b2ae50be442 37 | ffmpeg getFrame(10): md5 = 8de055e9eb38073ab35f75cfe4adae83 38 | ffmpeg getFrame(11): md5 = 8de055e9eb38073ab35f75cfe4adae83 39 | ffmpeg getFrame(12): md5 = 8de055e9eb38073ab35f75cfe4adae83 40 | ffmpeg getFrame(13): md5 = 73327939f7fc8b6080525dc259bdd136 41 | ffmpeg getFrame(14): md5 = 73327939f7fc8b6080525dc259bdd136 42 | ffmpeg getFrame(15): md5 = 73327939f7fc8b6080525dc259bdd136 43 | ffmpeg getFrame(16): md5 = 25fce65aaebf63d787415133ee525e0b 44 | ffmpeg getFrame(17): md5 = 25fce65aaebf63d787415133ee525e0b 45 | ffmpeg getFrame(18): md5 = 25fce65aaebf63d787415133ee525e0b 46 | ffmpeg getFrame(19): md5 = dbcd63a3fe7bc6e5ae746134462a582d 47 | ffmpeg getFrame(20): md5 = dbcd63a3fe7bc6e5ae746134462a582d 48 | ffmpeg getFrame(21): md5 = dbcd63a3fe7bc6e5ae746134462a582d 49 | ffmpeg getFrame(22): md5 = 5af7473006c39343accad86b6f9cf6ed 50 | ffmpeg getFrame(23): md5 = 5af7473006c39343accad86b6f9cf6ed 51 | ffmpeg getFrame(24): md5 = 5af7473006c39343accad86b6f9cf6ed 52 | ffmpeg getFrame(25): md5 = 405cc6f1453352460cf01875aa23ccff 53 | ffmpeg getFrame(26): md5 = 405cc6f1453352460cf01875aa23ccff 54 | ffmpeg getFrame(27): md5 = 405cc6f1453352460cf01875aa23ccff 55 | ffmpeg getFrame(28): md5 = cbdbcebeea6ea45f6965a83543b6c44b 56 | ffmpeg getFrame(29): md5 = cbdbcebeea6ea45f6965a83543b6c44b 57 | ffmpeg getFrame(30): md5 = cbdbcebeea6ea45f6965a83543b6c44b 58 | ffmpeg getFrame(31): md5 = 9620a937f1a19c3d5e95716fae1eb47f 59 | ffmpeg getFrame(32): md5 = 9620a937f1a19c3d5e95716fae1eb47f 60 | ffmpeg getFrame(33): md5 = 9620a937f1a19c3d5e95716fae1eb47f 61 | ffmpeg getFrame(34): md5 = 689ad71143a347f53417356eabb0037f 62 | ffmpeg getFrame(35): md5 = 689ad71143a347f53417356eabb0037f 63 | ffmpeg getFrame(36): md5 = 689ad71143a347f53417356eabb0037f 64 | ffmpeg getFrame(37): md5 = 4f9a4e239c4b9459a59b038b0be3d5df 65 | ffmpeg getFrame(38): md5 = 4f9a4e239c4b9459a59b038b0be3d5df 66 | ffmpeg getFrame(39): md5 = 4f9a4e239c4b9459a59b038b0be3d5df 67 | ffmpeg getFrame(40): md5 = 579618d56fe46acdb9bcfcff67808ae4 68 | ffmpeg getFrame(41): md5 = 579618d56fe46acdb9bcfcff67808ae4 69 | ffmpeg getFrame(42): md5 = 579618d56fe46acdb9bcfcff67808ae4 70 | ffmpeg getFrame(43): md5 = 9f77876e4926b92d5f7dc565ac94e366 71 | ffmpeg getFrame(44): md5 = 9f77876e4926b92d5f7dc565ac94e366 72 | ffmpeg getFrame(45): md5 = 9f77876e4926b92d5f7dc565ac94e366 73 | ffmpeg getFrame(46): md5 = faa5ef30ddeb97020250c150779e3399 74 | ffmpeg getFrame(47): md5 = faa5ef30ddeb97020250c150779e3399 75 | ffmpeg getFrame(48): md5 = faa5ef30ddeb97020250c150779e3399 76 | ffmpeg getFrame(49): md5 = c61c4e4620af5adba309237a84ef91df 77 | ffmpeg getFrame(50): md5 = c61c4e4620af5adba309237a84ef91df 78 | ffmpeg getFrame(51): md5 = c61c4e4620af5adba309237a84ef91df 79 | ffmpeg getFrame(52): md5 = 3953dcbdeb9b687b2b1e925183a16c39 80 | ffmpeg getFrame(53): md5 = 3953dcbdeb9b687b2b1e925183a16c39 81 | ffmpeg getFrame(54): md5 = 3953dcbdeb9b687b2b1e925183a16c39 82 | ffmpeg getFrame(55): md5 = c360fd94742147db7e97796a61eee19f 83 | ffmpeg getFrame(56): md5 = c360fd94742147db7e97796a61eee19f 84 | ffmpeg getFrame(57): md5 = c360fd94742147db7e97796a61eee19f 85 | ffmpeg getFrame(58): md5 = 7b1f32d4e4a1efce454c0b73ec015e75 86 | ffmpeg getFrame(59): md5 = 7b1f32d4e4a1efce454c0b73ec015e75 87 | ffmpeg getFrame(60): md5 = 7b1f32d4e4a1efce454c0b73ec015e75 88 | ffmpeg getFrame(61): md5 = 963b85dafe7ac84daf64a12931509de7 89 | ffmpeg getFrame(62): md5 = 963b85dafe7ac84daf64a12931509de7 90 | ffmpeg getFrame(63): md5 = 963b85dafe7ac84daf64a12931509de7 91 | ffmpeg getFrame(64): md5 = d86b04f95208b77c06e49ba9a76b477f 92 | ffmpeg getFrame(65): md5 = d86b04f95208b77c06e49ba9a76b477f 93 | ffmpeg getFrame(66): md5 = d86b04f95208b77c06e49ba9a76b477f 94 | ffmpeg getFrame(67): md5 = cc52ca71fc8daae8feba52fa329f9f66 95 | ffmpeg getFrame(68): md5 = cc52ca71fc8daae8feba52fa329f9f66 96 | ffmpeg getFrame(69): md5 = cc52ca71fc8daae8feba52fa329f9f66 97 | ffmpeg getFrame(70): md5 = 3cac4625a645a147a7e7cb8ab28ebf07 98 | ffmpeg getFrame(71): md5 = 3cac4625a645a147a7e7cb8ab28ebf07 99 | ffmpeg getFrame(72): md5 = 3cac4625a645a147a7e7cb8ab28ebf07 100 | ffmpeg getFrame(73): md5 = f8eb6d231d353e8d98cf76f1fcf960c3 101 | ffmpeg getFrame(74): md5 = f8eb6d231d353e8d98cf76f1fcf960c3 102 | ffmpeg getFrame(75): md5 = f8eb6d231d353e8d98cf76f1fcf960c3 103 | ffmpeg getFrame(76): md5 = 25ea525ec2630b123da3bd18b44e391b 104 | ffmpeg getFrame(77): md5 = 25ea525ec2630b123da3bd18b44e391b 105 | ffmpeg getFrame(78): md5 = 25ea525ec2630b123da3bd18b44e391b 106 | ffmpeg getFrame(79): md5 = 97ea17ae200e6ca4e2412ba5546d4cdb 107 | ffmpeg getFrame(80): md5 = 97ea17ae200e6ca4e2412ba5546d4cdb 108 | ffmpeg getFrame(81): md5 = 97ea17ae200e6ca4e2412ba5546d4cdb 109 | ffmpeg getFrame(82): md5 = d0bc5176b565500f09851abf059bf736 110 | ffmpeg getFrame(83): md5 = d0bc5176b565500f09851abf059bf736 111 | ffmpeg getFrame(84): md5 = d0bc5176b565500f09851abf059bf736 112 | ffmpeg getFrame(85): md5 = a73c78e3ae667682e9920a218353540b 113 | ffmpeg getFrame(86): md5 = a73c78e3ae667682e9920a218353540b 114 | ffmpeg getFrame(87): md5 = a73c78e3ae667682e9920a218353540b 115 | ffmpeg getFrame(88): md5 = 02172b5823992d273f7d4295f628309a 116 | ffmpeg getFrame(89): md5 = 02172b5823992d273f7d4295f628309a 117 | ffmpeg getFrame(90): md5 = 02172b5823992d273f7d4295f628309a 118 | ffmpeg getFrame(91): md5 = 5887bfa75094567d9aec180eda7e45c6 119 | ffmpeg getFrame(92): md5 = 5887bfa75094567d9aec180eda7e45c6 120 | ffmpeg getFrame(93): md5 = 5887bfa75094567d9aec180eda7e45c6 121 | ffmpeg getFrame(94): md5 = 3b93b082d52c4ccb8dc5beb22c8316ab 122 | ffmpeg getFrame(95): md5 = 3b93b082d52c4ccb8dc5beb22c8316ab 123 | ffmpeg getFrame(96): md5 = 3b93b082d52c4ccb8dc5beb22c8316ab 124 | ffmpeg getFrame(97): md5 = b6485f3287312414e90fc0508ce9b194 125 | ffmpeg getFrame(98): md5 = b6485f3287312414e90fc0508ce9b194 126 | ffmpeg getFrame(99): md5 = b6485f3287312414e90fc0508ce9b194 127 | ffmpeg getFrame(100): md5 = 57fe0edffdfcf06e88d7219662f04b05 128 | ffmpeg getFrame(101): md5 = 57fe0edffdfcf06e88d7219662f04b05 129 | ffmpeg getFrame(102): md5 = 57fe0edffdfcf06e88d7219662f04b05 130 | ffmpeg getFrame(103): md5 = 5e6ab28f31801cddb176f1c01d13f364 131 | ffmpeg getFrame(104): md5 = 5e6ab28f31801cddb176f1c01d13f364 132 | ffmpeg getFrame(105): md5 = 5e6ab28f31801cddb176f1c01d13f364 133 | ffmpeg getFrame(106): md5 = ab2142ee9ec11e01e42a072ad5762030 134 | ffmpeg getFrame(107): md5 = ab2142ee9ec11e01e42a072ad5762030 135 | ffmpeg getFrame(108): md5 = ab2142ee9ec11e01e42a072ad5762030 136 | ffmpeg getFrame(109): md5 = 84410c79c7cf32562a83fa8f4bb981f7 137 | ffmpeg getFrame(110): md5 = 84410c79c7cf32562a83fa8f4bb981f7 138 | ffmpeg getFrame(111): md5 = 84410c79c7cf32562a83fa8f4bb981f7 139 | ffmpeg getFrame(112): md5 = 5ea25236d676122a90799adefc529611 140 | ffmpeg getFrame(113): md5 = 5ea25236d676122a90799adefc529611 141 | ffmpeg getFrame(114): md5 = 5ea25236d676122a90799adefc529611 142 | ffmpeg getFrame(115): md5 = 0ac65e51db3d7b40f55df3a43f3f03d2 143 | ffmpeg getFrame(116): md5 = 0ac65e51db3d7b40f55df3a43f3f03d2 144 | ffmpeg getFrame(117): md5 = 0ac65e51db3d7b40f55df3a43f3f03d2 145 | ffmpeg getFrame(118): md5 = b0b6a709c28c75d9beffaaaba969ec12 146 | ffmpeg getFrame(119): md5 = b0b6a709c28c75d9beffaaaba969ec12 147 | ffmpeg getFrame(120): md5 = b0b6a709c28c75d9beffaaaba969ec12 148 | ffmpeg getFrame(121): md5 = 7c58a3bc631a7ec1dd48de99658a5cc4 149 | ffmpeg getFrame(122): md5 = 7c58a3bc631a7ec1dd48de99658a5cc4 150 | ffmpeg getFrame(123): md5 = 7c58a3bc631a7ec1dd48de99658a5cc4 151 | ffmpeg getFrame(124): md5 = a89b9a83054bf8737a97c080f07a59bd 152 | ffmpeg getFrame(125): md5 = a89b9a83054bf8737a97c080f07a59bd 153 | ffmpeg getFrame(126): md5 = a89b9a83054bf8737a97c080f07a59bd 154 | ffmpeg getFrame(127): md5 = 5d58afe8118077391b8523a065dd7fce 155 | ffmpeg getFrame(128): md5 = 5d58afe8118077391b8523a065dd7fce 156 | ffmpeg getFrame(129): md5 = 5d58afe8118077391b8523a065dd7fce 157 | ffmpeg getFrame(130): md5 = d7a36b7a67f4ca8941931a15517f5eb1 158 | ffmpeg getFrame(131): md5 = d7a36b7a67f4ca8941931a15517f5eb1 159 | ffmpeg getFrame(132): md5 = d7a36b7a67f4ca8941931a15517f5eb1 160 | ffmpeg getFrame(133): md5 = 3064adc7a54286b4c45f9fe3669e8b1d 161 | ffmpeg getFrame(134): md5 = 3064adc7a54286b4c45f9fe3669e8b1d 162 | ffmpeg getFrame(135): md5 = 3064adc7a54286b4c45f9fe3669e8b1d 163 | ffmpeg getFrame(136): md5 = 49feb765089580d9f3de8a6e36cbaed7 164 | ffmpeg getFrame(137): md5 = 49feb765089580d9f3de8a6e36cbaed7 165 | ffmpeg getFrame(138): md5 = 49feb765089580d9f3de8a6e36cbaed7 166 | ffmpeg getFrame(139): md5 = 3f4495bb347480746f2fb994465b25a9 167 | ffmpeg getFrame(140): md5 = 3f4495bb347480746f2fb994465b25a9 168 | ffmpeg getFrame(141): md5 = 3f4495bb347480746f2fb994465b25a9 169 | ffmpeg getFrame(142): md5 = 53343b23bb1a4aeb1f667608265fad9a 170 | ffmpeg getFrame(143): md5 = 53343b23bb1a4aeb1f667608265fad9a 171 | ffmpeg getFrame(144): md5 = 53343b23bb1a4aeb1f667608265fad9a 172 | ffmpeg getFrame(145): md5 = b84c2d59f936f7cae83e736dc2dd0ebc 173 | ffmpeg getFrame(146): md5 = b84c2d59f936f7cae83e736dc2dd0ebc 174 | ffmpeg getFrame(147): md5 = b84c2d59f936f7cae83e736dc2dd0ebc 175 | ffmpeg getFrame(148): md5 = abe4ae47b43678b60c192fbb4d0a69b5 176 | ffmpeg getFrame(149): md5 = abe4ae47b43678b60c192fbb4d0a69b5 177 | ffmpeg getFrame(150): md5 = abe4ae47b43678b60c192fbb4d0a69b5 178 | ffmpeg getFrame(151): md5 = 117c46c3a208183085c41eccf223c7e6 179 | ffmpeg getFrame(152): md5 = 117c46c3a208183085c41eccf223c7e6 180 | ffmpeg getFrame(153): md5 = 117c46c3a208183085c41eccf223c7e6 181 | ffmpeg getFrame(154): md5 = d587fae1b39f3a2ffae867f9652e1ed7 182 | ffmpeg getFrame(155): md5 = d587fae1b39f3a2ffae867f9652e1ed7 183 | ffmpeg getFrame(156): md5 = d587fae1b39f3a2ffae867f9652e1ed7 184 | ffmpeg getFrame(157): md5 = db17bcfe68abe673bf3df8b8062714ab 185 | ffmpeg getFrame(158): md5 = db17bcfe68abe673bf3df8b8062714ab 186 | ffmpeg getFrame(159): md5 = db17bcfe68abe673bf3df8b8062714ab 187 | ffmpeg getFrame(160): md5 = 316351119812a64ff994bbad9332286e 188 | ffmpeg getFrame(161): md5 = 316351119812a64ff994bbad9332286e 189 | ffmpeg getFrame(162): md5 = 316351119812a64ff994bbad9332286e 190 | ffmpeg getFrame(163): md5 = f4af5e8779fa40f07b0285a4dc1b049d 191 | ffmpeg getFrame(164): md5 = f4af5e8779fa40f07b0285a4dc1b049d 192 | ffmpeg getFrame(165): md5 = f4af5e8779fa40f07b0285a4dc1b049d 193 | ffmpeg getFrame(166): md5 = 274f9691f9d2360d53f299c1fba79614 194 | ffmpeg getFrame(167): md5 = 274f9691f9d2360d53f299c1fba79614 195 | ffmpeg getFrame(168): md5 = 274f9691f9d2360d53f299c1fba79614 196 | ffmpeg getFrame(169): md5 = 4973cb1e537815ee8b7ef73e759f5c39 197 | ffmpeg getFrame(170): md5 = 4973cb1e537815ee8b7ef73e759f5c39 198 | ffmpeg getFrame(171): md5 = 4973cb1e537815ee8b7ef73e759f5c39 199 | ffmpeg getFrame(172): md5 = 8629707f6d5c1a205564ac5f6f10d89f 200 | ffmpeg getFrame(173): md5 = 8629707f6d5c1a205564ac5f6f10d89f 201 | ffmpeg getFrame(174): md5 = 8629707f6d5c1a205564ac5f6f10d89f 202 | ffmpeg getFrame(175): md5 = f72576077cd616c026c7f56829f220ae 203 | ffmpeg getFrame(176): md5 = f72576077cd616c026c7f56829f220ae 204 | ffmpeg getFrame(177): md5 = f72576077cd616c026c7f56829f220ae 205 | ffmpeg getFrame(178): md5 = 017aaef2fe10b6aa2788d7ea0620c252 206 | ffmpeg getFrame(179): md5 = 017aaef2fe10b6aa2788d7ea0620c252 207 | ffmpeg getFrame(180): md5 = 017aaef2fe10b6aa2788d7ea0620c252 208 | ffmpeg getFrame(181): md5 = a5b5bfe8b20e018ef506d703b2af7ccc 209 | ffmpeg getFrame(182): md5 = a5b5bfe8b20e018ef506d703b2af7ccc 210 | ffmpeg getFrame(183): md5 = a5b5bfe8b20e018ef506d703b2af7ccc 211 | ffmpeg getFrame(184): md5 = cc781178ac22f4cf6641183926067215 212 | ffmpeg getFrame(185): md5 = cc781178ac22f4cf6641183926067215 213 | ffmpeg getFrame(186): md5 = cc781178ac22f4cf6641183926067215 214 | ffmpeg getFrame(187): md5 = b0338a88dff4cbabb1599a807e5c6ef0 215 | ffmpeg getFrame(188): md5 = b0338a88dff4cbabb1599a807e5c6ef0 216 | ffmpeg getFrame(189): md5 = b0338a88dff4cbabb1599a807e5c6ef0 217 | ffmpeg getFrame(190): md5 = d1ee4ba4a11217efd0cf8cba15a2eb1f 218 | ffmpeg getFrame(191): md5 = d1ee4ba4a11217efd0cf8cba15a2eb1f 219 | ffmpeg getFrame(192): md5 = d1ee4ba4a11217efd0cf8cba15a2eb1f 220 | ffmpeg getFrame(193): md5 = 0d2849f432fc9656c31629f6288feba0 221 | ffmpeg getFrame(194): md5 = 0d2849f432fc9656c31629f6288feba0 222 | ffmpeg getFrame(195): md5 = 0d2849f432fc9656c31629f6288feba0 223 | ffmpeg getFrame(196): md5 = c26f6d4cf0737c5c6b102c048312f0fc 224 | ffmpeg getFrame(197): md5 = c26f6d4cf0737c5c6b102c048312f0fc 225 | ffmpeg getFrame(198): md5 = c26f6d4cf0737c5c6b102c048312f0fc 226 | ffmpeg getFrame(199): md5 = 23d6d68503ec607327ee6216bc695593 227 | ffmpeg getFrame(200): md5 = 23d6d68503ec607327ee6216bc695593 228 | ffmpeg getFrame(201): md5 = 23d6d68503ec607327ee6216bc695593 229 | ffmpeg getFrame(202): md5 = 85c3d4dbcd9315b00e220d334a012083 230 | ffmpeg getFrame(203): md5 = 85c3d4dbcd9315b00e220d334a012083 231 | ffmpeg getFrame(204): md5 = 85c3d4dbcd9315b00e220d334a012083 232 | ffmpeg getFrame(205): md5 = 08d8b9d438667d710cacc0d9081a4883 233 | ffmpeg getFrame(206): md5 = 08d8b9d438667d710cacc0d9081a4883 234 | ffmpeg getFrame(207): md5 = 08d8b9d438667d710cacc0d9081a4883 235 | ffmpeg getFrame(208): md5 = d3ce913a9c16206990a6b9a80c0561f3 236 | ffmpeg getFrame(209): md5 = d3ce913a9c16206990a6b9a80c0561f3 237 | ffmpeg getFrame(210): md5 = d3ce913a9c16206990a6b9a80c0561f3 238 | ffmpeg getFrame(211): md5 = 64bcd46af5519ad65722bc94e71a5628 239 | ffmpeg getFrame(212): md5 = 64bcd46af5519ad65722bc94e71a5628 240 | ffmpeg getFrame(213): md5 = 64bcd46af5519ad65722bc94e71a5628 241 | ffmpeg getFrame(214): md5 = 55a1b21fb233ec1b965aa27fc5680ef7 242 | ffmpeg getFrame(215): md5 = 55a1b21fb233ec1b965aa27fc5680ef7 243 | ffmpeg getFrame(216): md5 = 55a1b21fb233ec1b965aa27fc5680ef7 244 | ffmpeg getFrame(217): md5 = cbf35af572f3947b04b391dbe8f01912 245 | ffmpeg getFrame(218): md5 = cbf35af572f3947b04b391dbe8f01912 246 | ffmpeg getFrame(219): md5 = cbf35af572f3947b04b391dbe8f01912 247 | ffmpeg getFrame(220): md5 = b68f724605514e4ae7676c04fff62461 248 | ffmpeg getFrame(221): md5 = b68f724605514e4ae7676c04fff62461 249 | ffmpeg getFrame(222): md5 = b68f724605514e4ae7676c04fff62461 250 | ffmpeg getFrame(223): md5 = e2d66cb30e1d942da4b603ecae95c64e 251 | ffmpeg getFrame(224): md5 = e2d66cb30e1d942da4b603ecae95c64e 252 | ffmpeg getFrame(225): md5 = e2d66cb30e1d942da4b603ecae95c64e 253 | ffmpeg getFrame(226): md5 = 70c86d74b825b685d3e90c2dfa21f307 254 | ffmpeg getFrame(227): md5 = 70c86d74b825b685d3e90c2dfa21f307 255 | ffmpeg getFrame(228): md5 = 70c86d74b825b685d3e90c2dfa21f307 256 | ffmpeg getFrame(229): md5 = 52e93862544f05c92375d2aaa2c7dc16 257 | ffmpeg getFrame(230): md5 = 52e93862544f05c92375d2aaa2c7dc16 258 | ffmpeg getFrame(231): md5 = 52e93862544f05c92375d2aaa2c7dc16 259 | ffmpeg getFrame(232): md5 = da9910064c0414e256056b769f942049 260 | ffmpeg getFrame(233): md5 = da9910064c0414e256056b769f942049 261 | ffmpeg getFrame(234): md5 = da9910064c0414e256056b769f942049 262 | ffmpeg getFrame(235): md5 = 2817e435640fc7c26685401007ad6177 263 | ffmpeg getFrame(236): md5 = 2817e435640fc7c26685401007ad6177 264 | ffmpeg getFrame(237): md5 = 2817e435640fc7c26685401007ad6177 265 | ffmpeg getFrame(238): md5 = 5da7388e5b099cfb030b36cefcb260aa 266 | ffmpeg getFrame(239): md5 = 5da7388e5b099cfb030b36cefcb260aa 267 | ffmpeg getFrame(240): md5 = 5da7388e5b099cfb030b36cefcb260aa 268 | ffmpeg getFrame(241): md5 = e3a3ea606c5ccdc530c7c6b2a2a5aa71 269 | -------------------------------------------------------------------------------- /tests/getFramesInReverseOrder.phpt: -------------------------------------------------------------------------------- 1 | --TEST-- 2 | ffmpeg getFrame in reverse order test 3 | --SKIPIF-- 4 | 9 | --FILE-- 10 | getFrameCount(); 14 | for($i = $framecount; $i > 0; $i--) { 15 | $img = sprintf("%s/test-%04d.png", dirname(__FILE__), $i); 16 | $frame = $mov->getFrame($i); 17 | $image = $frame->toGDImage(); 18 | imagepng($image, $img); 19 | printf("ffmpeg getFramesInReverseOrder($i): md5 = %s\n", md5(file_get_contents($img))); 20 | imagedestroy($image); 21 | unlink($img); 22 | } 23 | ?> 24 | --EXPECT-- 25 | ffmpeg getFramesInReverseOrder(240): md5 = 5da7388e5b099cfb030b36cefcb260aa 26 | ffmpeg getFramesInReverseOrder(239): md5 = 5da7388e5b099cfb030b36cefcb260aa 27 | ffmpeg getFramesInReverseOrder(238): md5 = 5da7388e5b099cfb030b36cefcb260aa 28 | ffmpeg getFramesInReverseOrder(237): md5 = 2817e435640fc7c26685401007ad6177 29 | ffmpeg getFramesInReverseOrder(236): md5 = 2817e435640fc7c26685401007ad6177 30 | ffmpeg getFramesInReverseOrder(235): md5 = 2817e435640fc7c26685401007ad6177 31 | ffmpeg getFramesInReverseOrder(234): md5 = da9910064c0414e256056b769f942049 32 | ffmpeg getFramesInReverseOrder(233): md5 = da9910064c0414e256056b769f942049 33 | ffmpeg getFramesInReverseOrder(232): md5 = da9910064c0414e256056b769f942049 34 | ffmpeg getFramesInReverseOrder(231): md5 = 52e93862544f05c92375d2aaa2c7dc16 35 | ffmpeg getFramesInReverseOrder(230): md5 = 52e93862544f05c92375d2aaa2c7dc16 36 | ffmpeg getFramesInReverseOrder(229): md5 = 52e93862544f05c92375d2aaa2c7dc16 37 | ffmpeg getFramesInReverseOrder(228): md5 = 70c86d74b825b685d3e90c2dfa21f307 38 | ffmpeg getFramesInReverseOrder(227): md5 = 70c86d74b825b685d3e90c2dfa21f307 39 | ffmpeg getFramesInReverseOrder(226): md5 = 70c86d74b825b685d3e90c2dfa21f307 40 | ffmpeg getFramesInReverseOrder(225): md5 = e2d66cb30e1d942da4b603ecae95c64e 41 | ffmpeg getFramesInReverseOrder(224): md5 = e2d66cb30e1d942da4b603ecae95c64e 42 | ffmpeg getFramesInReverseOrder(223): md5 = e2d66cb30e1d942da4b603ecae95c64e 43 | ffmpeg getFramesInReverseOrder(222): md5 = b68f724605514e4ae7676c04fff62461 44 | ffmpeg getFramesInReverseOrder(221): md5 = b68f724605514e4ae7676c04fff62461 45 | ffmpeg getFramesInReverseOrder(220): md5 = b68f724605514e4ae7676c04fff62461 46 | ffmpeg getFramesInReverseOrder(219): md5 = cbf35af572f3947b04b391dbe8f01912 47 | ffmpeg getFramesInReverseOrder(218): md5 = cbf35af572f3947b04b391dbe8f01912 48 | ffmpeg getFramesInReverseOrder(217): md5 = cbf35af572f3947b04b391dbe8f01912 49 | ffmpeg getFramesInReverseOrder(216): md5 = 55a1b21fb233ec1b965aa27fc5680ef7 50 | ffmpeg getFramesInReverseOrder(215): md5 = 55a1b21fb233ec1b965aa27fc5680ef7 51 | ffmpeg getFramesInReverseOrder(214): md5 = 55a1b21fb233ec1b965aa27fc5680ef7 52 | ffmpeg getFramesInReverseOrder(213): md5 = 64bcd46af5519ad65722bc94e71a5628 53 | ffmpeg getFramesInReverseOrder(212): md5 = 64bcd46af5519ad65722bc94e71a5628 54 | ffmpeg getFramesInReverseOrder(211): md5 = 64bcd46af5519ad65722bc94e71a5628 55 | ffmpeg getFramesInReverseOrder(210): md5 = d3ce913a9c16206990a6b9a80c0561f3 56 | ffmpeg getFramesInReverseOrder(209): md5 = d3ce913a9c16206990a6b9a80c0561f3 57 | ffmpeg getFramesInReverseOrder(208): md5 = d3ce913a9c16206990a6b9a80c0561f3 58 | ffmpeg getFramesInReverseOrder(207): md5 = 08d8b9d438667d710cacc0d9081a4883 59 | ffmpeg getFramesInReverseOrder(206): md5 = 08d8b9d438667d710cacc0d9081a4883 60 | ffmpeg getFramesInReverseOrder(205): md5 = 08d8b9d438667d710cacc0d9081a4883 61 | ffmpeg getFramesInReverseOrder(204): md5 = 85c3d4dbcd9315b00e220d334a012083 62 | ffmpeg getFramesInReverseOrder(203): md5 = 85c3d4dbcd9315b00e220d334a012083 63 | ffmpeg getFramesInReverseOrder(202): md5 = 85c3d4dbcd9315b00e220d334a012083 64 | ffmpeg getFramesInReverseOrder(201): md5 = 23d6d68503ec607327ee6216bc695593 65 | ffmpeg getFramesInReverseOrder(200): md5 = 23d6d68503ec607327ee6216bc695593 66 | ffmpeg getFramesInReverseOrder(199): md5 = 23d6d68503ec607327ee6216bc695593 67 | ffmpeg getFramesInReverseOrder(198): md5 = c26f6d4cf0737c5c6b102c048312f0fc 68 | ffmpeg getFramesInReverseOrder(197): md5 = c26f6d4cf0737c5c6b102c048312f0fc 69 | ffmpeg getFramesInReverseOrder(196): md5 = c26f6d4cf0737c5c6b102c048312f0fc 70 | ffmpeg getFramesInReverseOrder(195): md5 = 0d2849f432fc9656c31629f6288feba0 71 | ffmpeg getFramesInReverseOrder(194): md5 = 0d2849f432fc9656c31629f6288feba0 72 | ffmpeg getFramesInReverseOrder(193): md5 = 0d2849f432fc9656c31629f6288feba0 73 | ffmpeg getFramesInReverseOrder(192): md5 = d1ee4ba4a11217efd0cf8cba15a2eb1f 74 | ffmpeg getFramesInReverseOrder(191): md5 = d1ee4ba4a11217efd0cf8cba15a2eb1f 75 | ffmpeg getFramesInReverseOrder(190): md5 = d1ee4ba4a11217efd0cf8cba15a2eb1f 76 | ffmpeg getFramesInReverseOrder(189): md5 = b0338a88dff4cbabb1599a807e5c6ef0 77 | ffmpeg getFramesInReverseOrder(188): md5 = b0338a88dff4cbabb1599a807e5c6ef0 78 | ffmpeg getFramesInReverseOrder(187): md5 = b0338a88dff4cbabb1599a807e5c6ef0 79 | ffmpeg getFramesInReverseOrder(186): md5 = cc781178ac22f4cf6641183926067215 80 | ffmpeg getFramesInReverseOrder(185): md5 = cc781178ac22f4cf6641183926067215 81 | ffmpeg getFramesInReverseOrder(184): md5 = cc781178ac22f4cf6641183926067215 82 | ffmpeg getFramesInReverseOrder(183): md5 = a5b5bfe8b20e018ef506d703b2af7ccc 83 | ffmpeg getFramesInReverseOrder(182): md5 = a5b5bfe8b20e018ef506d703b2af7ccc 84 | ffmpeg getFramesInReverseOrder(181): md5 = a5b5bfe8b20e018ef506d703b2af7ccc 85 | ffmpeg getFramesInReverseOrder(180): md5 = 017aaef2fe10b6aa2788d7ea0620c252 86 | ffmpeg getFramesInReverseOrder(179): md5 = 017aaef2fe10b6aa2788d7ea0620c252 87 | ffmpeg getFramesInReverseOrder(178): md5 = 017aaef2fe10b6aa2788d7ea0620c252 88 | ffmpeg getFramesInReverseOrder(177): md5 = f72576077cd616c026c7f56829f220ae 89 | ffmpeg getFramesInReverseOrder(176): md5 = f72576077cd616c026c7f56829f220ae 90 | ffmpeg getFramesInReverseOrder(175): md5 = f72576077cd616c026c7f56829f220ae 91 | ffmpeg getFramesInReverseOrder(174): md5 = 8629707f6d5c1a205564ac5f6f10d89f 92 | ffmpeg getFramesInReverseOrder(173): md5 = 8629707f6d5c1a205564ac5f6f10d89f 93 | ffmpeg getFramesInReverseOrder(172): md5 = 8629707f6d5c1a205564ac5f6f10d89f 94 | ffmpeg getFramesInReverseOrder(171): md5 = 4973cb1e537815ee8b7ef73e759f5c39 95 | ffmpeg getFramesInReverseOrder(170): md5 = 4973cb1e537815ee8b7ef73e759f5c39 96 | ffmpeg getFramesInReverseOrder(169): md5 = 4973cb1e537815ee8b7ef73e759f5c39 97 | ffmpeg getFramesInReverseOrder(168): md5 = 274f9691f9d2360d53f299c1fba79614 98 | ffmpeg getFramesInReverseOrder(167): md5 = 274f9691f9d2360d53f299c1fba79614 99 | ffmpeg getFramesInReverseOrder(166): md5 = 274f9691f9d2360d53f299c1fba79614 100 | ffmpeg getFramesInReverseOrder(165): md5 = f4af5e8779fa40f07b0285a4dc1b049d 101 | ffmpeg getFramesInReverseOrder(164): md5 = f4af5e8779fa40f07b0285a4dc1b049d 102 | ffmpeg getFramesInReverseOrder(163): md5 = f4af5e8779fa40f07b0285a4dc1b049d 103 | ffmpeg getFramesInReverseOrder(162): md5 = 316351119812a64ff994bbad9332286e 104 | ffmpeg getFramesInReverseOrder(161): md5 = 316351119812a64ff994bbad9332286e 105 | ffmpeg getFramesInReverseOrder(160): md5 = 316351119812a64ff994bbad9332286e 106 | ffmpeg getFramesInReverseOrder(159): md5 = db17bcfe68abe673bf3df8b8062714ab 107 | ffmpeg getFramesInReverseOrder(158): md5 = db17bcfe68abe673bf3df8b8062714ab 108 | ffmpeg getFramesInReverseOrder(157): md5 = db17bcfe68abe673bf3df8b8062714ab 109 | ffmpeg getFramesInReverseOrder(156): md5 = d587fae1b39f3a2ffae867f9652e1ed7 110 | ffmpeg getFramesInReverseOrder(155): md5 = d587fae1b39f3a2ffae867f9652e1ed7 111 | ffmpeg getFramesInReverseOrder(154): md5 = d587fae1b39f3a2ffae867f9652e1ed7 112 | ffmpeg getFramesInReverseOrder(153): md5 = 117c46c3a208183085c41eccf223c7e6 113 | ffmpeg getFramesInReverseOrder(152): md5 = 117c46c3a208183085c41eccf223c7e6 114 | ffmpeg getFramesInReverseOrder(151): md5 = 117c46c3a208183085c41eccf223c7e6 115 | ffmpeg getFramesInReverseOrder(150): md5 = abe4ae47b43678b60c192fbb4d0a69b5 116 | ffmpeg getFramesInReverseOrder(149): md5 = abe4ae47b43678b60c192fbb4d0a69b5 117 | ffmpeg getFramesInReverseOrder(148): md5 = abe4ae47b43678b60c192fbb4d0a69b5 118 | ffmpeg getFramesInReverseOrder(147): md5 = b84c2d59f936f7cae83e736dc2dd0ebc 119 | ffmpeg getFramesInReverseOrder(146): md5 = b84c2d59f936f7cae83e736dc2dd0ebc 120 | ffmpeg getFramesInReverseOrder(145): md5 = b84c2d59f936f7cae83e736dc2dd0ebc 121 | ffmpeg getFramesInReverseOrder(144): md5 = 53343b23bb1a4aeb1f667608265fad9a 122 | ffmpeg getFramesInReverseOrder(143): md5 = 53343b23bb1a4aeb1f667608265fad9a 123 | ffmpeg getFramesInReverseOrder(142): md5 = 53343b23bb1a4aeb1f667608265fad9a 124 | ffmpeg getFramesInReverseOrder(141): md5 = 3f4495bb347480746f2fb994465b25a9 125 | ffmpeg getFramesInReverseOrder(140): md5 = 3f4495bb347480746f2fb994465b25a9 126 | ffmpeg getFramesInReverseOrder(139): md5 = 3f4495bb347480746f2fb994465b25a9 127 | ffmpeg getFramesInReverseOrder(138): md5 = 49feb765089580d9f3de8a6e36cbaed7 128 | ffmpeg getFramesInReverseOrder(137): md5 = 49feb765089580d9f3de8a6e36cbaed7 129 | ffmpeg getFramesInReverseOrder(136): md5 = 49feb765089580d9f3de8a6e36cbaed7 130 | ffmpeg getFramesInReverseOrder(135): md5 = 3064adc7a54286b4c45f9fe3669e8b1d 131 | ffmpeg getFramesInReverseOrder(134): md5 = 3064adc7a54286b4c45f9fe3669e8b1d 132 | ffmpeg getFramesInReverseOrder(133): md5 = 3064adc7a54286b4c45f9fe3669e8b1d 133 | ffmpeg getFramesInReverseOrder(132): md5 = d7a36b7a67f4ca8941931a15517f5eb1 134 | ffmpeg getFramesInReverseOrder(131): md5 = d7a36b7a67f4ca8941931a15517f5eb1 135 | ffmpeg getFramesInReverseOrder(130): md5 = d7a36b7a67f4ca8941931a15517f5eb1 136 | ffmpeg getFramesInReverseOrder(129): md5 = 5d58afe8118077391b8523a065dd7fce 137 | ffmpeg getFramesInReverseOrder(128): md5 = 5d58afe8118077391b8523a065dd7fce 138 | ffmpeg getFramesInReverseOrder(127): md5 = 5d58afe8118077391b8523a065dd7fce 139 | ffmpeg getFramesInReverseOrder(126): md5 = a89b9a83054bf8737a97c080f07a59bd 140 | ffmpeg getFramesInReverseOrder(125): md5 = a89b9a83054bf8737a97c080f07a59bd 141 | ffmpeg getFramesInReverseOrder(124): md5 = a89b9a83054bf8737a97c080f07a59bd 142 | ffmpeg getFramesInReverseOrder(123): md5 = 7c58a3bc631a7ec1dd48de99658a5cc4 143 | ffmpeg getFramesInReverseOrder(122): md5 = 7c58a3bc631a7ec1dd48de99658a5cc4 144 | ffmpeg getFramesInReverseOrder(121): md5 = 7c58a3bc631a7ec1dd48de99658a5cc4 145 | ffmpeg getFramesInReverseOrder(120): md5 = b0b6a709c28c75d9beffaaaba969ec12 146 | ffmpeg getFramesInReverseOrder(119): md5 = b0b6a709c28c75d9beffaaaba969ec12 147 | ffmpeg getFramesInReverseOrder(118): md5 = b0b6a709c28c75d9beffaaaba969ec12 148 | ffmpeg getFramesInReverseOrder(117): md5 = 0ac65e51db3d7b40f55df3a43f3f03d2 149 | ffmpeg getFramesInReverseOrder(116): md5 = 0ac65e51db3d7b40f55df3a43f3f03d2 150 | ffmpeg getFramesInReverseOrder(115): md5 = 0ac65e51db3d7b40f55df3a43f3f03d2 151 | ffmpeg getFramesInReverseOrder(114): md5 = 5ea25236d676122a90799adefc529611 152 | ffmpeg getFramesInReverseOrder(113): md5 = 5ea25236d676122a90799adefc529611 153 | ffmpeg getFramesInReverseOrder(112): md5 = 5ea25236d676122a90799adefc529611 154 | ffmpeg getFramesInReverseOrder(111): md5 = 84410c79c7cf32562a83fa8f4bb981f7 155 | ffmpeg getFramesInReverseOrder(110): md5 = 84410c79c7cf32562a83fa8f4bb981f7 156 | ffmpeg getFramesInReverseOrder(109): md5 = 84410c79c7cf32562a83fa8f4bb981f7 157 | ffmpeg getFramesInReverseOrder(108): md5 = ab2142ee9ec11e01e42a072ad5762030 158 | ffmpeg getFramesInReverseOrder(107): md5 = ab2142ee9ec11e01e42a072ad5762030 159 | ffmpeg getFramesInReverseOrder(106): md5 = ab2142ee9ec11e01e42a072ad5762030 160 | ffmpeg getFramesInReverseOrder(105): md5 = 5e6ab28f31801cddb176f1c01d13f364 161 | ffmpeg getFramesInReverseOrder(104): md5 = 5e6ab28f31801cddb176f1c01d13f364 162 | ffmpeg getFramesInReverseOrder(103): md5 = 5e6ab28f31801cddb176f1c01d13f364 163 | ffmpeg getFramesInReverseOrder(102): md5 = 57fe0edffdfcf06e88d7219662f04b05 164 | ffmpeg getFramesInReverseOrder(101): md5 = 57fe0edffdfcf06e88d7219662f04b05 165 | ffmpeg getFramesInReverseOrder(100): md5 = 57fe0edffdfcf06e88d7219662f04b05 166 | ffmpeg getFramesInReverseOrder(99): md5 = b6485f3287312414e90fc0508ce9b194 167 | ffmpeg getFramesInReverseOrder(98): md5 = b6485f3287312414e90fc0508ce9b194 168 | ffmpeg getFramesInReverseOrder(97): md5 = b6485f3287312414e90fc0508ce9b194 169 | ffmpeg getFramesInReverseOrder(96): md5 = 3b93b082d52c4ccb8dc5beb22c8316ab 170 | ffmpeg getFramesInReverseOrder(95): md5 = 3b93b082d52c4ccb8dc5beb22c8316ab 171 | ffmpeg getFramesInReverseOrder(94): md5 = 3b93b082d52c4ccb8dc5beb22c8316ab 172 | ffmpeg getFramesInReverseOrder(93): md5 = 5887bfa75094567d9aec180eda7e45c6 173 | ffmpeg getFramesInReverseOrder(92): md5 = 5887bfa75094567d9aec180eda7e45c6 174 | ffmpeg getFramesInReverseOrder(91): md5 = 5887bfa75094567d9aec180eda7e45c6 175 | ffmpeg getFramesInReverseOrder(90): md5 = 02172b5823992d273f7d4295f628309a 176 | ffmpeg getFramesInReverseOrder(89): md5 = 02172b5823992d273f7d4295f628309a 177 | ffmpeg getFramesInReverseOrder(88): md5 = 02172b5823992d273f7d4295f628309a 178 | ffmpeg getFramesInReverseOrder(87): md5 = a73c78e3ae667682e9920a218353540b 179 | ffmpeg getFramesInReverseOrder(86): md5 = a73c78e3ae667682e9920a218353540b 180 | ffmpeg getFramesInReverseOrder(85): md5 = a73c78e3ae667682e9920a218353540b 181 | ffmpeg getFramesInReverseOrder(84): md5 = d0bc5176b565500f09851abf059bf736 182 | ffmpeg getFramesInReverseOrder(83): md5 = d0bc5176b565500f09851abf059bf736 183 | ffmpeg getFramesInReverseOrder(82): md5 = d0bc5176b565500f09851abf059bf736 184 | ffmpeg getFramesInReverseOrder(81): md5 = 97ea17ae200e6ca4e2412ba5546d4cdb 185 | ffmpeg getFramesInReverseOrder(80): md5 = 97ea17ae200e6ca4e2412ba5546d4cdb 186 | ffmpeg getFramesInReverseOrder(79): md5 = 97ea17ae200e6ca4e2412ba5546d4cdb 187 | ffmpeg getFramesInReverseOrder(78): md5 = 25ea525ec2630b123da3bd18b44e391b 188 | ffmpeg getFramesInReverseOrder(77): md5 = 25ea525ec2630b123da3bd18b44e391b 189 | ffmpeg getFramesInReverseOrder(76): md5 = 25ea525ec2630b123da3bd18b44e391b 190 | ffmpeg getFramesInReverseOrder(75): md5 = f8eb6d231d353e8d98cf76f1fcf960c3 191 | ffmpeg getFramesInReverseOrder(74): md5 = f8eb6d231d353e8d98cf76f1fcf960c3 192 | ffmpeg getFramesInReverseOrder(73): md5 = f8eb6d231d353e8d98cf76f1fcf960c3 193 | ffmpeg getFramesInReverseOrder(72): md5 = 3cac4625a645a147a7e7cb8ab28ebf07 194 | ffmpeg getFramesInReverseOrder(71): md5 = 3cac4625a645a147a7e7cb8ab28ebf07 195 | ffmpeg getFramesInReverseOrder(70): md5 = 3cac4625a645a147a7e7cb8ab28ebf07 196 | ffmpeg getFramesInReverseOrder(69): md5 = cc52ca71fc8daae8feba52fa329f9f66 197 | ffmpeg getFramesInReverseOrder(68): md5 = cc52ca71fc8daae8feba52fa329f9f66 198 | ffmpeg getFramesInReverseOrder(67): md5 = cc52ca71fc8daae8feba52fa329f9f66 199 | ffmpeg getFramesInReverseOrder(66): md5 = d86b04f95208b77c06e49ba9a76b477f 200 | ffmpeg getFramesInReverseOrder(65): md5 = d86b04f95208b77c06e49ba9a76b477f 201 | ffmpeg getFramesInReverseOrder(64): md5 = d86b04f95208b77c06e49ba9a76b477f 202 | ffmpeg getFramesInReverseOrder(63): md5 = 963b85dafe7ac84daf64a12931509de7 203 | ffmpeg getFramesInReverseOrder(62): md5 = 963b85dafe7ac84daf64a12931509de7 204 | ffmpeg getFramesInReverseOrder(61): md5 = 963b85dafe7ac84daf64a12931509de7 205 | ffmpeg getFramesInReverseOrder(60): md5 = 7b1f32d4e4a1efce454c0b73ec015e75 206 | ffmpeg getFramesInReverseOrder(59): md5 = 7b1f32d4e4a1efce454c0b73ec015e75 207 | ffmpeg getFramesInReverseOrder(58): md5 = 7b1f32d4e4a1efce454c0b73ec015e75 208 | ffmpeg getFramesInReverseOrder(57): md5 = c360fd94742147db7e97796a61eee19f 209 | ffmpeg getFramesInReverseOrder(56): md5 = c360fd94742147db7e97796a61eee19f 210 | ffmpeg getFramesInReverseOrder(55): md5 = c360fd94742147db7e97796a61eee19f 211 | ffmpeg getFramesInReverseOrder(54): md5 = 3953dcbdeb9b687b2b1e925183a16c39 212 | ffmpeg getFramesInReverseOrder(53): md5 = 3953dcbdeb9b687b2b1e925183a16c39 213 | ffmpeg getFramesInReverseOrder(52): md5 = 3953dcbdeb9b687b2b1e925183a16c39 214 | ffmpeg getFramesInReverseOrder(51): md5 = c61c4e4620af5adba309237a84ef91df 215 | ffmpeg getFramesInReverseOrder(50): md5 = c61c4e4620af5adba309237a84ef91df 216 | ffmpeg getFramesInReverseOrder(49): md5 = c61c4e4620af5adba309237a84ef91df 217 | ffmpeg getFramesInReverseOrder(48): md5 = faa5ef30ddeb97020250c150779e3399 218 | ffmpeg getFramesInReverseOrder(47): md5 = faa5ef30ddeb97020250c150779e3399 219 | ffmpeg getFramesInReverseOrder(46): md5 = faa5ef30ddeb97020250c150779e3399 220 | ffmpeg getFramesInReverseOrder(45): md5 = 9f77876e4926b92d5f7dc565ac94e366 221 | ffmpeg getFramesInReverseOrder(44): md5 = 9f77876e4926b92d5f7dc565ac94e366 222 | ffmpeg getFramesInReverseOrder(43): md5 = 9f77876e4926b92d5f7dc565ac94e366 223 | ffmpeg getFramesInReverseOrder(42): md5 = 579618d56fe46acdb9bcfcff67808ae4 224 | ffmpeg getFramesInReverseOrder(41): md5 = 579618d56fe46acdb9bcfcff67808ae4 225 | ffmpeg getFramesInReverseOrder(40): md5 = 579618d56fe46acdb9bcfcff67808ae4 226 | ffmpeg getFramesInReverseOrder(39): md5 = 4f9a4e239c4b9459a59b038b0be3d5df 227 | ffmpeg getFramesInReverseOrder(38): md5 = 4f9a4e239c4b9459a59b038b0be3d5df 228 | ffmpeg getFramesInReverseOrder(37): md5 = 4f9a4e239c4b9459a59b038b0be3d5df 229 | ffmpeg getFramesInReverseOrder(36): md5 = 689ad71143a347f53417356eabb0037f 230 | ffmpeg getFramesInReverseOrder(35): md5 = 689ad71143a347f53417356eabb0037f 231 | ffmpeg getFramesInReverseOrder(34): md5 = 689ad71143a347f53417356eabb0037f 232 | ffmpeg getFramesInReverseOrder(33): md5 = 9620a937f1a19c3d5e95716fae1eb47f 233 | ffmpeg getFramesInReverseOrder(32): md5 = 9620a937f1a19c3d5e95716fae1eb47f 234 | ffmpeg getFramesInReverseOrder(31): md5 = 9620a937f1a19c3d5e95716fae1eb47f 235 | ffmpeg getFramesInReverseOrder(30): md5 = cbdbcebeea6ea45f6965a83543b6c44b 236 | ffmpeg getFramesInReverseOrder(29): md5 = cbdbcebeea6ea45f6965a83543b6c44b 237 | ffmpeg getFramesInReverseOrder(28): md5 = cbdbcebeea6ea45f6965a83543b6c44b 238 | ffmpeg getFramesInReverseOrder(27): md5 = 405cc6f1453352460cf01875aa23ccff 239 | ffmpeg getFramesInReverseOrder(26): md5 = 405cc6f1453352460cf01875aa23ccff 240 | ffmpeg getFramesInReverseOrder(25): md5 = 405cc6f1453352460cf01875aa23ccff 241 | ffmpeg getFramesInReverseOrder(24): md5 = 5af7473006c39343accad86b6f9cf6ed 242 | ffmpeg getFramesInReverseOrder(23): md5 = 5af7473006c39343accad86b6f9cf6ed 243 | ffmpeg getFramesInReverseOrder(22): md5 = 5af7473006c39343accad86b6f9cf6ed 244 | ffmpeg getFramesInReverseOrder(21): md5 = dbcd63a3fe7bc6e5ae746134462a582d 245 | ffmpeg getFramesInReverseOrder(20): md5 = dbcd63a3fe7bc6e5ae746134462a582d 246 | ffmpeg getFramesInReverseOrder(19): md5 = dbcd63a3fe7bc6e5ae746134462a582d 247 | ffmpeg getFramesInReverseOrder(18): md5 = 25fce65aaebf63d787415133ee525e0b 248 | ffmpeg getFramesInReverseOrder(17): md5 = 25fce65aaebf63d787415133ee525e0b 249 | ffmpeg getFramesInReverseOrder(16): md5 = 25fce65aaebf63d787415133ee525e0b 250 | ffmpeg getFramesInReverseOrder(15): md5 = 73327939f7fc8b6080525dc259bdd136 251 | ffmpeg getFramesInReverseOrder(14): md5 = 73327939f7fc8b6080525dc259bdd136 252 | ffmpeg getFramesInReverseOrder(13): md5 = 73327939f7fc8b6080525dc259bdd136 253 | ffmpeg getFramesInReverseOrder(12): md5 = 8de055e9eb38073ab35f75cfe4adae83 254 | ffmpeg getFramesInReverseOrder(11): md5 = 8de055e9eb38073ab35f75cfe4adae83 255 | ffmpeg getFramesInReverseOrder(10): md5 = 8de055e9eb38073ab35f75cfe4adae83 256 | ffmpeg getFramesInReverseOrder(9): md5 = 0a7a900dc376afc5598d5b2ae50be442 257 | ffmpeg getFramesInReverseOrder(8): md5 = 0a7a900dc376afc5598d5b2ae50be442 258 | ffmpeg getFramesInReverseOrder(7): md5 = 0a7a900dc376afc5598d5b2ae50be442 259 | ffmpeg getFramesInReverseOrder(6): md5 = bc3e96ad73e019583d449b6d2d857858 260 | ffmpeg getFramesInReverseOrder(5): md5 = bc3e96ad73e019583d449b6d2d857858 261 | ffmpeg getFramesInReverseOrder(4): md5 = bc3e96ad73e019583d449b6d2d857858 262 | ffmpeg getFramesInReverseOrder(3): md5 = 054ca5377a0592ea15497bcfefa59181 263 | ffmpeg getFramesInReverseOrder(2): md5 = 054ca5377a0592ea15497bcfefa59181 264 | ffmpeg getFramesInReverseOrder(1): md5 = 054ca5377a0592ea15497bcfefa59181 265 | -------------------------------------------------------------------------------- /tests/getFramesNoArg.phpt: -------------------------------------------------------------------------------- 1 | --TEST-- 2 | ffmpeg getFramesNoArg test 3 | --SKIPIF-- 4 | 9 | --FILE-- 10 | getFrame()) != false) { 16 | $i++; 17 | $filename = $img . $i . '.png'; 18 | $gd_image = $frame->toGDImage(); 19 | imagepng($gd_image, $filename); 20 | printf("ffmpeg getFrame($i): md5 = %s\n", md5(file_get_contents($filename))); 21 | imagedestroy($gd_image); 22 | unlink($filename); 23 | } 24 | ?> 25 | --EXPECT-- 26 | ffmpeg getFrame(1): md5 = 054ca5377a0592ea15497bcfefa59181 27 | ffmpeg getFrame(2): md5 = 054ca5377a0592ea15497bcfefa59181 28 | ffmpeg getFrame(3): md5 = 054ca5377a0592ea15497bcfefa59181 29 | ffmpeg getFrame(4): md5 = bc3e96ad73e019583d449b6d2d857858 30 | ffmpeg getFrame(5): md5 = bc3e96ad73e019583d449b6d2d857858 31 | ffmpeg getFrame(6): md5 = bc3e96ad73e019583d449b6d2d857858 32 | ffmpeg getFrame(7): md5 = 0a7a900dc376afc5598d5b2ae50be442 33 | ffmpeg getFrame(8): md5 = 0a7a900dc376afc5598d5b2ae50be442 34 | ffmpeg getFrame(9): md5 = 0a7a900dc376afc5598d5b2ae50be442 35 | ffmpeg getFrame(10): md5 = 8de055e9eb38073ab35f75cfe4adae83 36 | ffmpeg getFrame(11): md5 = 8de055e9eb38073ab35f75cfe4adae83 37 | ffmpeg getFrame(12): md5 = 8de055e9eb38073ab35f75cfe4adae83 38 | ffmpeg getFrame(13): md5 = 73327939f7fc8b6080525dc259bdd136 39 | ffmpeg getFrame(14): md5 = 73327939f7fc8b6080525dc259bdd136 40 | ffmpeg getFrame(15): md5 = 73327939f7fc8b6080525dc259bdd136 41 | ffmpeg getFrame(16): md5 = 25fce65aaebf63d787415133ee525e0b 42 | ffmpeg getFrame(17): md5 = 25fce65aaebf63d787415133ee525e0b 43 | ffmpeg getFrame(18): md5 = 25fce65aaebf63d787415133ee525e0b 44 | ffmpeg getFrame(19): md5 = dbcd63a3fe7bc6e5ae746134462a582d 45 | ffmpeg getFrame(20): md5 = dbcd63a3fe7bc6e5ae746134462a582d 46 | ffmpeg getFrame(21): md5 = dbcd63a3fe7bc6e5ae746134462a582d 47 | ffmpeg getFrame(22): md5 = 5af7473006c39343accad86b6f9cf6ed 48 | ffmpeg getFrame(23): md5 = 5af7473006c39343accad86b6f9cf6ed 49 | ffmpeg getFrame(24): md5 = 5af7473006c39343accad86b6f9cf6ed 50 | ffmpeg getFrame(25): md5 = 405cc6f1453352460cf01875aa23ccff 51 | ffmpeg getFrame(26): md5 = 405cc6f1453352460cf01875aa23ccff 52 | ffmpeg getFrame(27): md5 = 405cc6f1453352460cf01875aa23ccff 53 | ffmpeg getFrame(28): md5 = cbdbcebeea6ea45f6965a83543b6c44b 54 | ffmpeg getFrame(29): md5 = cbdbcebeea6ea45f6965a83543b6c44b 55 | ffmpeg getFrame(30): md5 = cbdbcebeea6ea45f6965a83543b6c44b 56 | ffmpeg getFrame(31): md5 = 9620a937f1a19c3d5e95716fae1eb47f 57 | ffmpeg getFrame(32): md5 = 9620a937f1a19c3d5e95716fae1eb47f 58 | ffmpeg getFrame(33): md5 = 9620a937f1a19c3d5e95716fae1eb47f 59 | ffmpeg getFrame(34): md5 = 689ad71143a347f53417356eabb0037f 60 | ffmpeg getFrame(35): md5 = 689ad71143a347f53417356eabb0037f 61 | ffmpeg getFrame(36): md5 = 689ad71143a347f53417356eabb0037f 62 | ffmpeg getFrame(37): md5 = 4f9a4e239c4b9459a59b038b0be3d5df 63 | ffmpeg getFrame(38): md5 = 4f9a4e239c4b9459a59b038b0be3d5df 64 | ffmpeg getFrame(39): md5 = 4f9a4e239c4b9459a59b038b0be3d5df 65 | ffmpeg getFrame(40): md5 = 579618d56fe46acdb9bcfcff67808ae4 66 | ffmpeg getFrame(41): md5 = 579618d56fe46acdb9bcfcff67808ae4 67 | ffmpeg getFrame(42): md5 = 579618d56fe46acdb9bcfcff67808ae4 68 | ffmpeg getFrame(43): md5 = 9f77876e4926b92d5f7dc565ac94e366 69 | ffmpeg getFrame(44): md5 = 9f77876e4926b92d5f7dc565ac94e366 70 | ffmpeg getFrame(45): md5 = 9f77876e4926b92d5f7dc565ac94e366 71 | ffmpeg getFrame(46): md5 = faa5ef30ddeb97020250c150779e3399 72 | ffmpeg getFrame(47): md5 = faa5ef30ddeb97020250c150779e3399 73 | ffmpeg getFrame(48): md5 = faa5ef30ddeb97020250c150779e3399 74 | ffmpeg getFrame(49): md5 = c61c4e4620af5adba309237a84ef91df 75 | ffmpeg getFrame(50): md5 = c61c4e4620af5adba309237a84ef91df 76 | ffmpeg getFrame(51): md5 = c61c4e4620af5adba309237a84ef91df 77 | ffmpeg getFrame(52): md5 = 3953dcbdeb9b687b2b1e925183a16c39 78 | ffmpeg getFrame(53): md5 = 3953dcbdeb9b687b2b1e925183a16c39 79 | ffmpeg getFrame(54): md5 = 3953dcbdeb9b687b2b1e925183a16c39 80 | ffmpeg getFrame(55): md5 = c360fd94742147db7e97796a61eee19f 81 | ffmpeg getFrame(56): md5 = c360fd94742147db7e97796a61eee19f 82 | ffmpeg getFrame(57): md5 = c360fd94742147db7e97796a61eee19f 83 | ffmpeg getFrame(58): md5 = 7b1f32d4e4a1efce454c0b73ec015e75 84 | ffmpeg getFrame(59): md5 = 7b1f32d4e4a1efce454c0b73ec015e75 85 | ffmpeg getFrame(60): md5 = 7b1f32d4e4a1efce454c0b73ec015e75 86 | ffmpeg getFrame(61): md5 = 963b85dafe7ac84daf64a12931509de7 87 | ffmpeg getFrame(62): md5 = 963b85dafe7ac84daf64a12931509de7 88 | ffmpeg getFrame(63): md5 = 963b85dafe7ac84daf64a12931509de7 89 | ffmpeg getFrame(64): md5 = d86b04f95208b77c06e49ba9a76b477f 90 | ffmpeg getFrame(65): md5 = d86b04f95208b77c06e49ba9a76b477f 91 | ffmpeg getFrame(66): md5 = d86b04f95208b77c06e49ba9a76b477f 92 | ffmpeg getFrame(67): md5 = cc52ca71fc8daae8feba52fa329f9f66 93 | ffmpeg getFrame(68): md5 = cc52ca71fc8daae8feba52fa329f9f66 94 | ffmpeg getFrame(69): md5 = cc52ca71fc8daae8feba52fa329f9f66 95 | ffmpeg getFrame(70): md5 = 3cac4625a645a147a7e7cb8ab28ebf07 96 | ffmpeg getFrame(71): md5 = 3cac4625a645a147a7e7cb8ab28ebf07 97 | ffmpeg getFrame(72): md5 = 3cac4625a645a147a7e7cb8ab28ebf07 98 | ffmpeg getFrame(73): md5 = f8eb6d231d353e8d98cf76f1fcf960c3 99 | ffmpeg getFrame(74): md5 = f8eb6d231d353e8d98cf76f1fcf960c3 100 | ffmpeg getFrame(75): md5 = f8eb6d231d353e8d98cf76f1fcf960c3 101 | ffmpeg getFrame(76): md5 = 25ea525ec2630b123da3bd18b44e391b 102 | ffmpeg getFrame(77): md5 = 25ea525ec2630b123da3bd18b44e391b 103 | ffmpeg getFrame(78): md5 = 25ea525ec2630b123da3bd18b44e391b 104 | ffmpeg getFrame(79): md5 = 97ea17ae200e6ca4e2412ba5546d4cdb 105 | ffmpeg getFrame(80): md5 = 97ea17ae200e6ca4e2412ba5546d4cdb 106 | ffmpeg getFrame(81): md5 = 97ea17ae200e6ca4e2412ba5546d4cdb 107 | ffmpeg getFrame(82): md5 = d0bc5176b565500f09851abf059bf736 108 | ffmpeg getFrame(83): md5 = d0bc5176b565500f09851abf059bf736 109 | ffmpeg getFrame(84): md5 = d0bc5176b565500f09851abf059bf736 110 | ffmpeg getFrame(85): md5 = a73c78e3ae667682e9920a218353540b 111 | ffmpeg getFrame(86): md5 = a73c78e3ae667682e9920a218353540b 112 | ffmpeg getFrame(87): md5 = a73c78e3ae667682e9920a218353540b 113 | ffmpeg getFrame(88): md5 = 02172b5823992d273f7d4295f628309a 114 | ffmpeg getFrame(89): md5 = 02172b5823992d273f7d4295f628309a 115 | ffmpeg getFrame(90): md5 = 02172b5823992d273f7d4295f628309a 116 | ffmpeg getFrame(91): md5 = 5887bfa75094567d9aec180eda7e45c6 117 | ffmpeg getFrame(92): md5 = 5887bfa75094567d9aec180eda7e45c6 118 | ffmpeg getFrame(93): md5 = 5887bfa75094567d9aec180eda7e45c6 119 | ffmpeg getFrame(94): md5 = 3b93b082d52c4ccb8dc5beb22c8316ab 120 | ffmpeg getFrame(95): md5 = 3b93b082d52c4ccb8dc5beb22c8316ab 121 | ffmpeg getFrame(96): md5 = 3b93b082d52c4ccb8dc5beb22c8316ab 122 | ffmpeg getFrame(97): md5 = b6485f3287312414e90fc0508ce9b194 123 | ffmpeg getFrame(98): md5 = b6485f3287312414e90fc0508ce9b194 124 | ffmpeg getFrame(99): md5 = b6485f3287312414e90fc0508ce9b194 125 | ffmpeg getFrame(100): md5 = 57fe0edffdfcf06e88d7219662f04b05 126 | ffmpeg getFrame(101): md5 = 57fe0edffdfcf06e88d7219662f04b05 127 | ffmpeg getFrame(102): md5 = 57fe0edffdfcf06e88d7219662f04b05 128 | ffmpeg getFrame(103): md5 = 5e6ab28f31801cddb176f1c01d13f364 129 | ffmpeg getFrame(104): md5 = 5e6ab28f31801cddb176f1c01d13f364 130 | ffmpeg getFrame(105): md5 = 5e6ab28f31801cddb176f1c01d13f364 131 | ffmpeg getFrame(106): md5 = ab2142ee9ec11e01e42a072ad5762030 132 | ffmpeg getFrame(107): md5 = ab2142ee9ec11e01e42a072ad5762030 133 | ffmpeg getFrame(108): md5 = ab2142ee9ec11e01e42a072ad5762030 134 | ffmpeg getFrame(109): md5 = 84410c79c7cf32562a83fa8f4bb981f7 135 | ffmpeg getFrame(110): md5 = 84410c79c7cf32562a83fa8f4bb981f7 136 | ffmpeg getFrame(111): md5 = 84410c79c7cf32562a83fa8f4bb981f7 137 | ffmpeg getFrame(112): md5 = 5ea25236d676122a90799adefc529611 138 | ffmpeg getFrame(113): md5 = 5ea25236d676122a90799adefc529611 139 | ffmpeg getFrame(114): md5 = 5ea25236d676122a90799adefc529611 140 | ffmpeg getFrame(115): md5 = 0ac65e51db3d7b40f55df3a43f3f03d2 141 | ffmpeg getFrame(116): md5 = 0ac65e51db3d7b40f55df3a43f3f03d2 142 | ffmpeg getFrame(117): md5 = 0ac65e51db3d7b40f55df3a43f3f03d2 143 | ffmpeg getFrame(118): md5 = b0b6a709c28c75d9beffaaaba969ec12 144 | ffmpeg getFrame(119): md5 = b0b6a709c28c75d9beffaaaba969ec12 145 | ffmpeg getFrame(120): md5 = b0b6a709c28c75d9beffaaaba969ec12 146 | ffmpeg getFrame(121): md5 = 7c58a3bc631a7ec1dd48de99658a5cc4 147 | ffmpeg getFrame(122): md5 = 7c58a3bc631a7ec1dd48de99658a5cc4 148 | ffmpeg getFrame(123): md5 = 7c58a3bc631a7ec1dd48de99658a5cc4 149 | ffmpeg getFrame(124): md5 = a89b9a83054bf8737a97c080f07a59bd 150 | ffmpeg getFrame(125): md5 = a89b9a83054bf8737a97c080f07a59bd 151 | ffmpeg getFrame(126): md5 = a89b9a83054bf8737a97c080f07a59bd 152 | ffmpeg getFrame(127): md5 = 5d58afe8118077391b8523a065dd7fce 153 | ffmpeg getFrame(128): md5 = 5d58afe8118077391b8523a065dd7fce 154 | ffmpeg getFrame(129): md5 = 5d58afe8118077391b8523a065dd7fce 155 | ffmpeg getFrame(130): md5 = d7a36b7a67f4ca8941931a15517f5eb1 156 | ffmpeg getFrame(131): md5 = d7a36b7a67f4ca8941931a15517f5eb1 157 | ffmpeg getFrame(132): md5 = d7a36b7a67f4ca8941931a15517f5eb1 158 | ffmpeg getFrame(133): md5 = 3064adc7a54286b4c45f9fe3669e8b1d 159 | ffmpeg getFrame(134): md5 = 3064adc7a54286b4c45f9fe3669e8b1d 160 | ffmpeg getFrame(135): md5 = 3064adc7a54286b4c45f9fe3669e8b1d 161 | ffmpeg getFrame(136): md5 = 49feb765089580d9f3de8a6e36cbaed7 162 | ffmpeg getFrame(137): md5 = 49feb765089580d9f3de8a6e36cbaed7 163 | ffmpeg getFrame(138): md5 = 49feb765089580d9f3de8a6e36cbaed7 164 | ffmpeg getFrame(139): md5 = 3f4495bb347480746f2fb994465b25a9 165 | ffmpeg getFrame(140): md5 = 3f4495bb347480746f2fb994465b25a9 166 | ffmpeg getFrame(141): md5 = 3f4495bb347480746f2fb994465b25a9 167 | ffmpeg getFrame(142): md5 = 53343b23bb1a4aeb1f667608265fad9a 168 | ffmpeg getFrame(143): md5 = 53343b23bb1a4aeb1f667608265fad9a 169 | ffmpeg getFrame(144): md5 = 53343b23bb1a4aeb1f667608265fad9a 170 | ffmpeg getFrame(145): md5 = b84c2d59f936f7cae83e736dc2dd0ebc 171 | ffmpeg getFrame(146): md5 = b84c2d59f936f7cae83e736dc2dd0ebc 172 | ffmpeg getFrame(147): md5 = b84c2d59f936f7cae83e736dc2dd0ebc 173 | ffmpeg getFrame(148): md5 = abe4ae47b43678b60c192fbb4d0a69b5 174 | ffmpeg getFrame(149): md5 = abe4ae47b43678b60c192fbb4d0a69b5 175 | ffmpeg getFrame(150): md5 = abe4ae47b43678b60c192fbb4d0a69b5 176 | ffmpeg getFrame(151): md5 = 117c46c3a208183085c41eccf223c7e6 177 | ffmpeg getFrame(152): md5 = 117c46c3a208183085c41eccf223c7e6 178 | ffmpeg getFrame(153): md5 = 117c46c3a208183085c41eccf223c7e6 179 | ffmpeg getFrame(154): md5 = d587fae1b39f3a2ffae867f9652e1ed7 180 | ffmpeg getFrame(155): md5 = d587fae1b39f3a2ffae867f9652e1ed7 181 | ffmpeg getFrame(156): md5 = d587fae1b39f3a2ffae867f9652e1ed7 182 | ffmpeg getFrame(157): md5 = db17bcfe68abe673bf3df8b8062714ab 183 | ffmpeg getFrame(158): md5 = db17bcfe68abe673bf3df8b8062714ab 184 | ffmpeg getFrame(159): md5 = db17bcfe68abe673bf3df8b8062714ab 185 | ffmpeg getFrame(160): md5 = 316351119812a64ff994bbad9332286e 186 | ffmpeg getFrame(161): md5 = 316351119812a64ff994bbad9332286e 187 | ffmpeg getFrame(162): md5 = 316351119812a64ff994bbad9332286e 188 | ffmpeg getFrame(163): md5 = f4af5e8779fa40f07b0285a4dc1b049d 189 | ffmpeg getFrame(164): md5 = f4af5e8779fa40f07b0285a4dc1b049d 190 | ffmpeg getFrame(165): md5 = f4af5e8779fa40f07b0285a4dc1b049d 191 | ffmpeg getFrame(166): md5 = 274f9691f9d2360d53f299c1fba79614 192 | ffmpeg getFrame(167): md5 = 274f9691f9d2360d53f299c1fba79614 193 | ffmpeg getFrame(168): md5 = 274f9691f9d2360d53f299c1fba79614 194 | ffmpeg getFrame(169): md5 = 4973cb1e537815ee8b7ef73e759f5c39 195 | ffmpeg getFrame(170): md5 = 4973cb1e537815ee8b7ef73e759f5c39 196 | ffmpeg getFrame(171): md5 = 4973cb1e537815ee8b7ef73e759f5c39 197 | ffmpeg getFrame(172): md5 = 8629707f6d5c1a205564ac5f6f10d89f 198 | ffmpeg getFrame(173): md5 = 8629707f6d5c1a205564ac5f6f10d89f 199 | ffmpeg getFrame(174): md5 = 8629707f6d5c1a205564ac5f6f10d89f 200 | ffmpeg getFrame(175): md5 = f72576077cd616c026c7f56829f220ae 201 | ffmpeg getFrame(176): md5 = f72576077cd616c026c7f56829f220ae 202 | ffmpeg getFrame(177): md5 = f72576077cd616c026c7f56829f220ae 203 | ffmpeg getFrame(178): md5 = 017aaef2fe10b6aa2788d7ea0620c252 204 | ffmpeg getFrame(179): md5 = 017aaef2fe10b6aa2788d7ea0620c252 205 | ffmpeg getFrame(180): md5 = 017aaef2fe10b6aa2788d7ea0620c252 206 | ffmpeg getFrame(181): md5 = a5b5bfe8b20e018ef506d703b2af7ccc 207 | ffmpeg getFrame(182): md5 = a5b5bfe8b20e018ef506d703b2af7ccc 208 | ffmpeg getFrame(183): md5 = a5b5bfe8b20e018ef506d703b2af7ccc 209 | ffmpeg getFrame(184): md5 = cc781178ac22f4cf6641183926067215 210 | ffmpeg getFrame(185): md5 = cc781178ac22f4cf6641183926067215 211 | ffmpeg getFrame(186): md5 = cc781178ac22f4cf6641183926067215 212 | ffmpeg getFrame(187): md5 = b0338a88dff4cbabb1599a807e5c6ef0 213 | ffmpeg getFrame(188): md5 = b0338a88dff4cbabb1599a807e5c6ef0 214 | ffmpeg getFrame(189): md5 = b0338a88dff4cbabb1599a807e5c6ef0 215 | ffmpeg getFrame(190): md5 = d1ee4ba4a11217efd0cf8cba15a2eb1f 216 | ffmpeg getFrame(191): md5 = d1ee4ba4a11217efd0cf8cba15a2eb1f 217 | ffmpeg getFrame(192): md5 = d1ee4ba4a11217efd0cf8cba15a2eb1f 218 | ffmpeg getFrame(193): md5 = 0d2849f432fc9656c31629f6288feba0 219 | ffmpeg getFrame(194): md5 = 0d2849f432fc9656c31629f6288feba0 220 | ffmpeg getFrame(195): md5 = 0d2849f432fc9656c31629f6288feba0 221 | ffmpeg getFrame(196): md5 = c26f6d4cf0737c5c6b102c048312f0fc 222 | ffmpeg getFrame(197): md5 = c26f6d4cf0737c5c6b102c048312f0fc 223 | ffmpeg getFrame(198): md5 = c26f6d4cf0737c5c6b102c048312f0fc 224 | ffmpeg getFrame(199): md5 = 23d6d68503ec607327ee6216bc695593 225 | ffmpeg getFrame(200): md5 = 23d6d68503ec607327ee6216bc695593 226 | ffmpeg getFrame(201): md5 = 23d6d68503ec607327ee6216bc695593 227 | ffmpeg getFrame(202): md5 = 85c3d4dbcd9315b00e220d334a012083 228 | ffmpeg getFrame(203): md5 = 85c3d4dbcd9315b00e220d334a012083 229 | ffmpeg getFrame(204): md5 = 85c3d4dbcd9315b00e220d334a012083 230 | ffmpeg getFrame(205): md5 = 08d8b9d438667d710cacc0d9081a4883 231 | ffmpeg getFrame(206): md5 = 08d8b9d438667d710cacc0d9081a4883 232 | ffmpeg getFrame(207): md5 = 08d8b9d438667d710cacc0d9081a4883 233 | ffmpeg getFrame(208): md5 = d3ce913a9c16206990a6b9a80c0561f3 234 | ffmpeg getFrame(209): md5 = d3ce913a9c16206990a6b9a80c0561f3 235 | ffmpeg getFrame(210): md5 = d3ce913a9c16206990a6b9a80c0561f3 236 | ffmpeg getFrame(211): md5 = 64bcd46af5519ad65722bc94e71a5628 237 | ffmpeg getFrame(212): md5 = 64bcd46af5519ad65722bc94e71a5628 238 | ffmpeg getFrame(213): md5 = 64bcd46af5519ad65722bc94e71a5628 239 | ffmpeg getFrame(214): md5 = 55a1b21fb233ec1b965aa27fc5680ef7 240 | ffmpeg getFrame(215): md5 = 55a1b21fb233ec1b965aa27fc5680ef7 241 | ffmpeg getFrame(216): md5 = 55a1b21fb233ec1b965aa27fc5680ef7 242 | ffmpeg getFrame(217): md5 = cbf35af572f3947b04b391dbe8f01912 243 | ffmpeg getFrame(218): md5 = cbf35af572f3947b04b391dbe8f01912 244 | ffmpeg getFrame(219): md5 = cbf35af572f3947b04b391dbe8f01912 245 | ffmpeg getFrame(220): md5 = b68f724605514e4ae7676c04fff62461 246 | ffmpeg getFrame(221): md5 = b68f724605514e4ae7676c04fff62461 247 | ffmpeg getFrame(222): md5 = b68f724605514e4ae7676c04fff62461 248 | ffmpeg getFrame(223): md5 = e2d66cb30e1d942da4b603ecae95c64e 249 | ffmpeg getFrame(224): md5 = e2d66cb30e1d942da4b603ecae95c64e 250 | ffmpeg getFrame(225): md5 = e2d66cb30e1d942da4b603ecae95c64e 251 | ffmpeg getFrame(226): md5 = 70c86d74b825b685d3e90c2dfa21f307 252 | ffmpeg getFrame(227): md5 = 70c86d74b825b685d3e90c2dfa21f307 253 | ffmpeg getFrame(228): md5 = 70c86d74b825b685d3e90c2dfa21f307 254 | ffmpeg getFrame(229): md5 = 52e93862544f05c92375d2aaa2c7dc16 255 | ffmpeg getFrame(230): md5 = 52e93862544f05c92375d2aaa2c7dc16 256 | ffmpeg getFrame(231): md5 = 52e93862544f05c92375d2aaa2c7dc16 257 | ffmpeg getFrame(232): md5 = da9910064c0414e256056b769f942049 258 | ffmpeg getFrame(233): md5 = da9910064c0414e256056b769f942049 259 | ffmpeg getFrame(234): md5 = da9910064c0414e256056b769f942049 260 | ffmpeg getFrame(235): md5 = 2817e435640fc7c26685401007ad6177 261 | ffmpeg getFrame(236): md5 = 2817e435640fc7c26685401007ad6177 262 | ffmpeg getFrame(237): md5 = 2817e435640fc7c26685401007ad6177 263 | ffmpeg getFrame(238): md5 = 5da7388e5b099cfb030b36cefcb260aa 264 | ffmpeg getFrame(239): md5 = 5da7388e5b099cfb030b36cefcb260aa 265 | ffmpeg getFrame(240): md5 = 5da7388e5b099cfb030b36cefcb260aa 266 | ffmpeg getFrame(241): md5 = e3a3ea606c5ccdc530c7c6b2a2a5aa71 267 | ffmpeg getFrame(242): md5 = e3a3ea606c5ccdc530c7c6b2a2a5aa71 -------------------------------------------------------------------------------- /tests/getID3Info.phpt: -------------------------------------------------------------------------------- 1 | --TEST-- 2 | ffmpeg getID3Info() test 3 | --SKIPIF-- 4 | 5 | --FILE-- 6 | getTitle()); 9 | printf("ffmpeg getArtist(): %s\n", $mov->getArtist()); 10 | printf("ffmpeg getAlbum(): %s\n", $mov->getAlbum()); 11 | printf("ffmpeg getGenre(): %s\n", $mov->getGenre()); 12 | printf("ffmpeg getTrackNumber(): %s\n", $mov->getTrackNumber()); 13 | printf("ffmpeg getYear(): %s\n", $mov->getYear()); 14 | 15 | ?> 16 | --EXPECT-- 17 | ffmpeg getTitle(): Test mp3 18 | ffmpeg getArtist(): Alexander Thomas 19 | ffmpeg getAlbum(): MP3 test files (http://www.dr-lex.be/software/testsounds.html#Tones) 20 | ffmpeg getGenre(): Sound Clip 21 | ffmpeg getTrackNumber(): 3 22 | ffmpeg getYear(): 2008 23 | -------------------------------------------------------------------------------- /tests/getNextKeyFrame.phpt: -------------------------------------------------------------------------------- 1 | --TEST-- 2 | ffmpeg get key frames test 3 | --SKIPIF-- 4 | 9 | --FILE-- 10 | getNextKeyFrame()) != false) { 15 | $i = $mov->getFrameNumber(); 16 | $filename = $img . $i . '.png'; 17 | $gd_image = $frame->toGDImage(); 18 | imagepng($gd_image, $filename); 19 | printf("ffmpeg getFrame($i): md5 = %s\n", md5(file_get_contents($filename))); 20 | imagedestroy($gd_image); 21 | unlink($filename); 22 | } 23 | ?> 24 | --EXPECT-- 25 | ffmpeg getFrame(1): md5 = 054ca5377a0592ea15497bcfefa59181 26 | ffmpeg getFrame(2): md5 = 054ca5377a0592ea15497bcfefa59181 27 | ffmpeg getFrame(3): md5 = 054ca5377a0592ea15497bcfefa59181 28 | ffmpeg getFrame(4): md5 = bc3e96ad73e019583d449b6d2d857858 29 | ffmpeg getFrame(5): md5 = bc3e96ad73e019583d449b6d2d857858 30 | ffmpeg getFrame(6): md5 = bc3e96ad73e019583d449b6d2d857858 31 | ffmpeg getFrame(7): md5 = 0a7a900dc376afc5598d5b2ae50be442 32 | ffmpeg getFrame(8): md5 = 0a7a900dc376afc5598d5b2ae50be442 33 | ffmpeg getFrame(9): md5 = 0a7a900dc376afc5598d5b2ae50be442 34 | ffmpeg getFrame(10): md5 = 8de055e9eb38073ab35f75cfe4adae83 35 | ffmpeg getFrame(11): md5 = 8de055e9eb38073ab35f75cfe4adae83 36 | ffmpeg getFrame(12): md5 = 8de055e9eb38073ab35f75cfe4adae83 37 | ffmpeg getFrame(13): md5 = 73327939f7fc8b6080525dc259bdd136 38 | ffmpeg getFrame(14): md5 = 73327939f7fc8b6080525dc259bdd136 39 | ffmpeg getFrame(15): md5 = 73327939f7fc8b6080525dc259bdd136 40 | ffmpeg getFrame(16): md5 = 25fce65aaebf63d787415133ee525e0b 41 | ffmpeg getFrame(17): md5 = 25fce65aaebf63d787415133ee525e0b 42 | ffmpeg getFrame(18): md5 = 25fce65aaebf63d787415133ee525e0b 43 | ffmpeg getFrame(19): md5 = dbcd63a3fe7bc6e5ae746134462a582d 44 | ffmpeg getFrame(20): md5 = dbcd63a3fe7bc6e5ae746134462a582d 45 | ffmpeg getFrame(21): md5 = dbcd63a3fe7bc6e5ae746134462a582d 46 | ffmpeg getFrame(22): md5 = 5af7473006c39343accad86b6f9cf6ed 47 | ffmpeg getFrame(23): md5 = 5af7473006c39343accad86b6f9cf6ed 48 | ffmpeg getFrame(24): md5 = 5af7473006c39343accad86b6f9cf6ed 49 | ffmpeg getFrame(25): md5 = 405cc6f1453352460cf01875aa23ccff 50 | ffmpeg getFrame(26): md5 = 405cc6f1453352460cf01875aa23ccff 51 | ffmpeg getFrame(27): md5 = 405cc6f1453352460cf01875aa23ccff 52 | ffmpeg getFrame(28): md5 = cbdbcebeea6ea45f6965a83543b6c44b 53 | ffmpeg getFrame(29): md5 = cbdbcebeea6ea45f6965a83543b6c44b 54 | ffmpeg getFrame(30): md5 = cbdbcebeea6ea45f6965a83543b6c44b 55 | ffmpeg getFrame(31): md5 = 9620a937f1a19c3d5e95716fae1eb47f 56 | ffmpeg getFrame(32): md5 = 9620a937f1a19c3d5e95716fae1eb47f 57 | ffmpeg getFrame(33): md5 = 9620a937f1a19c3d5e95716fae1eb47f 58 | ffmpeg getFrame(34): md5 = 689ad71143a347f53417356eabb0037f 59 | ffmpeg getFrame(35): md5 = 689ad71143a347f53417356eabb0037f 60 | ffmpeg getFrame(36): md5 = 689ad71143a347f53417356eabb0037f 61 | ffmpeg getFrame(37): md5 = 4f9a4e239c4b9459a59b038b0be3d5df 62 | ffmpeg getFrame(38): md5 = 4f9a4e239c4b9459a59b038b0be3d5df 63 | ffmpeg getFrame(39): md5 = 4f9a4e239c4b9459a59b038b0be3d5df 64 | ffmpeg getFrame(40): md5 = 579618d56fe46acdb9bcfcff67808ae4 65 | ffmpeg getFrame(41): md5 = 579618d56fe46acdb9bcfcff67808ae4 66 | ffmpeg getFrame(42): md5 = 579618d56fe46acdb9bcfcff67808ae4 67 | ffmpeg getFrame(43): md5 = 9f77876e4926b92d5f7dc565ac94e366 68 | ffmpeg getFrame(44): md5 = 9f77876e4926b92d5f7dc565ac94e366 69 | ffmpeg getFrame(45): md5 = 9f77876e4926b92d5f7dc565ac94e366 70 | ffmpeg getFrame(46): md5 = faa5ef30ddeb97020250c150779e3399 71 | ffmpeg getFrame(47): md5 = faa5ef30ddeb97020250c150779e3399 72 | ffmpeg getFrame(48): md5 = faa5ef30ddeb97020250c150779e3399 73 | ffmpeg getFrame(49): md5 = c61c4e4620af5adba309237a84ef91df 74 | ffmpeg getFrame(50): md5 = c61c4e4620af5adba309237a84ef91df 75 | ffmpeg getFrame(51): md5 = c61c4e4620af5adba309237a84ef91df 76 | ffmpeg getFrame(52): md5 = 3953dcbdeb9b687b2b1e925183a16c39 77 | ffmpeg getFrame(53): md5 = 3953dcbdeb9b687b2b1e925183a16c39 78 | ffmpeg getFrame(54): md5 = 3953dcbdeb9b687b2b1e925183a16c39 79 | ffmpeg getFrame(55): md5 = c360fd94742147db7e97796a61eee19f 80 | ffmpeg getFrame(56): md5 = c360fd94742147db7e97796a61eee19f 81 | ffmpeg getFrame(57): md5 = c360fd94742147db7e97796a61eee19f 82 | ffmpeg getFrame(58): md5 = 7b1f32d4e4a1efce454c0b73ec015e75 83 | ffmpeg getFrame(59): md5 = 7b1f32d4e4a1efce454c0b73ec015e75 84 | ffmpeg getFrame(60): md5 = 7b1f32d4e4a1efce454c0b73ec015e75 85 | ffmpeg getFrame(61): md5 = 963b85dafe7ac84daf64a12931509de7 86 | ffmpeg getFrame(62): md5 = 963b85dafe7ac84daf64a12931509de7 87 | ffmpeg getFrame(63): md5 = 963b85dafe7ac84daf64a12931509de7 88 | ffmpeg getFrame(64): md5 = d86b04f95208b77c06e49ba9a76b477f 89 | ffmpeg getFrame(65): md5 = d86b04f95208b77c06e49ba9a76b477f 90 | ffmpeg getFrame(66): md5 = d86b04f95208b77c06e49ba9a76b477f 91 | ffmpeg getFrame(67): md5 = cc52ca71fc8daae8feba52fa329f9f66 92 | ffmpeg getFrame(68): md5 = cc52ca71fc8daae8feba52fa329f9f66 93 | ffmpeg getFrame(69): md5 = cc52ca71fc8daae8feba52fa329f9f66 94 | ffmpeg getFrame(70): md5 = 3cac4625a645a147a7e7cb8ab28ebf07 95 | ffmpeg getFrame(71): md5 = 3cac4625a645a147a7e7cb8ab28ebf07 96 | ffmpeg getFrame(72): md5 = 3cac4625a645a147a7e7cb8ab28ebf07 97 | ffmpeg getFrame(73): md5 = f8eb6d231d353e8d98cf76f1fcf960c3 98 | ffmpeg getFrame(74): md5 = f8eb6d231d353e8d98cf76f1fcf960c3 99 | ffmpeg getFrame(75): md5 = f8eb6d231d353e8d98cf76f1fcf960c3 100 | ffmpeg getFrame(76): md5 = 25ea525ec2630b123da3bd18b44e391b 101 | ffmpeg getFrame(77): md5 = 25ea525ec2630b123da3bd18b44e391b 102 | ffmpeg getFrame(78): md5 = 25ea525ec2630b123da3bd18b44e391b 103 | ffmpeg getFrame(79): md5 = 97ea17ae200e6ca4e2412ba5546d4cdb 104 | ffmpeg getFrame(80): md5 = 97ea17ae200e6ca4e2412ba5546d4cdb 105 | ffmpeg getFrame(81): md5 = 97ea17ae200e6ca4e2412ba5546d4cdb 106 | ffmpeg getFrame(82): md5 = d0bc5176b565500f09851abf059bf736 107 | ffmpeg getFrame(83): md5 = d0bc5176b565500f09851abf059bf736 108 | ffmpeg getFrame(84): md5 = d0bc5176b565500f09851abf059bf736 109 | ffmpeg getFrame(85): md5 = a73c78e3ae667682e9920a218353540b 110 | ffmpeg getFrame(86): md5 = a73c78e3ae667682e9920a218353540b 111 | ffmpeg getFrame(87): md5 = a73c78e3ae667682e9920a218353540b 112 | ffmpeg getFrame(88): md5 = 02172b5823992d273f7d4295f628309a 113 | ffmpeg getFrame(89): md5 = 02172b5823992d273f7d4295f628309a 114 | ffmpeg getFrame(90): md5 = 02172b5823992d273f7d4295f628309a 115 | ffmpeg getFrame(91): md5 = 5887bfa75094567d9aec180eda7e45c6 116 | ffmpeg getFrame(92): md5 = 5887bfa75094567d9aec180eda7e45c6 117 | ffmpeg getFrame(93): md5 = 5887bfa75094567d9aec180eda7e45c6 118 | ffmpeg getFrame(94): md5 = 3b93b082d52c4ccb8dc5beb22c8316ab 119 | ffmpeg getFrame(95): md5 = 3b93b082d52c4ccb8dc5beb22c8316ab 120 | ffmpeg getFrame(96): md5 = 3b93b082d52c4ccb8dc5beb22c8316ab 121 | ffmpeg getFrame(97): md5 = b6485f3287312414e90fc0508ce9b194 122 | ffmpeg getFrame(98): md5 = b6485f3287312414e90fc0508ce9b194 123 | ffmpeg getFrame(99): md5 = b6485f3287312414e90fc0508ce9b194 124 | ffmpeg getFrame(100): md5 = 57fe0edffdfcf06e88d7219662f04b05 125 | ffmpeg getFrame(101): md5 = 57fe0edffdfcf06e88d7219662f04b05 126 | ffmpeg getFrame(102): md5 = 57fe0edffdfcf06e88d7219662f04b05 127 | ffmpeg getFrame(103): md5 = 5e6ab28f31801cddb176f1c01d13f364 128 | ffmpeg getFrame(104): md5 = 5e6ab28f31801cddb176f1c01d13f364 129 | ffmpeg getFrame(105): md5 = 5e6ab28f31801cddb176f1c01d13f364 130 | ffmpeg getFrame(106): md5 = ab2142ee9ec11e01e42a072ad5762030 131 | ffmpeg getFrame(107): md5 = ab2142ee9ec11e01e42a072ad5762030 132 | ffmpeg getFrame(108): md5 = ab2142ee9ec11e01e42a072ad5762030 133 | ffmpeg getFrame(109): md5 = 84410c79c7cf32562a83fa8f4bb981f7 134 | ffmpeg getFrame(110): md5 = 84410c79c7cf32562a83fa8f4bb981f7 135 | ffmpeg getFrame(111): md5 = 84410c79c7cf32562a83fa8f4bb981f7 136 | ffmpeg getFrame(112): md5 = 5ea25236d676122a90799adefc529611 137 | ffmpeg getFrame(113): md5 = 5ea25236d676122a90799adefc529611 138 | ffmpeg getFrame(114): md5 = 5ea25236d676122a90799adefc529611 139 | ffmpeg getFrame(115): md5 = 0ac65e51db3d7b40f55df3a43f3f03d2 140 | ffmpeg getFrame(116): md5 = 0ac65e51db3d7b40f55df3a43f3f03d2 141 | ffmpeg getFrame(117): md5 = 0ac65e51db3d7b40f55df3a43f3f03d2 142 | ffmpeg getFrame(118): md5 = b0b6a709c28c75d9beffaaaba969ec12 143 | ffmpeg getFrame(119): md5 = b0b6a709c28c75d9beffaaaba969ec12 144 | ffmpeg getFrame(120): md5 = b0b6a709c28c75d9beffaaaba969ec12 145 | ffmpeg getFrame(121): md5 = 7c58a3bc631a7ec1dd48de99658a5cc4 146 | ffmpeg getFrame(122): md5 = 7c58a3bc631a7ec1dd48de99658a5cc4 147 | ffmpeg getFrame(123): md5 = 7c58a3bc631a7ec1dd48de99658a5cc4 148 | ffmpeg getFrame(124): md5 = a89b9a83054bf8737a97c080f07a59bd 149 | ffmpeg getFrame(125): md5 = a89b9a83054bf8737a97c080f07a59bd 150 | ffmpeg getFrame(126): md5 = a89b9a83054bf8737a97c080f07a59bd 151 | ffmpeg getFrame(127): md5 = 5d58afe8118077391b8523a065dd7fce 152 | ffmpeg getFrame(128): md5 = 5d58afe8118077391b8523a065dd7fce 153 | ffmpeg getFrame(129): md5 = 5d58afe8118077391b8523a065dd7fce 154 | ffmpeg getFrame(130): md5 = d7a36b7a67f4ca8941931a15517f5eb1 155 | ffmpeg getFrame(131): md5 = d7a36b7a67f4ca8941931a15517f5eb1 156 | ffmpeg getFrame(132): md5 = d7a36b7a67f4ca8941931a15517f5eb1 157 | ffmpeg getFrame(133): md5 = 3064adc7a54286b4c45f9fe3669e8b1d 158 | ffmpeg getFrame(134): md5 = 3064adc7a54286b4c45f9fe3669e8b1d 159 | ffmpeg getFrame(135): md5 = 3064adc7a54286b4c45f9fe3669e8b1d 160 | ffmpeg getFrame(136): md5 = 49feb765089580d9f3de8a6e36cbaed7 161 | ffmpeg getFrame(137): md5 = 49feb765089580d9f3de8a6e36cbaed7 162 | ffmpeg getFrame(138): md5 = 49feb765089580d9f3de8a6e36cbaed7 163 | ffmpeg getFrame(139): md5 = 3f4495bb347480746f2fb994465b25a9 164 | ffmpeg getFrame(140): md5 = 3f4495bb347480746f2fb994465b25a9 165 | ffmpeg getFrame(141): md5 = 3f4495bb347480746f2fb994465b25a9 166 | ffmpeg getFrame(142): md5 = 53343b23bb1a4aeb1f667608265fad9a 167 | ffmpeg getFrame(143): md5 = 53343b23bb1a4aeb1f667608265fad9a 168 | ffmpeg getFrame(144): md5 = 53343b23bb1a4aeb1f667608265fad9a 169 | ffmpeg getFrame(145): md5 = b84c2d59f936f7cae83e736dc2dd0ebc 170 | ffmpeg getFrame(146): md5 = b84c2d59f936f7cae83e736dc2dd0ebc 171 | ffmpeg getFrame(147): md5 = b84c2d59f936f7cae83e736dc2dd0ebc 172 | ffmpeg getFrame(148): md5 = abe4ae47b43678b60c192fbb4d0a69b5 173 | ffmpeg getFrame(149): md5 = abe4ae47b43678b60c192fbb4d0a69b5 174 | ffmpeg getFrame(150): md5 = abe4ae47b43678b60c192fbb4d0a69b5 175 | ffmpeg getFrame(151): md5 = 117c46c3a208183085c41eccf223c7e6 176 | ffmpeg getFrame(152): md5 = 117c46c3a208183085c41eccf223c7e6 177 | ffmpeg getFrame(153): md5 = 117c46c3a208183085c41eccf223c7e6 178 | ffmpeg getFrame(154): md5 = d587fae1b39f3a2ffae867f9652e1ed7 179 | ffmpeg getFrame(155): md5 = d587fae1b39f3a2ffae867f9652e1ed7 180 | ffmpeg getFrame(156): md5 = d587fae1b39f3a2ffae867f9652e1ed7 181 | ffmpeg getFrame(157): md5 = db17bcfe68abe673bf3df8b8062714ab 182 | ffmpeg getFrame(158): md5 = db17bcfe68abe673bf3df8b8062714ab 183 | ffmpeg getFrame(159): md5 = db17bcfe68abe673bf3df8b8062714ab 184 | ffmpeg getFrame(160): md5 = 316351119812a64ff994bbad9332286e 185 | ffmpeg getFrame(161): md5 = 316351119812a64ff994bbad9332286e 186 | ffmpeg getFrame(162): md5 = 316351119812a64ff994bbad9332286e 187 | ffmpeg getFrame(163): md5 = f4af5e8779fa40f07b0285a4dc1b049d 188 | ffmpeg getFrame(164): md5 = f4af5e8779fa40f07b0285a4dc1b049d 189 | ffmpeg getFrame(165): md5 = f4af5e8779fa40f07b0285a4dc1b049d 190 | ffmpeg getFrame(166): md5 = 274f9691f9d2360d53f299c1fba79614 191 | ffmpeg getFrame(167): md5 = 274f9691f9d2360d53f299c1fba79614 192 | ffmpeg getFrame(168): md5 = 274f9691f9d2360d53f299c1fba79614 193 | ffmpeg getFrame(169): md5 = 4973cb1e537815ee8b7ef73e759f5c39 194 | ffmpeg getFrame(170): md5 = 4973cb1e537815ee8b7ef73e759f5c39 195 | ffmpeg getFrame(171): md5 = 4973cb1e537815ee8b7ef73e759f5c39 196 | ffmpeg getFrame(172): md5 = 8629707f6d5c1a205564ac5f6f10d89f 197 | ffmpeg getFrame(173): md5 = 8629707f6d5c1a205564ac5f6f10d89f 198 | ffmpeg getFrame(174): md5 = 8629707f6d5c1a205564ac5f6f10d89f 199 | ffmpeg getFrame(175): md5 = f72576077cd616c026c7f56829f220ae 200 | ffmpeg getFrame(176): md5 = f72576077cd616c026c7f56829f220ae 201 | ffmpeg getFrame(177): md5 = f72576077cd616c026c7f56829f220ae 202 | ffmpeg getFrame(178): md5 = 017aaef2fe10b6aa2788d7ea0620c252 203 | ffmpeg getFrame(179): md5 = 017aaef2fe10b6aa2788d7ea0620c252 204 | ffmpeg getFrame(180): md5 = 017aaef2fe10b6aa2788d7ea0620c252 205 | ffmpeg getFrame(181): md5 = a5b5bfe8b20e018ef506d703b2af7ccc 206 | ffmpeg getFrame(182): md5 = a5b5bfe8b20e018ef506d703b2af7ccc 207 | ffmpeg getFrame(183): md5 = a5b5bfe8b20e018ef506d703b2af7ccc 208 | ffmpeg getFrame(184): md5 = cc781178ac22f4cf6641183926067215 209 | ffmpeg getFrame(185): md5 = cc781178ac22f4cf6641183926067215 210 | ffmpeg getFrame(186): md5 = cc781178ac22f4cf6641183926067215 211 | ffmpeg getFrame(187): md5 = b0338a88dff4cbabb1599a807e5c6ef0 212 | ffmpeg getFrame(188): md5 = b0338a88dff4cbabb1599a807e5c6ef0 213 | ffmpeg getFrame(189): md5 = b0338a88dff4cbabb1599a807e5c6ef0 214 | ffmpeg getFrame(190): md5 = d1ee4ba4a11217efd0cf8cba15a2eb1f 215 | ffmpeg getFrame(191): md5 = d1ee4ba4a11217efd0cf8cba15a2eb1f 216 | ffmpeg getFrame(192): md5 = d1ee4ba4a11217efd0cf8cba15a2eb1f 217 | ffmpeg getFrame(193): md5 = 0d2849f432fc9656c31629f6288feba0 218 | ffmpeg getFrame(194): md5 = 0d2849f432fc9656c31629f6288feba0 219 | ffmpeg getFrame(195): md5 = 0d2849f432fc9656c31629f6288feba0 220 | ffmpeg getFrame(196): md5 = c26f6d4cf0737c5c6b102c048312f0fc 221 | ffmpeg getFrame(197): md5 = c26f6d4cf0737c5c6b102c048312f0fc 222 | ffmpeg getFrame(198): md5 = c26f6d4cf0737c5c6b102c048312f0fc 223 | ffmpeg getFrame(199): md5 = 23d6d68503ec607327ee6216bc695593 224 | ffmpeg getFrame(200): md5 = 23d6d68503ec607327ee6216bc695593 225 | ffmpeg getFrame(201): md5 = 23d6d68503ec607327ee6216bc695593 226 | ffmpeg getFrame(202): md5 = 85c3d4dbcd9315b00e220d334a012083 227 | ffmpeg getFrame(203): md5 = 85c3d4dbcd9315b00e220d334a012083 228 | ffmpeg getFrame(204): md5 = 85c3d4dbcd9315b00e220d334a012083 229 | ffmpeg getFrame(205): md5 = 08d8b9d438667d710cacc0d9081a4883 230 | ffmpeg getFrame(206): md5 = 08d8b9d438667d710cacc0d9081a4883 231 | ffmpeg getFrame(207): md5 = 08d8b9d438667d710cacc0d9081a4883 232 | ffmpeg getFrame(208): md5 = d3ce913a9c16206990a6b9a80c0561f3 233 | ffmpeg getFrame(209): md5 = d3ce913a9c16206990a6b9a80c0561f3 234 | ffmpeg getFrame(210): md5 = d3ce913a9c16206990a6b9a80c0561f3 235 | ffmpeg getFrame(211): md5 = 64bcd46af5519ad65722bc94e71a5628 236 | ffmpeg getFrame(212): md5 = 64bcd46af5519ad65722bc94e71a5628 237 | ffmpeg getFrame(213): md5 = 64bcd46af5519ad65722bc94e71a5628 238 | ffmpeg getFrame(214): md5 = 55a1b21fb233ec1b965aa27fc5680ef7 239 | ffmpeg getFrame(215): md5 = 55a1b21fb233ec1b965aa27fc5680ef7 240 | ffmpeg getFrame(216): md5 = 55a1b21fb233ec1b965aa27fc5680ef7 241 | ffmpeg getFrame(217): md5 = cbf35af572f3947b04b391dbe8f01912 242 | ffmpeg getFrame(218): md5 = cbf35af572f3947b04b391dbe8f01912 243 | ffmpeg getFrame(219): md5 = cbf35af572f3947b04b391dbe8f01912 244 | ffmpeg getFrame(220): md5 = b68f724605514e4ae7676c04fff62461 245 | ffmpeg getFrame(221): md5 = b68f724605514e4ae7676c04fff62461 246 | ffmpeg getFrame(222): md5 = b68f724605514e4ae7676c04fff62461 247 | ffmpeg getFrame(223): md5 = e2d66cb30e1d942da4b603ecae95c64e 248 | ffmpeg getFrame(224): md5 = e2d66cb30e1d942da4b603ecae95c64e 249 | ffmpeg getFrame(225): md5 = e2d66cb30e1d942da4b603ecae95c64e 250 | ffmpeg getFrame(226): md5 = 70c86d74b825b685d3e90c2dfa21f307 251 | ffmpeg getFrame(227): md5 = 70c86d74b825b685d3e90c2dfa21f307 252 | ffmpeg getFrame(228): md5 = 70c86d74b825b685d3e90c2dfa21f307 253 | ffmpeg getFrame(229): md5 = 52e93862544f05c92375d2aaa2c7dc16 254 | ffmpeg getFrame(230): md5 = 52e93862544f05c92375d2aaa2c7dc16 255 | ffmpeg getFrame(231): md5 = 52e93862544f05c92375d2aaa2c7dc16 256 | ffmpeg getFrame(232): md5 = da9910064c0414e256056b769f942049 257 | ffmpeg getFrame(233): md5 = da9910064c0414e256056b769f942049 258 | ffmpeg getFrame(234): md5 = da9910064c0414e256056b769f942049 259 | ffmpeg getFrame(235): md5 = 2817e435640fc7c26685401007ad6177 260 | ffmpeg getFrame(236): md5 = 2817e435640fc7c26685401007ad6177 261 | ffmpeg getFrame(237): md5 = 2817e435640fc7c26685401007ad6177 262 | ffmpeg getFrame(238): md5 = 5da7388e5b099cfb030b36cefcb260aa 263 | ffmpeg getFrame(239): md5 = 5da7388e5b099cfb030b36cefcb260aa 264 | ffmpeg getFrame(240): md5 = 5da7388e5b099cfb030b36cefcb260aa 265 | ffmpeg getFrame(241): md5 = e3a3ea606c5ccdc530c7c6b2a2a5aa71 266 | ffmpeg getFrame(242): md5 = e3a3ea606c5ccdc530c7c6b2a2a5aa71 267 | -------------------------------------------------------------------------------- /tests/getPTS.phpt: -------------------------------------------------------------------------------- 1 | --TEST-- 2 | ffmpeg getPTS test (Fixme: This test is no good with robot.avi) 3 | --SKIPIF-- 4 | 10 | --FILE-- 11 | getFrameCount(); 15 | for($i = 1; $i <= $framecount; $i++) { 16 | $frame = $mov->getFrame($i); 17 | printf("ffmpeg getPresentationTimestamp($i): = %s\n", $frame->getPTS()); 18 | } 19 | ?> 20 | --EXPECT-- 21 | ffmpeg getPresentationTimestamp(1): = -9223372036850 22 | ffmpeg getPresentationTimestamp(2): = -9223372036850 23 | ffmpeg getPresentationTimestamp(3): = 0.0268 24 | ffmpeg getPresentationTimestamp(4): = -9223372036850 25 | ffmpeg getPresentationTimestamp(5): = -9223372036850 26 | ffmpeg getPresentationTimestamp(6): = 0.0376 27 | ffmpeg getPresentationTimestamp(7): = -9223372036850 28 | ffmpeg getPresentationTimestamp(8): = -9223372036850 29 | ffmpeg getPresentationTimestamp(9): = 0.0484 30 | ffmpeg getPresentationTimestamp(10): = -9223372036850 31 | ffmpeg getPresentationTimestamp(11): = -9223372036850 32 | ffmpeg getPresentationTimestamp(12): = 0.0592 33 | ffmpeg getPresentationTimestamp(13): = -9223372036850 34 | ffmpeg getPresentationTimestamp(14): = -9223372036850 35 | ffmpeg getPresentationTimestamp(15): = 0.07 36 | ffmpeg getPresentationTimestamp(16): = -9223372036850 37 | ffmpeg getPresentationTimestamp(17): = -9223372036850 38 | ffmpeg getPresentationTimestamp(18): = 0.0808 39 | ffmpeg getPresentationTimestamp(19): = -9223372036850 40 | ffmpeg getPresentationTimestamp(20): = -9223372036850 41 | ffmpeg getPresentationTimestamp(21): = 0.0916 42 | ffmpeg getPresentationTimestamp(22): = -9223372036850 43 | ffmpeg getPresentationTimestamp(23): = -9223372036850 44 | ffmpeg getPresentationTimestamp(24): = 0.1024 45 | ffmpeg getPresentationTimestamp(25): = -9223372036850 46 | ffmpeg getPresentationTimestamp(26): = -9223372036850 47 | ffmpeg getPresentationTimestamp(27): = 0.1132 48 | ffmpeg getPresentationTimestamp(28): = -9223372036850 49 | ffmpeg getPresentationTimestamp(29): = -9223372036850 50 | ffmpeg getPresentationTimestamp(30): = 0.124 51 | ffmpeg getPresentationTimestamp(31): = -9223372036850 52 | ffmpeg getPresentationTimestamp(32): = -9223372036850 53 | ffmpeg getPresentationTimestamp(33): = 0.1348 54 | ffmpeg getPresentationTimestamp(34): = -9223372036850 55 | ffmpeg getPresentationTimestamp(35): = -9223372036850 56 | ffmpeg getPresentationTimestamp(36): = 0.1456 57 | ffmpeg getPresentationTimestamp(37): = -9223372036850 58 | ffmpeg getPresentationTimestamp(38): = -9223372036850 59 | ffmpeg getPresentationTimestamp(39): = 0.1564 60 | ffmpeg getPresentationTimestamp(40): = -9223372036850 61 | ffmpeg getPresentationTimestamp(41): = -9223372036850 62 | ffmpeg getPresentationTimestamp(42): = 0.1672 63 | ffmpeg getPresentationTimestamp(43): = -9223372036850 64 | ffmpeg getPresentationTimestamp(44): = -9223372036850 65 | ffmpeg getPresentationTimestamp(45): = 0.178 66 | ffmpeg getPresentationTimestamp(46): = -9223372036850 67 | ffmpeg getPresentationTimestamp(47): = -9223372036850 68 | ffmpeg getPresentationTimestamp(48): = 0.1888 69 | ffmpeg getPresentationTimestamp(49): = -9223372036850 70 | ffmpeg getPresentationTimestamp(50): = -9223372036850 71 | ffmpeg getPresentationTimestamp(51): = 0.1996 72 | ffmpeg getPresentationTimestamp(52): = -9223372036850 73 | ffmpeg getPresentationTimestamp(53): = -9223372036850 74 | ffmpeg getPresentationTimestamp(54): = 0.2104 75 | ffmpeg getPresentationTimestamp(55): = -9223372036850 76 | ffmpeg getPresentationTimestamp(56): = -9223372036850 77 | ffmpeg getPresentationTimestamp(57): = 0.2212 78 | ffmpeg getPresentationTimestamp(58): = -9223372036850 79 | ffmpeg getPresentationTimestamp(59): = -9223372036850 80 | ffmpeg getPresentationTimestamp(60): = 0.232 81 | ffmpeg getPresentationTimestamp(61): = -9223372036850 82 | ffmpeg getPresentationTimestamp(62): = -9223372036850 83 | ffmpeg getPresentationTimestamp(63): = 0.2428 84 | ffmpeg getPresentationTimestamp(64): = -9223372036850 85 | ffmpeg getPresentationTimestamp(65): = -9223372036850 86 | ffmpeg getPresentationTimestamp(66): = 0.2536 87 | ffmpeg getPresentationTimestamp(67): = -9223372036850 88 | ffmpeg getPresentationTimestamp(68): = -9223372036850 89 | ffmpeg getPresentationTimestamp(69): = 0.2644 90 | ffmpeg getPresentationTimestamp(70): = -9223372036850 91 | ffmpeg getPresentationTimestamp(71): = -9223372036850 92 | ffmpeg getPresentationTimestamp(72): = 0.2752 93 | ffmpeg getPresentationTimestamp(73): = -9223372036850 94 | ffmpeg getPresentationTimestamp(74): = -9223372036850 95 | ffmpeg getPresentationTimestamp(75): = 0.286 96 | ffmpeg getPresentationTimestamp(76): = -9223372036850 97 | ffmpeg getPresentationTimestamp(77): = -9223372036850 98 | ffmpeg getPresentationTimestamp(78): = 0.2968 99 | ffmpeg getPresentationTimestamp(79): = -9223372036850 100 | ffmpeg getPresentationTimestamp(80): = -9223372036850 101 | ffmpeg getPresentationTimestamp(81): = 0.3076 102 | ffmpeg getPresentationTimestamp(82): = -9223372036850 103 | ffmpeg getPresentationTimestamp(83): = -9223372036850 104 | ffmpeg getPresentationTimestamp(84): = 0.3184 105 | ffmpeg getPresentationTimestamp(85): = -9223372036850 106 | ffmpeg getPresentationTimestamp(86): = -9223372036850 107 | ffmpeg getPresentationTimestamp(87): = 0.3292 108 | ffmpeg getPresentationTimestamp(88): = -9223372036850 109 | ffmpeg getPresentationTimestamp(89): = -9223372036850 110 | ffmpeg getPresentationTimestamp(90): = 0.34 111 | ffmpeg getPresentationTimestamp(91): = -9223372036850 112 | ffmpeg getPresentationTimestamp(92): = -9223372036850 113 | ffmpeg getPresentationTimestamp(93): = 0.3508 114 | ffmpeg getPresentationTimestamp(94): = -9223372036850 115 | ffmpeg getPresentationTimestamp(95): = -9223372036850 116 | ffmpeg getPresentationTimestamp(96): = 0.3616 117 | ffmpeg getPresentationTimestamp(97): = -9223372036850 118 | ffmpeg getPresentationTimestamp(98): = -9223372036850 119 | ffmpeg getPresentationTimestamp(99): = 0.3724 120 | ffmpeg getPresentationTimestamp(100): = -9223372036850 121 | ffmpeg getPresentationTimestamp(101): = -9223372036850 122 | ffmpeg getPresentationTimestamp(102): = 0.3832 123 | ffmpeg getPresentationTimestamp(103): = -9223372036850 124 | ffmpeg getPresentationTimestamp(104): = -9223372036850 125 | ffmpeg getPresentationTimestamp(105): = 0.394 126 | ffmpeg getPresentationTimestamp(106): = -9223372036850 127 | ffmpeg getPresentationTimestamp(107): = -9223372036850 128 | ffmpeg getPresentationTimestamp(108): = 0.4048 129 | ffmpeg getPresentationTimestamp(109): = -9223372036850 130 | ffmpeg getPresentationTimestamp(110): = -9223372036850 131 | ffmpeg getPresentationTimestamp(111): = 0.4156 132 | ffmpeg getPresentationTimestamp(112): = -9223372036850 133 | ffmpeg getPresentationTimestamp(113): = -9223372036850 134 | ffmpeg getPresentationTimestamp(114): = 0.4264 135 | ffmpeg getPresentationTimestamp(115): = -9223372036850 136 | ffmpeg getPresentationTimestamp(116): = -9223372036850 137 | ffmpeg getPresentationTimestamp(117): = 0.4372 138 | ffmpeg getPresentationTimestamp(118): = -9223372036850 139 | ffmpeg getPresentationTimestamp(119): = -9223372036850 140 | ffmpeg getPresentationTimestamp(120): = 0.448 141 | ffmpeg getPresentationTimestamp(121): = -9223372036850 142 | ffmpeg getPresentationTimestamp(122): = -9223372036850 143 | ffmpeg getPresentationTimestamp(123): = 0.4588 144 | ffmpeg getPresentationTimestamp(124): = -9223372036850 145 | ffmpeg getPresentationTimestamp(125): = -9223372036850 146 | ffmpeg getPresentationTimestamp(126): = 0.4696 147 | ffmpeg getPresentationTimestamp(127): = -9223372036850 148 | ffmpeg getPresentationTimestamp(128): = -9223372036850 149 | ffmpeg getPresentationTimestamp(129): = 0.4804 150 | ffmpeg getPresentationTimestamp(130): = -9223372036850 151 | ffmpeg getPresentationTimestamp(131): = -9223372036850 152 | ffmpeg getPresentationTimestamp(132): = 0.4912 153 | ffmpeg getPresentationTimestamp(133): = -9223372036850 154 | ffmpeg getPresentationTimestamp(134): = -9223372036850 155 | ffmpeg getPresentationTimestamp(135): = 0.502 156 | ffmpeg getPresentationTimestamp(136): = -9223372036850 157 | ffmpeg getPresentationTimestamp(137): = -9223372036850 158 | ffmpeg getPresentationTimestamp(138): = 0.5128 159 | ffmpeg getPresentationTimestamp(139): = -9223372036850 160 | ffmpeg getPresentationTimestamp(140): = -9223372036850 161 | ffmpeg getPresentationTimestamp(141): = 0.5236 162 | ffmpeg getPresentationTimestamp(142): = -9223372036850 163 | ffmpeg getPresentationTimestamp(143): = -9223372036850 164 | ffmpeg getPresentationTimestamp(144): = 0.5344 165 | ffmpeg getPresentationTimestamp(145): = -9223372036850 166 | ffmpeg getPresentationTimestamp(146): = -9223372036850 167 | ffmpeg getPresentationTimestamp(147): = 0.5452 168 | ffmpeg getPresentationTimestamp(148): = -9223372036850 169 | ffmpeg getPresentationTimestamp(149): = -9223372036850 170 | ffmpeg getPresentationTimestamp(150): = 0.556 171 | ffmpeg getPresentationTimestamp(151): = -9223372036850 172 | ffmpeg getPresentationTimestamp(152): = -9223372036850 173 | ffmpeg getPresentationTimestamp(153): = 0.5668 174 | ffmpeg getPresentationTimestamp(154): = -9223372036850 175 | ffmpeg getPresentationTimestamp(155): = -9223372036850 176 | ffmpeg getPresentationTimestamp(156): = 0.5776 177 | ffmpeg getPresentationTimestamp(157): = -9223372036850 178 | ffmpeg getPresentationTimestamp(158): = -9223372036850 179 | ffmpeg getPresentationTimestamp(159): = 0.5884 180 | ffmpeg getPresentationTimestamp(160): = -9223372036850 181 | ffmpeg getPresentationTimestamp(161): = -9223372036850 182 | ffmpeg getPresentationTimestamp(162): = 0.5992 183 | ffmpeg getPresentationTimestamp(163): = -9223372036850 184 | ffmpeg getPresentationTimestamp(164): = -9223372036850 185 | ffmpeg getPresentationTimestamp(165): = 0.61 186 | ffmpeg getPresentationTimestamp(166): = -9223372036850 187 | ffmpeg getPresentationTimestamp(167): = -9223372036850 188 | ffmpeg getPresentationTimestamp(168): = 0.6208 189 | ffmpeg getPresentationTimestamp(169): = -9223372036850 190 | ffmpeg getPresentationTimestamp(170): = -9223372036850 191 | ffmpeg getPresentationTimestamp(171): = 0.6316 192 | ffmpeg getPresentationTimestamp(172): = -9223372036850 193 | ffmpeg getPresentationTimestamp(173): = -9223372036850 194 | ffmpeg getPresentationTimestamp(174): = 0.6424 195 | ffmpeg getPresentationTimestamp(175): = -9223372036850 196 | ffmpeg getPresentationTimestamp(176): = -9223372036850 197 | ffmpeg getPresentationTimestamp(177): = 0.6532 198 | ffmpeg getPresentationTimestamp(178): = -9223372036850 199 | ffmpeg getPresentationTimestamp(179): = -9223372036850 200 | ffmpeg getPresentationTimestamp(180): = 0.664 201 | ffmpeg getPresentationTimestamp(181): = -9223372036850 202 | ffmpeg getPresentationTimestamp(182): = -9223372036850 203 | ffmpeg getPresentationTimestamp(183): = 0.6748 204 | ffmpeg getPresentationTimestamp(184): = -9223372036850 205 | ffmpeg getPresentationTimestamp(185): = -9223372036850 206 | ffmpeg getPresentationTimestamp(186): = 0.6856 207 | ffmpeg getPresentationTimestamp(187): = -9223372036850 208 | ffmpeg getPresentationTimestamp(188): = -9223372036850 209 | ffmpeg getPresentationTimestamp(189): = 0.6964 210 | ffmpeg getPresentationTimestamp(190): = -9223372036850 211 | ffmpeg getPresentationTimestamp(191): = -9223372036850 212 | ffmpeg getPresentationTimestamp(192): = 0.7072 213 | ffmpeg getPresentationTimestamp(193): = -9223372036850 214 | ffmpeg getPresentationTimestamp(194): = -9223372036850 215 | ffmpeg getPresentationTimestamp(195): = 0.718 216 | ffmpeg getPresentationTimestamp(196): = -9223372036850 217 | ffmpeg getPresentationTimestamp(197): = -9223372036850 218 | ffmpeg getPresentationTimestamp(198): = 0.7288 219 | ffmpeg getPresentationTimestamp(199): = -9223372036850 220 | ffmpeg getPresentationTimestamp(200): = -9223372036850 221 | ffmpeg getPresentationTimestamp(201): = 0.7396 222 | ffmpeg getPresentationTimestamp(202): = -9223372036850 223 | ffmpeg getPresentationTimestamp(203): = -9223372036850 224 | ffmpeg getPresentationTimestamp(204): = 0.7504 225 | ffmpeg getPresentationTimestamp(205): = -9223372036850 226 | ffmpeg getPresentationTimestamp(206): = -9223372036850 227 | ffmpeg getPresentationTimestamp(207): = 0.7612 228 | ffmpeg getPresentationTimestamp(208): = -9223372036850 229 | ffmpeg getPresentationTimestamp(209): = -9223372036850 230 | ffmpeg getPresentationTimestamp(210): = 0.772 231 | ffmpeg getPresentationTimestamp(211): = -9223372036850 232 | ffmpeg getPresentationTimestamp(212): = -9223372036850 233 | ffmpeg getPresentationTimestamp(213): = 0.7828 234 | ffmpeg getPresentationTimestamp(214): = -9223372036850 235 | ffmpeg getPresentationTimestamp(215): = -9223372036850 236 | ffmpeg getPresentationTimestamp(216): = 0.7936 237 | ffmpeg getPresentationTimestamp(217): = -9223372036850 238 | ffmpeg getPresentationTimestamp(218): = -9223372036850 239 | ffmpeg getPresentationTimestamp(219): = 0.8044 240 | ffmpeg getPresentationTimestamp(220): = -9223372036850 241 | ffmpeg getPresentationTimestamp(221): = -9223372036850 242 | ffmpeg getPresentationTimestamp(222): = 0.8152 243 | ffmpeg getPresentationTimestamp(223): = -9223372036850 244 | ffmpeg getPresentationTimestamp(224): = -9223372036850 245 | ffmpeg getPresentationTimestamp(225): = 0.826 246 | ffmpeg getPresentationTimestamp(226): = -9223372036850 247 | ffmpeg getPresentationTimestamp(227): = -9223372036850 248 | ffmpeg getPresentationTimestamp(228): = 0.8368 249 | ffmpeg getPresentationTimestamp(229): = -9223372036850 250 | ffmpeg getPresentationTimestamp(230): = -9223372036850 251 | ffmpeg getPresentationTimestamp(231): = 0.8476 252 | ffmpeg getPresentationTimestamp(232): = -9223372036850 253 | ffmpeg getPresentationTimestamp(233): = -9223372036850 254 | ffmpeg getPresentationTimestamp(234): = 0.8584 255 | ffmpeg getPresentationTimestamp(235): = -9223372036850 256 | ffmpeg getPresentationTimestamp(236): = -9223372036850 257 | ffmpeg getPresentationTimestamp(237): = 0.8692 258 | ffmpeg getPresentationTimestamp(238): = -9223372036850 259 | ffmpeg getPresentationTimestamp(239): = -9223372036850 260 | ffmpeg getPresentationTimestamp(240): = 0.88 261 | -------------------------------------------------------------------------------- /tests/getPixelAspectRatio.phpt: -------------------------------------------------------------------------------- 1 | --TEST-- 2 | ffmpeg getPixelAspectRatio test 3 | --SKIPIF-- 4 | 5 | --FILE-- 6 | getPixelAspectRatio()); 9 | 10 | ?> 11 | --EXPECT-- 12 | ffmpeg getPixelAspectRatio(): 1 13 | -------------------------------------------------------------------------------- /tests/getPixelFormat.phpt: -------------------------------------------------------------------------------- 1 | --TEST-- 2 | ffmpeg getPixelFormat test 3 | --SKIPIF-- 4 | 5 | --FILE-- 6 | getPixelFormat()); 9 | ?> 10 | --EXPECT-- 11 | ffmpeg getPixelFormat(): yuv420p 12 | -------------------------------------------------------------------------------- /tests/getVideoBitRate.phpt: -------------------------------------------------------------------------------- 1 | --TEST-- 2 | ffmpeg getVideoBitRate test 3 | --SKIPIF-- 4 | 5 | --FILE-- 6 | getVideoBitRate()); 9 | ?> 10 | --EXPECT-- 11 | ffmpeg getVideoBitRate(): 104857200 12 | -------------------------------------------------------------------------------- /tests/getVideoCodec.phpt: -------------------------------------------------------------------------------- 1 | --TEST-- 2 | ffmpeg getVideoCodec test 3 | --SKIPIF-- 4 | 5 | --FILE-- 6 | getVideoCodec()); 9 | ?> 10 | --EXPECT-- 11 | ffmpeg getVideoCodec(): mpeg1video 12 | -------------------------------------------------------------------------------- /tests/getVideoStreamId.phpt: -------------------------------------------------------------------------------- 1 | --TEST-- 2 | ffmpeg getVideoStreamId test 3 | --SKIPIF-- 4 | 5 | --FILE-- 6 | getVideoStreamId()); 9 | ?> 10 | --EXPECT-- 11 | ffmpeg getVideoStreamId(): 1 12 | -------------------------------------------------------------------------------- /tests/hasAudio.phpt: -------------------------------------------------------------------------------- 1 | --TEST-- 2 | ffmpeg hasAudio test 3 | --SKIPIF-- 4 | 5 | --FILE-- 6 | hasAudio() ? 'Yes' : 'No'); 9 | ?> 10 | --EXPECT-- 11 | ffmpeg hasAudio(): Yes 12 | -------------------------------------------------------------------------------- /tests/isKeyFrame.phpt: -------------------------------------------------------------------------------- 1 | --TEST-- 2 | ffmpeg test key frame 3 | --SKIPIF-- 4 | 9 | --FILE-- 10 | getFrame()) != false) { 16 | $i = $mov->getFrameNumber(); 17 | $filename = $img . $i . '.png'; 18 | $gd_image = $frame->toGDImage(); 19 | imagepng($gd_image, $filename); 20 | printf("ffmpeg frame->isKeyFrame($i)= %d\n", $frame->isKeyFrame()); 21 | imagedestroy($gd_image); 22 | unlink($filename); 23 | } 24 | ?> 25 | --EXPECT-- 26 | ffmpeg frame->isKeyFrame(1)= 0 27 | ffmpeg frame->isKeyFrame(2)= 0 28 | ffmpeg frame->isKeyFrame(3)= 1 29 | ffmpeg frame->isKeyFrame(4)= 0 30 | ffmpeg frame->isKeyFrame(5)= 0 31 | ffmpeg frame->isKeyFrame(6)= 1 32 | ffmpeg frame->isKeyFrame(7)= 0 33 | ffmpeg frame->isKeyFrame(8)= 0 34 | ffmpeg frame->isKeyFrame(9)= 1 35 | ffmpeg frame->isKeyFrame(10)= 0 36 | ffmpeg frame->isKeyFrame(11)= 0 37 | ffmpeg frame->isKeyFrame(12)= 1 38 | ffmpeg frame->isKeyFrame(13)= 0 39 | ffmpeg frame->isKeyFrame(14)= 0 40 | ffmpeg frame->isKeyFrame(15)= 1 41 | ffmpeg frame->isKeyFrame(16)= 0 42 | ffmpeg frame->isKeyFrame(17)= 0 43 | ffmpeg frame->isKeyFrame(18)= 1 44 | ffmpeg frame->isKeyFrame(19)= 0 45 | ffmpeg frame->isKeyFrame(20)= 0 46 | ffmpeg frame->isKeyFrame(21)= 1 47 | ffmpeg frame->isKeyFrame(22)= 0 48 | ffmpeg frame->isKeyFrame(23)= 0 49 | ffmpeg frame->isKeyFrame(24)= 1 50 | ffmpeg frame->isKeyFrame(25)= 0 51 | ffmpeg frame->isKeyFrame(26)= 0 52 | ffmpeg frame->isKeyFrame(27)= 1 53 | ffmpeg frame->isKeyFrame(28)= 0 54 | ffmpeg frame->isKeyFrame(29)= 0 55 | ffmpeg frame->isKeyFrame(30)= 1 56 | ffmpeg frame->isKeyFrame(31)= 0 57 | ffmpeg frame->isKeyFrame(32)= 0 58 | ffmpeg frame->isKeyFrame(33)= 1 59 | ffmpeg frame->isKeyFrame(34)= 0 60 | ffmpeg frame->isKeyFrame(35)= 0 61 | ffmpeg frame->isKeyFrame(36)= 1 62 | ffmpeg frame->isKeyFrame(37)= 0 63 | ffmpeg frame->isKeyFrame(38)= 0 64 | ffmpeg frame->isKeyFrame(39)= 1 65 | ffmpeg frame->isKeyFrame(40)= 0 66 | ffmpeg frame->isKeyFrame(41)= 0 67 | ffmpeg frame->isKeyFrame(42)= 1 68 | ffmpeg frame->isKeyFrame(43)= 0 69 | ffmpeg frame->isKeyFrame(44)= 0 70 | ffmpeg frame->isKeyFrame(45)= 1 71 | ffmpeg frame->isKeyFrame(46)= 0 72 | ffmpeg frame->isKeyFrame(47)= 0 73 | ffmpeg frame->isKeyFrame(48)= 1 74 | ffmpeg frame->isKeyFrame(49)= 0 75 | ffmpeg frame->isKeyFrame(50)= 0 76 | ffmpeg frame->isKeyFrame(51)= 1 77 | ffmpeg frame->isKeyFrame(52)= 0 78 | ffmpeg frame->isKeyFrame(53)= 0 79 | ffmpeg frame->isKeyFrame(54)= 1 80 | ffmpeg frame->isKeyFrame(55)= 0 81 | ffmpeg frame->isKeyFrame(56)= 0 82 | ffmpeg frame->isKeyFrame(57)= 1 83 | ffmpeg frame->isKeyFrame(58)= 0 84 | ffmpeg frame->isKeyFrame(59)= 0 85 | ffmpeg frame->isKeyFrame(60)= 1 86 | ffmpeg frame->isKeyFrame(61)= 0 87 | ffmpeg frame->isKeyFrame(62)= 0 88 | ffmpeg frame->isKeyFrame(63)= 1 89 | ffmpeg frame->isKeyFrame(64)= 0 90 | ffmpeg frame->isKeyFrame(65)= 0 91 | ffmpeg frame->isKeyFrame(66)= 1 92 | ffmpeg frame->isKeyFrame(67)= 0 93 | ffmpeg frame->isKeyFrame(68)= 0 94 | ffmpeg frame->isKeyFrame(69)= 1 95 | ffmpeg frame->isKeyFrame(70)= 0 96 | ffmpeg frame->isKeyFrame(71)= 0 97 | ffmpeg frame->isKeyFrame(72)= 1 98 | ffmpeg frame->isKeyFrame(73)= 0 99 | ffmpeg frame->isKeyFrame(74)= 0 100 | ffmpeg frame->isKeyFrame(75)= 1 101 | ffmpeg frame->isKeyFrame(76)= 0 102 | ffmpeg frame->isKeyFrame(77)= 0 103 | ffmpeg frame->isKeyFrame(78)= 1 104 | ffmpeg frame->isKeyFrame(79)= 0 105 | ffmpeg frame->isKeyFrame(80)= 0 106 | ffmpeg frame->isKeyFrame(81)= 1 107 | ffmpeg frame->isKeyFrame(82)= 0 108 | ffmpeg frame->isKeyFrame(83)= 0 109 | ffmpeg frame->isKeyFrame(84)= 1 110 | ffmpeg frame->isKeyFrame(85)= 0 111 | ffmpeg frame->isKeyFrame(86)= 0 112 | ffmpeg frame->isKeyFrame(87)= 1 113 | ffmpeg frame->isKeyFrame(88)= 0 114 | ffmpeg frame->isKeyFrame(89)= 0 115 | ffmpeg frame->isKeyFrame(90)= 1 116 | ffmpeg frame->isKeyFrame(91)= 0 117 | ffmpeg frame->isKeyFrame(92)= 0 118 | ffmpeg frame->isKeyFrame(93)= 1 119 | ffmpeg frame->isKeyFrame(94)= 0 120 | ffmpeg frame->isKeyFrame(95)= 0 121 | ffmpeg frame->isKeyFrame(96)= 1 122 | ffmpeg frame->isKeyFrame(97)= 0 123 | ffmpeg frame->isKeyFrame(98)= 0 124 | ffmpeg frame->isKeyFrame(99)= 1 125 | ffmpeg frame->isKeyFrame(100)= 0 126 | ffmpeg frame->isKeyFrame(101)= 0 127 | ffmpeg frame->isKeyFrame(102)= 1 128 | ffmpeg frame->isKeyFrame(103)= 0 129 | ffmpeg frame->isKeyFrame(104)= 0 130 | ffmpeg frame->isKeyFrame(105)= 1 131 | ffmpeg frame->isKeyFrame(106)= 0 132 | ffmpeg frame->isKeyFrame(107)= 0 133 | ffmpeg frame->isKeyFrame(108)= 1 134 | ffmpeg frame->isKeyFrame(109)= 0 135 | ffmpeg frame->isKeyFrame(110)= 0 136 | ffmpeg frame->isKeyFrame(111)= 1 137 | ffmpeg frame->isKeyFrame(112)= 0 138 | ffmpeg frame->isKeyFrame(113)= 0 139 | ffmpeg frame->isKeyFrame(114)= 1 140 | ffmpeg frame->isKeyFrame(115)= 0 141 | ffmpeg frame->isKeyFrame(116)= 0 142 | ffmpeg frame->isKeyFrame(117)= 1 143 | ffmpeg frame->isKeyFrame(118)= 0 144 | ffmpeg frame->isKeyFrame(119)= 0 145 | ffmpeg frame->isKeyFrame(120)= 1 146 | ffmpeg frame->isKeyFrame(121)= 0 147 | ffmpeg frame->isKeyFrame(122)= 0 148 | ffmpeg frame->isKeyFrame(123)= 1 149 | ffmpeg frame->isKeyFrame(124)= 0 150 | ffmpeg frame->isKeyFrame(125)= 0 151 | ffmpeg frame->isKeyFrame(126)= 1 152 | ffmpeg frame->isKeyFrame(127)= 0 153 | ffmpeg frame->isKeyFrame(128)= 0 154 | ffmpeg frame->isKeyFrame(129)= 1 155 | ffmpeg frame->isKeyFrame(130)= 0 156 | ffmpeg frame->isKeyFrame(131)= 0 157 | ffmpeg frame->isKeyFrame(132)= 1 158 | ffmpeg frame->isKeyFrame(133)= 0 159 | ffmpeg frame->isKeyFrame(134)= 0 160 | ffmpeg frame->isKeyFrame(135)= 1 161 | ffmpeg frame->isKeyFrame(136)= 0 162 | ffmpeg frame->isKeyFrame(137)= 0 163 | ffmpeg frame->isKeyFrame(138)= 1 164 | ffmpeg frame->isKeyFrame(139)= 0 165 | ffmpeg frame->isKeyFrame(140)= 0 166 | ffmpeg frame->isKeyFrame(141)= 1 167 | ffmpeg frame->isKeyFrame(142)= 0 168 | ffmpeg frame->isKeyFrame(143)= 0 169 | ffmpeg frame->isKeyFrame(144)= 1 170 | ffmpeg frame->isKeyFrame(145)= 0 171 | ffmpeg frame->isKeyFrame(146)= 0 172 | ffmpeg frame->isKeyFrame(147)= 1 173 | ffmpeg frame->isKeyFrame(148)= 0 174 | ffmpeg frame->isKeyFrame(149)= 0 175 | ffmpeg frame->isKeyFrame(150)= 1 176 | ffmpeg frame->isKeyFrame(151)= 0 177 | ffmpeg frame->isKeyFrame(152)= 0 178 | ffmpeg frame->isKeyFrame(153)= 1 179 | ffmpeg frame->isKeyFrame(154)= 0 180 | ffmpeg frame->isKeyFrame(155)= 0 181 | ffmpeg frame->isKeyFrame(156)= 1 182 | ffmpeg frame->isKeyFrame(157)= 0 183 | ffmpeg frame->isKeyFrame(158)= 0 184 | ffmpeg frame->isKeyFrame(159)= 1 185 | ffmpeg frame->isKeyFrame(160)= 0 186 | ffmpeg frame->isKeyFrame(161)= 0 187 | ffmpeg frame->isKeyFrame(162)= 1 188 | ffmpeg frame->isKeyFrame(163)= 0 189 | ffmpeg frame->isKeyFrame(164)= 0 190 | ffmpeg frame->isKeyFrame(165)= 1 191 | ffmpeg frame->isKeyFrame(166)= 0 192 | ffmpeg frame->isKeyFrame(167)= 0 193 | ffmpeg frame->isKeyFrame(168)= 1 194 | ffmpeg frame->isKeyFrame(169)= 0 195 | ffmpeg frame->isKeyFrame(170)= 0 196 | ffmpeg frame->isKeyFrame(171)= 1 197 | ffmpeg frame->isKeyFrame(172)= 0 198 | ffmpeg frame->isKeyFrame(173)= 0 199 | ffmpeg frame->isKeyFrame(174)= 1 200 | ffmpeg frame->isKeyFrame(175)= 0 201 | ffmpeg frame->isKeyFrame(176)= 0 202 | ffmpeg frame->isKeyFrame(177)= 1 203 | ffmpeg frame->isKeyFrame(178)= 0 204 | ffmpeg frame->isKeyFrame(179)= 0 205 | ffmpeg frame->isKeyFrame(180)= 1 206 | ffmpeg frame->isKeyFrame(181)= 0 207 | ffmpeg frame->isKeyFrame(182)= 0 208 | ffmpeg frame->isKeyFrame(183)= 1 209 | ffmpeg frame->isKeyFrame(184)= 0 210 | ffmpeg frame->isKeyFrame(185)= 0 211 | ffmpeg frame->isKeyFrame(186)= 1 212 | ffmpeg frame->isKeyFrame(187)= 0 213 | ffmpeg frame->isKeyFrame(188)= 0 214 | ffmpeg frame->isKeyFrame(189)= 1 215 | ffmpeg frame->isKeyFrame(190)= 0 216 | ffmpeg frame->isKeyFrame(191)= 0 217 | ffmpeg frame->isKeyFrame(192)= 1 218 | ffmpeg frame->isKeyFrame(193)= 0 219 | ffmpeg frame->isKeyFrame(194)= 0 220 | ffmpeg frame->isKeyFrame(195)= 1 221 | ffmpeg frame->isKeyFrame(196)= 0 222 | ffmpeg frame->isKeyFrame(197)= 0 223 | ffmpeg frame->isKeyFrame(198)= 1 224 | ffmpeg frame->isKeyFrame(199)= 0 225 | ffmpeg frame->isKeyFrame(200)= 0 226 | ffmpeg frame->isKeyFrame(201)= 1 227 | ffmpeg frame->isKeyFrame(202)= 0 228 | ffmpeg frame->isKeyFrame(203)= 0 229 | ffmpeg frame->isKeyFrame(204)= 1 230 | ffmpeg frame->isKeyFrame(205)= 0 231 | ffmpeg frame->isKeyFrame(206)= 0 232 | ffmpeg frame->isKeyFrame(207)= 1 233 | ffmpeg frame->isKeyFrame(208)= 0 234 | ffmpeg frame->isKeyFrame(209)= 0 235 | ffmpeg frame->isKeyFrame(210)= 1 236 | ffmpeg frame->isKeyFrame(211)= 0 237 | ffmpeg frame->isKeyFrame(212)= 0 238 | ffmpeg frame->isKeyFrame(213)= 1 239 | ffmpeg frame->isKeyFrame(214)= 0 240 | ffmpeg frame->isKeyFrame(215)= 0 241 | ffmpeg frame->isKeyFrame(216)= 1 242 | ffmpeg frame->isKeyFrame(217)= 0 243 | ffmpeg frame->isKeyFrame(218)= 0 244 | ffmpeg frame->isKeyFrame(219)= 1 245 | ffmpeg frame->isKeyFrame(220)= 0 246 | ffmpeg frame->isKeyFrame(221)= 0 247 | ffmpeg frame->isKeyFrame(222)= 1 248 | ffmpeg frame->isKeyFrame(223)= 0 249 | ffmpeg frame->isKeyFrame(224)= 0 250 | ffmpeg frame->isKeyFrame(225)= 1 251 | ffmpeg frame->isKeyFrame(226)= 0 252 | ffmpeg frame->isKeyFrame(227)= 0 253 | ffmpeg frame->isKeyFrame(228)= 1 254 | ffmpeg frame->isKeyFrame(229)= 0 255 | ffmpeg frame->isKeyFrame(230)= 0 256 | ffmpeg frame->isKeyFrame(231)= 1 257 | ffmpeg frame->isKeyFrame(232)= 0 258 | ffmpeg frame->isKeyFrame(233)= 0 259 | ffmpeg frame->isKeyFrame(234)= 1 260 | ffmpeg frame->isKeyFrame(235)= 0 261 | ffmpeg frame->isKeyFrame(236)= 0 262 | ffmpeg frame->isKeyFrame(237)= 1 263 | ffmpeg frame->isKeyFrame(238)= 0 264 | ffmpeg frame->isKeyFrame(239)= 0 265 | ffmpeg frame->isKeyFrame(240)= 1 266 | ffmpeg frame->isKeyFrame(241)= 0 267 | ffmpeg frame->isKeyFrame(242)= 0 268 | -------------------------------------------------------------------------------- /tests/persistentMovie.phpt: -------------------------------------------------------------------------------- 1 | --TEST-- 2 | ffmpeg persistent movie test 3 | --SKIPIF-- 4 | 5 | --FILE-- 6 | getDuration()); 10 | printf("ffmpeg getDuration(): %0.2f\n", $mov2->getDuration()); 11 | ?> 12 | --EXPECT-- 13 | ffmpeg getDuration(): 9.60 14 | ffmpeg getDuration(): 9.60 15 | -------------------------------------------------------------------------------- /tests/test_media/16Hz-20kHz-Exp-1f-5sec.mp3: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tony2001/ffmpeg-php/ac3efb07bc24d0934906ad47b8388acc6324b170/tests/test_media/16Hz-20kHz-Exp-1f-5sec.mp3 -------------------------------------------------------------------------------- /tests/test_media/robot.avi: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tony2001/ffmpeg-php/ac3efb07bc24d0934906ad47b8388acc6324b170/tests/test_media/robot.avi --------------------------------------------------------------------------------