[MPlayer-users] Converting avi files to animated gifs
Dotan Cohen
dotancohen at gmail.com
Fri Mar 28 23:10:01 CET 2008
I need to output a summary of a video as an animated gif. Ideally, I
would have 8 equally-spaced frames from the video, and play them back
one at a time, each for 0.25 seconds. So I'd have a 2 second animated
gif.
This is what I have so far:
#!/bin/bash
mplayer "$@" -vo gif89a:output="$@".gif:fps=1 -vf scale=640:480
-endpos 8 -really-quiet
As you can see, I'm taking eight frames from the first eight seconds
of video. What can I use to take eight frames from $timeOfVideo/7 time
periods. Note that I'm dividing the time of the video by 7, not 8, so
that I will have the first and last frames of the video in the gif.
My second problem is shortening the duration that each frame is shown.
Currently, each frame is shown for 1 second. How can I reduce that to
0.25 seconds?
If there is a better tool for the job, say ffmpeg, then please let me
know. Thanks in advance.
Dotan Cohen
http://what-is-what.com
http://gibberish.co.il
א-ב-ג-ד-ה-ו-ז-ח-ט-י-ך-כ-ל-ם-מ-ן-נ-ס-ע-ף-פ-ץ-צ-ק-ר-ש-ת
A: Because it messes up the order in which people normally read text.
Q: Why is top-posting such a bad thing?
More information about the MPlayer-users
mailing list