I'm currently on vacation (in Phuket Thailand (Europe is my nominal place of residence)), and I am searching for a quick and dirty solution to process many hundreds of short video files from my Canon HF S10 camcorder (1920x1080 resolution @ 25 Mb/sec bit rate) to a lower resolution and lower bit rate. I need to do that so I can pass the videos to friends/relatives whose PCs can not handle the high resolution nor high bit rate (my Intel Core i7 PC at home has no problem - but not everyone has a PC to those specs).
For individual files, I find the following will take a sample file "00017.mts" and convert it from 1920x1088 to 1280x720 and also reduce the bit rate from 25MB/sec to 8MB/sec:
Code:
ffmpeg -y -i 00017.mts -f avi -vcodec mpeg4 -b 8000000 -acodec ac3 -ab 128000 -s 1280x720 17.avi
The above command works GREAT !! But the problem is I have many many hundreds (thousands actually) of video clips/files and I don't want to do that manually for every file.
So I created the following simple loop:
Code:
for i in *.mts; do ffmpeg -y -i "$i" -f avi -vcodec mpeg4 -b 8000000 -acodec ac3 -ab 128000 -s 1280x720 $i.avi; done
which processes every file in the directory.
But the problem now is for an input file "00017.mts" the output is "00017
.mts.avi".
Is there a way to get rid of the ".mts" in the output file name?