for %i in (*) do ffmpeg -i "%i" -c:v libx264 -crf 23 -c:a copy "converted\%i.mp4"
Install ffmpeg and adding its path to the Path environment variable.
Put the above line in a batch file. Make a folder somewhere and put all you files to convert in to and the batch file.
Make a subfolder in that folder called "converted".
Open a DOS window and CD to the directory with the batch file in it and run the batch file. It will go through all the videos and convert them to the output folder.
You may need to rename the converted files as they will retain the ".avi" part of the filename. The Bulkrename tool will be useful to do this.
The crf value determines the level of compression. 23 is the default. Higher numbers result in more compression, lower less compression. 18 is considered effectively lossless.
-c:a copy copies the audio from the input stream to the output unmolested. So maybe test and see if the video has sound when played on a Mac or whatever iThings is on. If there is no sound then you'll have to experiment with a sound codec such as c:a aac -b:a 128k where 128k is the desired bitrate. Hgher obviousy better quality. aac is the audio codec whci should work with most players.
If you have an Nvidia graphics card you can try replacing libx264 with h264_nvenc and it will use the GPU to encode. You will have to remove the "-crf 23" part however and setting the compression level with the nvenc encoder is not as straightforward, it will just use a default which should still compress HD video quote well.
Really, once you have decided what parameters to tweak in that one line of code, you should be able to just bang your videos in the folder and let it go. So do a few test runs first.
I researched all this as I wanted a fire and forget way of batch converting videos with minimal phaff.