Basically this script allows you to select a file and saves a version with a lowered bitrate so that it's under 25 megabytes. Currently you run it with
./compressor.py
You can get it here: https://ffmpeg.org/
and also obviously you need to install Python
Tkinter is a GUI (graphical user interface) toolkit. I'm using it to open a window to select your file and another to select the save directory.
In the future, I could also utilize it to give this script a graphical interface for choosing the files, for selecting the desired filesize and maybe even other things I haven't considered.
ffmpeg-python is a python wrapper for ffmpeg, basically allowing you to execute ffmpeg commands with Python code. This is useful because I don't know much about ffmpeg but I do know something about Python.
- Figure out if I'm being optimal in my filesize reduction (probably not) and how to improve it
- Use tkinter for a GUI
- Add options for
- desired filesize
- desired codecs?
- desired filename
- probably something else idk
- Add options for
- One time, it made a video over 25mb. I'm not sure why, I figured it's either overhead (things beyond just the video and audio bitrates) or some quirk that was making it save to a different (slightly higher) bitrate than the one the script chose.
- Current workaround is to reduce the target bitrate by 5% and hope it doesn't happen again lol. If it doesn't work I'll find a better way