File: ppm2theora

package info (click to toggle)
gerris 20131206%2Bdfsg-5
  • links: PTS, VCS
  • area: main
  • in suites: jessie, jessie-kfreebsd
  • size: 12,728 kB
  • ctags: 6,777
  • sloc: ansic: 66,593; sh: 15,930; f90: 1,513; makefile: 1,180; fortran: 696; python: 484; awk: 104; lisp: 89; xml: 27
file content (28 lines) | stat: -rw-r--r-- 505 bytes parent folder | download | duplicates (3)
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
#!/bin/bash

if test -z "`which avconv`"; then
    echo "ppm2theora: error: could not find 'avconv'" > /dev/stderr
    exit 1
fi

command="avconv -f image2pipe -vcodec ppm -i - -vcodec libtheora -vb 2048k -f ogg"
while test $# -gt 0; do
    command="$command $1"
    shift
done

if test -d "$TMPDIR" ; then
  log=`mktemp $TMPDIR/ppm2theora.XXXXXX`
else
  log=`mktemp /tmp/ppm2theora.XXXXXX`
fi

if $command - 2> $log; then :
else
    cat $log > /dev/stderr
    rm -f $log
    exit 1
fi
rm -f $log

exit 0