Skripta sluzi da konvertuje ulazni video file u audio, koristeci ffmpeg
Code: Select all
#!/bin/bash
## convert .flv video to mp3 audio
IN_FILE=$1
OUT_FILE=$2
if [ -z $IN_FILE ]; then
echo "Usage: "
echo "./flv2mp3 File.flv File"
echo "or"
echo "./flv2mp3 File.flv, produce mp3 audio file File.flv.mp3"
exit 0
fi
if [ -e $IN_FILE ]; then
if [ -z $OUT_FILE ]; then
ffmpeg -i ./$IN_FILE -vn -ar 44100 -ac 2 -ab 192 -f mp3 $IN_FILE.mp3
else
ffmpeg -i ./$IN_FILE -vn -ar 44100 -ac 2 -ab 192 -f mp3 $OUT_FILE.mp3
fi
echo "DONE"
else
echo "File doesn't exist!"
fi
Sigurno nije savrsena ali radi posao