Is there an easy way to play an MP3 song automatically, and/or loop/or have it play through a series of songs in a folder? I am trying to do this on a Zero and am stuck. I have a Phat Dac connected to it that works brilliantly with lineout speakers.

Basically, I just want to turn on and have white noise machine without doing anything else.

It will play a wav file in the terminal but not loop or go through a folder.


Yes, use a shell script, that triggers your favorite mp3 wav player via command line.., you can customize a script file to do all sorts of nifty commands like cycle through all tracks.. and have that script load up in an rc.local file to trigger at startup.

Lots of ways you can do this, I'm sure you might be able to load a gui based player via command line with a playlist file of tracks or one track, and pass it parameters like volume, file, repeat all etc

You will need to find a good player to suit your needs and do a little research on scripting if you go that route.

I find the nifty Node-Red flowchart based programming IDE can open a wide world of awesome possibilities with interactive fun stuff, and makes programming things like that a little simpler, but might be Overkill for a simple scripts task.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.