News Feed
Sections




News Archive
Looking for more information on how to do PHP the right way? Check out PHP: The Right Way

Lorenzo Alberton's Blog:
Create a video preview as animated GIF with FFmpeg and PHP SPL
September 04, 2009 @ 09:52:50

Lorenzo Alberton has posted a new item to his blog with a code snippet showing the combination of FFmpeg and features in PHP's SPL to make a GIF preview.

About one year ago, I had to create animated GIFs as a preview of a video for a media portal. I recently stumbled upon the code I wrote and thought it was probably worth sharing. It makes a rather unconventional use of the SPL Iterators, proving how flexible they are.

His method combines Imagick, FFmpeg and a a Thumbnail_Extractor class that extends the SPL Iterator. The script runs through the frames of the movie file and allows you to define multiple places to pull thumbnails from. Complete code and output examples are included.

0 comments voice your opinion now!
animated gif tutorial ffmpeg movie thumbnail spl


blog comments powered by Disqus

Similar Posts

PHPSnippets.info: Convert currencies using PHP, Google and cURL

PHPMac.com: Building and Installing Apache 2.2.2 and PHP 5.1.3 (or 5.1.4) on Mac OS X 10.4.6

NETTUTS.com: How to Build a Login System for a Simple Website

James Morris' Blog: Removing Dependencies with the Observer Pattern (SplObserver, SplSubject)

Andrew Podner: Lithium: Getting Stuff From Your Database


Community Events





Don't see your event here?
Let us know!


laravel introduction podcast language unittest interview code install developer series list testing threedevsandamaybe community release refactor wordpress framework configure opinion

All content copyright, 2014 PHPDeveloper.org :: info@phpdeveloper.org - Powered by the Solar PHP Framework