User:Silviolorusso/Gifmaka: Difference between revisions

From XPUB & Lens-Based wiki
(Created page with "<source lang="bash"> #!/bin/sh # Extract three PNG frames from a movie | $1 movie name | $2 time position in seconds | $3 number of frames ffmpeg -i $1 -r 25 -ss $2 -vframes $3...")
 
No edit summary
 
Line 1: Line 1:
A little script to get frames from a video file and create an animated gif.
<source lang="bash">  
<source lang="bash">  
#!/bin/sh
#!/bin/sh
Line 24: Line 26:
</source>
</source>


[[User:silviolorusso/Report/gifmaka-ex | Examples]] of use of GIFMAKA capturing frames from [http://en.wikipedia.org/wiki/Vampire_in_Venice Vampire in Venice] directed by Augusto Caminito.
Examples of use of [[User:silviolorusso/Report | GIFMAKA]] capturing frames from [http://en.wikipedia.org/wiki/Vampire_in_Venice Vampire in Venice] directed by Augusto Caminito.
 
[[Image:vampire1.gif]]
<br/>
[[Image:vampire2.gif]]
<br/>
[[Image:vampire3.gif]]
<br/>
[[Image:vampire4.gif]]
<br/>
[[Image:vampire5.gif]]
<br/>
[[Image:vampire6.gif]]

Latest revision as of 17:48, 15 October 2011

A little script to get frames from a video file and create an animated gif.

 
#!/bin/sh

# Extract three PNG frames from a movie | $1 movie name | $2 time position in seconds | $3 number of frames
ffmpeg -i $1 -r 25 -ss $2 -vframes $3 $1-%03d.png

# convert PGN to single GIF

for FRAME in $(seq -f %03g $3)
do
	convert $1-$FRAME.png $1-$FRAME.gif
	rm $1-$FRAME.png
done

# combine all individual GIF in an animated one
FWD=$(/bin/ls $1-*.gif)
BWD=$(echo "${FWD}" | sed 1d | sort -r | sed 1d)

gifsicle --delay 4 --loopcount=0 --colors 256 \
$FWD $BWD > $1-anim.gif 

# remove files
rm $FWD

Examples of use of GIFMAKA capturing frames from Vampire in Venice directed by Augusto Caminito.

Vampire1.gif
Vampire2.gif
Vampire3.gif
Vampire4.gif
Vampire5.gif
Vampire6.gif