]> git.plutz.net Git - serve0/blobdiff - actions/transcode.sh
exec
[serve0] / actions / transcode.sh
index fa1de34dc0150a205663152abe96263e808af5fa..7152104a34933002546655225b45c94a6f478cd0 100644 (file)
@@ -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
+echo