Created
March 10, 2010 22:01
-
-
Save juniovitorino/328482 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
OUTPUT_PATH='~/app/webroot/files/depoimentos/flv' | |
MOVIES_PATH='~/app/webroot/files/depoimentos/videos' | |
ORIGINAL_PATH='~/app/webroot/files/depoimentos/videos_originais' | |
cd $MOVIES_PATH | |
for filename in *.* | |
do | |
if [ -e $filename ]; then | |
file="${filename%.*}" | |
/usr/local/bin/ffmpeg -i $filename -ar 22050 -qscale .1 -s 320x240 $OUTPUT_PATH/$file.flv | |
mv $filename $ORIGINAL_PATH | |
echo "${filename} converted on $(date) to $file.flv" >> ~/app/tmp/logs/converted_log | |
fi | |
done | |
echo "Last execution on $(date)" >> ~/app/tmp/logs/scheduled_log |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment