summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDaniel Friesel <derf@derf.homelinux.org>2010-04-03 21:18:31 +0200
committerDaniel Friesel <derf@derf.homelinux.org>2010-04-03 21:18:31 +0200
commitcd31751737247425e83fdd176ef853473c608796 (patch)
tree797dff387f29046ff09243e4046ac4b3474d1f00
parenta6c7659651aae7379c91ba72e10cc3be8681286b (diff)
Use zsh, a few fixes
-rwxr-xr-xbin/fuze-img10
-rwxr-xr-xbin/fuze-vid18
2 files changed, 17 insertions, 11 deletions
diff --git a/bin/fuze-img b/bin/fuze-img
index da91b60..5e04e8c 100755
--- a/bin/fuze-img
+++ b/bin/fuze-img
@@ -1,8 +1,10 @@
-#!/bin/sh
+#!/usr/bin/env zsh
## Copyright © 2010 by Daniel Friesel <derf@derf.homelinux.org>
## License: WTFPL <http://sam.zoy.org/wtfpl>
-INPUT="${1}"
-OUTPUT="/tmp/fuze/$(basename ${1}).jpg"
+INPUT=${1}
+OUTPUT=/tmp/fuze/${INPUT:t:r}.jpg
-convert -resize 220x176 -quality 100 "${INPUT}" "${OUTPUT}"
+convert -resize 220x176 -quality 100 ${INPUT} ${OUTPUT}
+
+echo ${OUTPUT}
diff --git a/bin/fuze-vid b/bin/fuze-vid
index 775fbf1..d0c0262 100755
--- a/bin/fuze-vid
+++ b/bin/fuze-vid
@@ -1,10 +1,10 @@
-#!/bin/sh
+#!/usr/bin/env zsh
## Copyright © 2010 by Daniel Friesel <derf@derf.homelinux.org>
## License: WTFPL <http://sam.zoy.org/wtfpl>
-INPUT="${1}"
-TMPOUT="/tmp/fuze/${1}.tmp"
-OUTPUT='/tmp/fuze/$(basename ${1}).avi"
+INPUT=${1}
+TMPOUT=/tmp/fuze/${INPUT:t:r}.tmp
+OUTPUT=/tmp/fuze/${INPUT:t:r}.avi
mkdir -p /tmp/fuze
@@ -12,12 +12,16 @@ mencoder -msglevel all=0:statusline=5 -ffourcc DX50 -ofps 20 -vf \
pp=li,expand=:::::224/176,scale=224:176,harddup -ovc lavc -lavcopts \
vcodec=mpeg4:vbitrate=683:vmax_b_frames=0:keyint=15:turbo:vpass=1 \
-srate 44100 -af resample=44100:0:1,format=s16le -oac mp3lame \
--lameopts cbr:br=128 "${INPUT}" -o "${TMPOUT}"
+-lameopts cbr:br=128 ${INPUT} -o ${TMPOUT}
mencoder -msglevel all=0:statusline=5 -ffourcc DX50 -ofps 20 -vf \
pp=li,expand=:::::224/176,scale=224:176,harddup -ovc lavc -lavcopts \
vcodec=mpeg4:vbitrate=683:vmax_b_frames=0:keyint=15:vpass=2 -srate 44100 \
-af resample=44100:0:1,format=s16le -oac mp3lame -lameopts cbr:br=128 \
-"${INPUT}" -o "${TMPOUT}"
+${INPUT} -o ${TMPOUT}
-fuzemux "${TMPOUT}" "${OUTPUT}"
+fuzemux ${TMPOUT} ${OUTPUT}
+rm ${TMPOUT}
+
+echo
+echo ${OUTPUT}