From cd31751737247425e83fdd176ef853473c608796 Mon Sep 17 00:00:00 2001 From: Daniel Friesel Date: Sat, 3 Apr 2010 21:18:31 +0200 Subject: Use zsh, a few fixes --- bin/fuze-img | 10 ++++++---- bin/fuze-vid | 18 +++++++++++------- 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 ## License: 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 ## License: 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} -- cgit v1.2.3