andycoleman
Posts: 4
Joined: Thu May 16, 2013 7:03 am

Software required for playing sound files

Thu May 16, 2013 7:21 am

Hi,

I have a little project in mind and I am not realy sure yet where this is going so my requirements are not fully thought out. I am looking for a music player which I can give a music file (mp3 or some other more open format) and it will play the music fle. I do not need the GUI part of the music player as that is what I am intending to build myself. Ultimately I am looking to build my own GUI which will allow me to select music files to play but the first step would be to just pass it a file to play from a script and build up from there.

I am looking to use this as a way to get up to speed with either Python or Ruby so I would need something which is easy to control from these languages.

Initially I will be happy with feeding the sound out via the headphone socket but should I be looking at getting a USB external DAC and send the sound through to my amp?

Thanks in advance
Andy

User avatar
DaveDriesen
Posts: 113
Joined: Sun Mar 31, 2013 8:28 pm
Location: Top of the food chain
Contact: Website

Re: Software required for playing sound files

Thu May 16, 2013 8:22 am

You can use mpeg123 or mpeg321 for this but if you're building your own app then I would recommend leveraging libmad (through pymad if you go for python).

For Raspbian, respectively:

Code: Select all

# use elevated privileges for these commands, or sudo them
# To install mpg123
apt-get install mpg123

# To install mpg321:
apt-get install mpg123

# To install python libmad bindings:
apt-get install python-pymad
Links:
mpg123 - Fast console MPEG Audio Player and decoder library
mpg321, a simple and lightweight command line MP3 player
pymad -- Python bindings to libmad
MAD (MPEG Audio Decoder)

Dave Driesen
Linux dev and oldskool elite

andycoleman
Posts: 4
Joined: Thu May 16, 2013 7:03 am

Re: Software required for playing sound files

Thu May 16, 2013 8:45 am

Dave,

Thanks very much.

Andy

Return to “General discussion”