aboutsummaryrefslogtreecommitdiffstats
path: root/ffmpeg/resize-and-transcode
diff options
context:
space:
mode:
Diffstat (limited to 'ffmpeg/resize-and-transcode')
-rwxr-xr-xffmpeg/resize-and-transcode4
1 files changed, 3 insertions, 1 deletions
diff --git a/ffmpeg/resize-and-transcode b/ffmpeg/resize-and-transcode
index f3fe017..2b7b962 100755
--- a/ffmpeg/resize-and-transcode
+++ b/ffmpeg/resize-and-transcode
@@ -13,7 +13,7 @@ err () {
colour="$1"
format="$2"
shift 2
- printf '\x1b['"${colour}m${format}"'\x1b[m\n' "$@" >&2
+ printf '\033['"${colour}m${format}"'\033[m\n' "$@" >&2
}
alert () { err "1;31" "$@"; }
@@ -99,8 +99,10 @@ if test -z "$scale" && test "$codec" = '-c:v copy'; then
exit 1
fi
+ttysetting="$(stty -g)"
ffmpeg -i "$input" $scale $codec -c:a copy -- "$output"
ret=$?
+stty -- "$ttysetting"
if test $ret = 0; then
oldsize=$(stat -c '%s' -- "$input")