From d13af69e22fe3dfb384ce6334590b595cbf6904f Mon Sep 17 00:00:00 2001 From: paul Date: Wed, 15 Apr 2015 06:51:30 +0000 Subject: [PATCH] improved transcode display svn path=/trunk/; revision=35 --- actions/transcode.sh | 4 ++-- pages/videoview.sh | 12 +++++++++--- templates/videoview.css.sh | 4 ++++ 3 files changed, 15 insertions(+), 5 deletions(-) diff --git a/actions/transcode.sh b/actions/transcode.sh index 835a166..a61c2bb 100644 --- a/actions/transcode.sh +++ b/actions/transcode.sh @@ -10,7 +10,7 @@ head -n1 "$meta" |read length width height name twidth=$(($width * $target / $height)) -[ -f "$target" ] || nohup avconv -i "$video" -s "${twidth}x${target}" "$trans" & +[ -f "$target" ] || nohup avconv -i "$video" -s "${twidth}x${target}" -threads auto "$trans" & -echo "Location: transcoded/${info}.${target}p.webm" +echo "Location: /transcoded/${info}.${target}p.webm" echo diff --git a/pages/videoview.sh b/pages/videoview.sh index eacc547..b8ee7da 100755 --- a/pages/videoview.sh +++ b/pages/videoview.sh @@ -99,16 +99,22 @@ _printVideo(){ minutes="$(($length / 60)):$(($length % 60))" linkinfo="$(urlsave "$info")" + + [ $height -gt 480 ] && \ + alt480="480p" || unset alt480 + [ $height -gt 240 ] && \ + alt240="240p" || unset alt240 + tee "$cache" < $info + ${alt480} ${alt320} ${$alt240} - + ${minutes}min ${width}x${height} diff --git a/templates/videoview.css.sh b/templates/videoview.css.sh index 3d152d1..15ca3be 100755 --- a/templates/videoview.css.sh +++ b/templates/videoview.css.sh @@ -120,6 +120,10 @@ a.clearsearch, a.advanced, a.tagger, .pagination_nav { #thumblist .thumb a.fake-mp4 { margin-top: .5em; } +#thumblist .thumb a.alt { + display: inline-block; + margin-top: .5em; +} .footer { position: fixed; -- 2.39.2