Put this in your /usr/local/bin folder and make it executable with chmod +x <filename>. Run it from your video folder. Your video files will not be overwritten. New files are saved to ./converted; to use them, you must move or copy one level up to replace the original files. Repeat for each system.
You may need to install ffmpeg first with sudo apt update && sudo apt install ffmpeg.#! /bin/bash # Script provided by Clyde mkdir -p converted # create the folder "converted" if it doesn't exist for f in *.mp4 # process all videos in the current directory do echo "$(pwd)/$f" # show the processed file's name c=$(ffprobe "$f" 2>&1 | grep -c yuv444p) # (-c)ount no. of "444p" if [ "$c" -gt 0 ] # if 444p is present, then # convert to 420p ffmpeg -i "$f" -y -pix_fmt yuv420p -strict experimental converted/"$f" fi done