Browse Source

first version of durationfinder for PMR radio

main
crunk 1 year ago
parent
commit
7550e76a27
  1. 12
      durationfinder

12
durationfinder

@ -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…
Cancel
Save