I\'m using FFMPEG to measure the duration of videos stored in an Amazon S3 Bucket.
I\'ve read the FFMPEG docs, and they explicitly state that all whitespace and speci
for fileOne in *.mp4
do
baseName=$(basename "$fileOne" .mp4) # "$fileOne" quotes are necessary because of special chars in it
echo "input: " $fileOne
echo "var: " $baseName
echo "target: " $baseName".mp3"
cp "$fileOne" "tmp.mp4"
# ffmpeg problem with specialchars like whitespaces and '-'
# ffmpeg -i \"$fileOne\" "$baseName..mp3"
ffmpeg -i "tmp.mp4" "tmp.mp3"
mv "tmp.mp3" "$baseName".mp3""
done
rm "tmp-mp4"
`just rename the file for the conversion :)