Next Question
RSS
ffmpeg is linux based software that is a bit of a swiss army knife for processing video.
Using PHP to take care of the animated gif assembly, you could easily add in a bit of logic to read a directory and compile gif's from all of the flv's found.
Here is a php code snip for you:
$oMovie = new ffmpeg_movie($inputFile);
$oAnimatedGif = new ffmpeg_animated_gif($outputFile, $width, $height,
$frameRate, $loopCount);
$frame = $oMovie->getNextKeyFrame();
if ($frame) {
$oAnimatedGif->addFrame($frame);
}
Basically, we're using PHP to run ffmpeg, extract a few frames and build the animated gif. Note that ffmpeg must be installed and compiled into php.
PHP can be easily run from the command line.
Permalink | Report
I found it really helpful for making avatars for myself and others on various forums.
Source(s):
http://www.starcraft2forum.org/forums/showthread.php?t=1827
Experience.
Permalink | Report
Source(s):
http://ffmpeg.arrozcru.org/builds/
http://www.uoregon.edu/~noeckel/MakeMovie.html
Permalink | Report
Answered Question
M$3.25
February 23, 2009 08:53 PM
How can I use VirtualDub, or any other program, to batch command line convert AVI files to animated GIFs?
Interesting Question?
Yes (0)
No (0)
- In Technology & Internet |
- |
- Report |
-
Share
RSS
Best Answer Chosen by Asker
| February 27, 2009 02:24 AM |
Using PHP to take care of the animated gif assembly, you could easily add in a bit of logic to read a directory and compile gif's from all of the flv's found.
Here is a php code snip for you:
$oMovie = new ffmpeg_movie($inputFile);
$oAnimatedGif = new ffmpeg_animated_gif($outputFile, $width, $height,
$frameRate, $loopCount);
$frame = $oMovie->getNextKeyFrame();
if ($frame) {
$oAnimatedGif->addFrame($frame);
}
Basically, we're using PHP to run ffmpeg, extract a few frames and build the animated gif. Note that ffmpeg must be installed and compiled into php.
PHP can be easily run from the command line.
| Asker's Rating: |
Permalink | Report
Other Answers (2)
February 23, 2009 11:04 PM
I posted a tutorial on how to do this with Virtual Dub below. I found it really helpful for making avatars for myself and others on various forums.
Source(s):
http://www.starcraft2forum.org/forums/showthread.php?t=1827
Experience.
Permalink | Report
February 23, 2009 11:07 PM
This is not a solution that can be done via command line, or in a batch situation.
Report
February 23, 2009 11:15 PM
http://dubman.sourceforge.net/ to screate your script. Then /s < script > in the VD Command Line to start the script.
Report
February 23, 2009 11:59 PM
I have tried Dubman before. I do not see an option anywhere in Dubman to export to an Animated GIF. Dubman is simply an easy way to create scripts. I can create scripts just fine, but there does not seem to be any commands in VirtualDub to actually export an animated GIF. VirtualDub.SaveImageSequence gets close, saving a series of pngs tgas or jpgs. Can you show me exactly how you were able to get Dubman to save a script that converts an AVI to an animated GIF?
Report
February 24, 2009 01:18 AM
That's as close as you can get it with Virtual Dub as far as I know. Then you use a batch images to Animated Gif compiler which you can probably google.
Report
February 25, 2009 04:13 PM
I still need a unified, single program solution that can accomplish this. it does not need to be VirtualDub.
Report
August 25, 2009 01:04 PM
- Download FFmpeg Win32 Binaries via the links: http://ffmpeg.arrozcru.org/builds/static/ffmpeg-r16537-gpl-static-win32.tar.bz2 or http://ffmpeg.arrozcru.org/builds/shared/ffmpeg-r16537-gpl-shared-win32.tar.bz2.
- Invoke "ffmpeg -i video.avi -pix_fmt rgb24 video.gif" to convert AVI to animated GIF.
Source(s):
http://ffmpeg.arrozcru.org/builds/
http://www.uoregon.edu/~noeckel/MakeMovie.html
Permalink | Report
Answer this Question
Related Questions
Ask a Question
Buy Mahalo Dollars with Credit Card or PayPal
Top Members
Most Popular Tags
Categories
- Anonymous
- Arts & Design
- Beauty & Style
- Books & Authors
- Business
- Cars & Transportation
- Consumer Electronics
- Coupons Deals
- Education
- Entertainment
- Environment
- Fitness
- Food & Drink
- From Email
- From Iphone
- From Twitter
- Health
- History
- Hobbies
- Home & Garden
- How Tos
- Humor
- Jobs
- Legal
- Local
- Love & Relationships
- Mahalo Answers Community
- Money
- Music
- News
- NSFW
- Parenting
- Pets
- Science & Mathematics
- Services
- Shopping
- Social Science
- Society & Culture
- Sports
- Technology & Internet
- Travel
- Video Games
Welcome New Members
- elezabith, December 07, 2009 01:40 AM
- davespies, December 07, 2009 01:38 AM
- rodikpodactor, December 07, 2009 01:37 AM
- beefviper, December 07, 2009 01:33 AM
- toddsimmons, December 07, 2009 01:31 AM
Mahalo Dollars are the currency of Mahalo Answers.
Each Mahalo Dollar costs $1.
Once you earn more than 40 Mahalo Dollars, you can request to be paid via PayPal. Each Mahalo Dollar is currently worth $0.75 when paid out via PayPal. Learn More
Although, really, if it was me, I'd just purchase some $5 per month hosting account with shell access that had ffmpeg enabled. Then, as long as you don't mind FTP'ing (or using rsync) to move your videos around, you could do all of your conversions there.
Well, that is if you don't already have a server. Chances are if you're batch processing animated gif's that you're thumbnailing videos for display on the web.