1 changed files with 12 additions and 0 deletions
@ -0,0 +1,12 @@ |
|||||
|
#!/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 |
Loading…
Reference in new issue