Search This Blog

Showing posts with label Raspberry Pi. Show all posts
Showing posts with label Raspberry Pi. Show all posts

Thursday, February 18, 2016

How to play all mp3 music files in a folder on Raspberry Pi

omxplayer can only play 1 mp3 files a time.
To loop through all files in a folder, I create a shell script : /usr/local/bin/playmp3.sh


#!/bin/bash

for f in *.mp3
do
echo "Playing $f file..."
omxplayer "$f"
done



Go to the folder has mp3 files, run playmp3.sh.

That's it.