From 69498b6a3a0520ffaf13b7ebc5a034b01f50b535 Mon Sep 17 00:00:00 2001 From: paul Date: Tue, 28 Apr 2015 13:43:14 +0000 Subject: [PATCH] improvements for smaller screens svn path=/trunk/; revision=45 --- actions/transcode.sh | 5 ++++- templates/frame.html.sh | 1 + templates/videoview.css.sh | 15 +++++++++++---- 3 files changed, 16 insertions(+), 5 deletions(-) diff --git a/actions/transcode.sh b/actions/transcode.sh index fa1de34..fd169b5 100644 --- a/actions/transcode.sh +++ b/actions/transcode.sh @@ -10,7 +10,10 @@ head -n1 "$meta" |read length width height name twidth=$(($width * $target / $height)) -[ -f "$trans" ] || nohup avconv -i "$video" -s "${twidth}x${target}" -threads auto "$trans" & +if ! [ -f "$trans" ]; then + [ "$target" -le 240 ] && nohup avconv -i "$video" -s "${twidth}x${target}" -b:a 80k -threads auto "$trans" & + [ "$target" -gt 240 ] && nohup avconv -i "$video" -s "${twidth}x${target}" -threads auto "$trans" & +fi echo "Location: /transcoded/${info}.${target}p.webm" echo diff --git a/templates/frame.html.sh b/templates/frame.html.sh index eae2968..4cb612b 100755 --- a/templates/frame.html.sh +++ b/templates/frame.html.sh @@ -20,6 +20,7 @@ cat < + $(. $PAGE title)