Optimize images and videos inside folders and subfolders
This is a simple script that can optimize images and videos (reduce size) for whatever reason you'd like to do so.
I used pillow and ffmpeg, so you have to install both.
For ffmpeg, you'll have to change the ffmpeg path according to your system platform in the "ffmpeg_command" function.