X-Git-Url: http://git.plutz.net/?a=blobdiff_plain;f=actions%2Ftranscode.sh;h=7152104a34933002546655225b45c94a6f478cd0;hb=cf568336a5e5403bc1ddc7327397c00abd8f7f1a;hp=835a166f4591a3828b8dd14a0db1045711d9fab8;hpb=aeb6bb1a133bfdf66e614fd3b5f9d34d80bcd1c9;p=serve0 diff --git a/actions/transcode.sh b/actions/transcode.sh old mode 100644 new mode 100755 index 835a166..7152104 --- 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 "$target" ] || nohup avconv -i "$video" -s "${twidth}x${target}" "$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 "Location: /transcoded/${info}.${target}p.webm" +echo