parent
c1d8d7bc9c
commit
e9a4c2c5ba
1 changed files with 17 additions and 0 deletions
@ -0,0 +1,17 @@ |
|||||||
|
#! /bin/bash |
||||||
|
|
||||||
|
SRC=${1:-.} |
||||||
|
DST=${2:-/var/tmp/spielfilme/ogg} |
||||||
|
|
||||||
|
for f in $(find "$SRC" \( -name '*.jpg' -prune \) -o -type f -print); do |
||||||
|
t="${f/$SRC/$DST}" |
||||||
|
t="${t%.*}.ogg" |
||||||
|
if test -s "${t}"; then |
||||||
|
continue; |
||||||
|
fi |
||||||
|
test -d "${t%/*}" || mkdir -p "${t%/*}" |
||||||
|
avconv -i "$f" -c:v libtheora -c:a libvorbis -q:v 6 -q:a 5 "$t" |
||||||
|
if ( ! test -s "${t}" ) && ( test -e "$t" ); then |
||||||
|
rm "$t" |
||||||
|
fi |
||||||
|
done |
Loading…
Reference in new issue