I have written the script, below, which is run by automator whenever a new avi is dropped into a folder, but at the moment the output file is named "*.avi.mp4"
Any idea how to output the original file name, loose the original 'avi' extension and keep 'mp4'?
Thanks,
Code: Select all
DATEVAR=$(date)
for file in *.avi
do
echo "$DATEVAR start transcode of $file" >> /Volumes/Store/New\ Video/transcode-log.txt
/Applications/Utilities/HandBrakeCLI -i /Users/Oliver/Desktop/test/$file -o /Users/Oliver/Desktop/test/$file.mp4 --preset="iPhone WiFi-lo"
echo "$DATEVAR end transcode" >> /Volumes/Store/New\ Video/transcode-log.txt
done