Created
January 30, 2025 22:00
-
-
Save kane-thornwyrd/86a95e823593af3ee33a03168e522242 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env bash | |
readarray -t ts | |
path=$1 | |
fn=${1##*/} | |
dir=${path%$fn} | |
name=${fn%.*} | |
ext=${fn#$name} | |
for ((i=1; i<${#ts[@]}; i++)); do | |
printf -v part '%02d' "$i" | |
echo ffmpeg -ss "${ts[i-1]}" -to "${ts[i]}" -i "$path" "$dir$name-$part$ext" | |
done |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment