Fixed a few bugs
[videoscripts/.git] / mp4tomp3
1 #!/bin/bash
2
3 INPUT=$1
4 START=$2
5 STOP=$3
6
7 if [[ -n $START ]]; then
8   START="-ss $START"
9 fi
10
11 if [[ -n $STOP ]]; then
12   STOP="-t $STOP"
13 fi
14
15 if [[ -z INPUT ]]; then
16   echo "usage: $0 <input> [<start> <stop>]"
17 fi
18
19 ffmpeg $START $STOP -i $INPUT -acodec libmp3lame -ab 128k $INPUT.mp3