others/ffplayer.sh

14 lines
567 B
Bash
Executable File

#!/bin/sh
## play music with ffplay and some visual arrangement ##
# ffplayer.sh by @root.informatica.
. $HOME/.config/wms/wms_var
# music dir.
DIR=$1
# use fzfmenu.sh and do some magic.
for f in $(find $DIR -type f | grep -E ".flac|.mp3|.opus|.wav|.webm" | fzfmenu.sh); do
title=$(basename "$f"); ffplay -autoexit lavfi "amovie="$f",asplit [a][out1];[a]showwaves=size=600x200:mode=cline:colors=#$AC:r=50,drawtext=text="$title - %{pts\:hms}":box=1:boxborderw=5:x=(w-text_w)/2:y=h-(text_h*2):boxcolor=black@0.4:fontsize=18:font=Hack:fontcolor=#$IC[out0]"
done