5 video="${_DATA}/videos/$info"
6 meta="${_DATA}/meta/$info.meta"
7 trans="${_DATA}/transcoded/${info}.${target}p.webm"
9 head -n1 "$meta" |read length width height name
11 twidth=$(($width * $target / $height))
13 if ! [ -f "$trans" ]; then
14 [ "$target" -le 240 ] && nohup avconv -i "$video" -s "${twidth}x${target}" -b:a 80k -threads auto "$trans" &
15 [ "$target" -gt 240 ] && nohup avconv -i "$video" -s "${twidth}x${target}" -threads auto "$trans" &
18 echo "Location: /transcoded/${info}.${target}p.webm"