Use the below command to add the .mp3 files in a giving directory to your playlist for mplayer. Or add complete path of your music files in myplaylist.txt (one per line).
$ find [/path/to/directory/] -name “*.mp3″ -print > myplaylist.txt
Now use the mplayer command with a -playlist extension to play the music files.
$ mplayer -playlist myplaylist.txt
Enjoy the music !!!