forked from CaptGreg/SenecaOOP345-attic
-
Notifications
You must be signed in to change notification settings - Fork 0
/
avconv.sh
executable file
·40 lines (33 loc) · 810 Bytes
/
avconv.sh
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
# defaults
FOLDER=frames
FPS=30
VBR=2400
QSCALE=2
if test $# -ge 1; then
echo arg 1: $1
FOLDER=$1
fi
if ! test -d $FOLDER ; then
echo usage $0 folder fps bit-rate qscale
echo example $0 2012-09-12 24 2400 2
exit
fi
if test $# -ge 2; then
echo arg 2: $2
FPS=$2
fi
if test $# -ge 3; then
echo arg 3: $3
VBR=$3
fi
if test $# -ge 4; then
echo arg 4: $4
QSCALE=$4
fi
echo only works if file name numbers start at 1
echo folder=$FOLDER fps=$FPS vbitrate=$VBR qscale=${QSCALE}
#
# avconv -r 10 -b 1800 -i %03d.JPG test1800.mp4
echo avconv -i ${FOLDER}/f%06d.png -r ${FPS} -qscale ${QSCALE} -b ${VBR}k ${FOLDER}-avconv-fps${FPS}-vbr${VBR}-qscale${QSCALE}.mp4
avconv -i ${FOLDER}/f%06d.png -r ${FPS} -qscale ${QSCALE} -b ${VBR}k ${FOLDER}-avconv-fps${FPS}-vbr${VBR}-qscale${QSCALE}.mp4
#