trimsec
Calculate saved time on using media speed multipliers, with speed.
https://github.com/user-attachments/assets/64fd80fe-2fca-4281-89c5-ff89f44aae44
Overview
trimsec provides an easy way to accurately estimate how much time you save on watching videos when using speed multipliers. This is essentially helpful when watching recorded classes or documentaries online, in case you do not have enough time to spare based on your situation.
Since I am also a student and both coordinating between my routine, as well as manually doing the math required to estimate my overall hours for study wasn't an option I'd consider - I chose to program a tool that would automate the process for me.
Usage
As shown in the demo above, you can use trimsec by running the following command:
Here, <speed> is the speed multiplier you are using, and <duration> is the
duration of the video you are watching. For example, if you are watching a 1-hour
video at 2x speed, you can run the following command:
This will output the time you saved by watching the video at 2x speed. You can also combine multiple duration indicators and float-point speed multipliers. For example,
[!NOTE] Please read Caveats for more information on the supported formats.
Installation
If you have Rust and Cargo
installed, you can install trimsec by running the following command:
Manual Installation
If you do not have Rust and Cargo installed, you can clone this repository and build the binary manually:
# clone the repository
# output: target/release/trimsec
After building the binary, move the binary to a directory which is registered in
the $PATH environment variable. Here's an example with the ~/.local/bin/
directory on macOS:
# (optional) this code appends the binary path to the PATH environment variable
# now you can run the binary from anywhere
Caveats
- While specifying the duration, you must use any combination of the following formats:
<days>dfor days<hours>hfor hours<minutes>mfor minutes<seconds>sfor seconds
- The speed multiplier must be a float-point number, and can suffixed with
x, such as:1.5xindicates 1.5 times the original speed- But,
1.5is also valid and indicates the same speed multiplier
License
This project is licensed under the MIT License.