13 lines
383 B
Bash
Executable File
13 lines
383 B
Bash
Executable File
#!/bin/zsh
|
|
|
|
echo "Finding mp3s that are under a minute long"
|
|
find . -name '*.mp3' -print0 |
|
|
while IFS= read -r -d '' track; do
|
|
duration=$(ffmpeg -i $track 2>&1 | grep -oE "[0-9]{1}:[0-9]{2}:[0-9]{2}")
|
|
if [[ $duration == 0:00* ]] && [[ $track != *"intro"* ]] && [[ $track != *"outro"* ]]
|
|
then
|
|
echo $track >> 60secOptions.m3u
|
|
echo $duration
|
|
fi;
|
|
done
|