Skip to content
This repository

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
branch: master
Fetching contributors…

Cannot retrieve contributors at this time

executable file 37 lines (32 sloc) 1.171 kb
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37
#!/bin/bash

. ~/.shell-colors

if [ -z "$1" ]; then
echo -e "\n $red OOPS...\n Usage: dubb-short movie_name\n $reset"
exit
fi
vid="$1"
#printf " \t $yell Add time for conversion (in secs): \n \t [ or hit enter to convert the whole file ] \n \t :- "
#read input
#if [ "$input" = "" ]; then
convtime=""
#else
# convtime="-t $input"
#fi
if [ -f "$1" ]; then
echo -e "\n $cyan *** Converting the movie - one pass ***\n"
name=$(basename $vid | cut -d "." -f1 | tr - _ | tr ' ' _ | tr -s '_')
name=./$name.1.avi
echo -e "\n ***Saving to $name***\n $green"
starting_time=`date +%s`

nice -n 8 ffmpeg $convtime -i "$vid" -y -threads 3 -s 720x576 -aspect 16:9 -f avi -b:v 1100k -async 25 -acodec libmp3lame -b:a 96k -ac 2 -vol 512 $name

end_time=`date +%s`
answer=$(($end_time-$starting_time))
[ "$answer" -ge "60" ] && \
minutes=$(($answer/60)) && seconds=$(($answer-($minutes*60))) && \
printf "\n $cyan $minutes mins $seconds secs overall... \n \n" || \
printf "\n $cyan $answer seconds overall... \n\n"

echo -e "\n $yell ALL DONE NOW !!!\n $reset"
else
echo -e "\n $red Wrong name for movie... \n Try Again $reset \n"
fi
exit 0
Something went wrong with that request. Please try again.