So, the case is as follows:
I have about 15 videos files that were recorded at 4K and are very large in size. I wanted to keep everything as is, but just reduce the resolution to HD (720p).
ffmpeg would be great to achieve this, so I created the following script:
for i in *.MP4; do name=`echo $i | cut -d'.' -f1`; echo $name; ffmpeg -i $i -s 1280x720 -c:a copy $name.mp4.mp4; done
This loops them one-by-one and calls ffmpeg to process them and create an output file with the same name, but with extension .mp4.mp4 (just to distinguish them, nothing more).
That’s it! Enjoy!