Jpegloop: Difference between revisions
(Created page with "== Basic Loop == <source lang="bash"> cp $j lastframe.jpg for ((i=100;i>=1;i--)) do name=$(printf "%03d\n" $((100-i))) convert lastframe.jpg -quality $i output$name.jpg cp o...") |
No edit summary |
||
Line 1: | Line 1: | ||
== Loop == | |||
Counting up... | |||
<source lang="bash"> | |||
for ((i=1;i<=100;i++)) | |||
do | |||
echo $i | |||
done | |||
</source> | |||
== Basic Loop == | == Basic Loop == | ||
<source lang="bash"> | <source lang="bash"> |
Revision as of 14:54, 4 March 2013
Loop
Counting up...
for ((i=1;i<=100;i++))
do
echo $i
done
Basic Loop
cp $j lastframe.jpg
for ((i=100;i>=1;i--))
do
name=$(printf "%03d\n" $((100-i)))
convert lastframe.jpg -quality $i output$name.jpg
cp output$name.jpg lastframe.jpg
done
ffmpeg -f image2 -i output%03d.jpg -r 10 $j.mp4
Apply to a directory of files
#!/bin/bash
for j
do
cp $j lastframe.jpg
for ((i=100;i>=1;i--))
do
name=$(printf "%03d\n" $((100-i)))
convert lastframe.jpg -quality $i output$name.jpg
# COPY THE CURRENT TO "lastframe.jpg"
cp output$name.jpg lastframe.jpg
done
ffmpeg -f image2 -i output%03d.jpg -r 10 $j.mp4
done