Created
October 5, 2018 22:29
-
-
Save brimston3/34dbb439442a723313b019b92931887b to your computer and use it in GitHub Desktop.
bpm-tools using ffmpeg
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
# bpm is from debian's bpm-tools package | |
# ffmpeg is from the usual places | |
# > bpmff "Rundfunk-Tanzorchester Ehrenfeld - Daft Punk - 'Harder, Better, Faster, Stronger'-B3gG03bh7WA.mp4" | |
# 123.181 | |
bpmff() { | |
if [ ! -f "$1" ]; then | |
echo "File not found" | |
else | |
ffmpeg -vn -i "$1" -ar 44100 -ac 1 -f f32le pipe:1 2>/dev/null | bpm | |
fi | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Thanks for this! I added a thanks here in my README; now my LEDs pulse in time to the music :-)