mpv shuffle

Short one

mpv --shuffle *
# < = prev
# > = next

Long one

mpv --no-config --no-video --no-resume-playback --no-ytdl --af=lavfi=[loudnorm=LRA=10:I=-17] --shuffle *
# alias rndPlay='mpv --no-config --no-video --no-resume-playback --no-ytdl --af=lavfi=[loudnorm=LRA=10:I=-17] --shuffle *'

How about video window to be used for some audio visualizations
Absosmurfly nothing works, but the provided example.

Extremly smart version by ‘glacial’, usable if there was no –shuffle in specific utility

# this script is a wrapper around mpv

# this script requires GNU find with -regextype option
# and support of egrep regular expressions
find . -maxdepth 0 -regextype egrep -iregex x || exit

# this script requires GNU shuf with -z option
printf '' | shuf -z || exit

shuffle_audio() {
    find -regextype egrep \
         -iregex '.*\.(mp3|m4a|flac|mpc|ogg|opus)' \
         -print0 | shuf -z

while IFS= read -r -d '' filename; do
done < <(shuffle_audio)

if [[ ${#media[@]} == 0 ]]; then
    echo "no audio files found" >&2

# typical usage of exec in a wrapper script
exec mpv --no-config --no-video --no-resume-playback \
     --no-ytdl --af='lavfi=[loudnorm=LRA=10:I=-17]' \
     -- "${media[@]}"
about / github / jekyll

Support this neat blog by sending some doge to this dogecoin deposit address (minimum is 10 doge): D7hVsZVDVEqrLUEmkQF84FZRjZEKDmr5oL