]> git.plutz.net Git - serve0/commitdiff
improved transcode display
authorpaul <paul@plutz.net>
Wed, 15 Apr 2015 06:51:30 +0000 (06:51 +0000)
committerpaul <paul@plutz.net>
Wed, 15 Apr 2015 06:51:30 +0000 (06:51 +0000)
svn path=/trunk/; revision=35

actions/transcode.sh
pages/videoview.sh
templates/videoview.css.sh

index 835a166f4591a3828b8dd14a0db1045711d9fab8..a61c2bb7345b67012df6e5f2cbdd5fff127e8dbf 100644 (file)
@@ -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
index eacc54718e89b41fb8a73acb42190062b6d177c1..b8ee7dab3ae5bb39f426f201094ba78a0ce47f6a 100755 (executable)
@@ -99,16 +99,22 @@ _printVideo(){
       minutes="$(($length / 60)):$(($length % 60))"
 
     linkinfo="$(urlsave "$info")"
+
+    [ $height -gt 480 ] && \
+      alt480="<a class=\"videolink alt 480p\" href=\"?action=transcode&i=${linkinfo}&t=480\">480p</a>" || unset alt480
+    [ $height -gt 240 ] && \
+      alt240="<a class=\"videolink alt 240p\" href=\"?action=transcode&i=${linkinfo}&t=240\">240p</a>" || unset alt240
+
     tee "$cache" <<VIDEOend
       <li class="thumb">
         <a class="watchlink" name="${linkinfo}" href="?action=watch&i=${linkinfo}">
           <img src="$thumb">
         </a>
         <a class="videolink" href="$video">$info</a>
+        ${alt480} ${alt320} ${$alt240}
         <!-- a href="$reenc">VP8</a -->
-        <!-- a class="videolink fake-mp4" href="$mpfake">fake-mp4</a --
-        <a class="videolink" href="?action=transcode&i=${linkinfo}&t=480">480p</a>
-        <a class="videolink" href="?action=transcode&i=${linkinfo}&t=240">240p</a>
+        <!-- a class="videolink fake-mp4" href="$mpfake">fake-mp4</a -->
+        
         <input type="checkbox" name="tagsel" value="$info">
         <span class="info property">${minutes}min</span>
         <span class="info property">${width}x${height}</span>
index 3d152d1b06b292a8b045f7c4bd28388a378493b1..15ca3be11dd0fe87ac4d39a9089e944ea4c9ed3f 100755 (executable)
@@ -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;