Intel® Makers
Intel® Edison, Intel® Joule™, Intel® Curie™, Intel® Galileo
Announcements
Welcome - This is a Peer-to-Peer Forum only. Intel has discontinued these products but you may find support from other customers on this Forum
9880 Discussions

how to play mp3 in python on intel edison

KNguy20
Novice
1,042 Views

Hi all,

Are there any ways to play mp3 in python on intel edison

I try pyglet but don't know to install AVbin on intel edison

would you mind helping me

thank you and regards,

Khoa

0 Kudos
1 Solution
idata
Community Manager
162 Views

Hi Khoa,

We tried to install AVbin on the Intel Edison and we could not do it, but we found another way to play mp3 files using the mpg123 library, this library is in AlexT repo so you can use opkg to download it (http://alextgalileo.altervista.org/edison-package-repo-configuration-instructions.html http://alextgalileo.altervista.org/edison-package-repo-configuration-instructions.html), after you updated the opkg you can install mpg123 using the command: opkg install mpg123.

Once you have mpg123 you can play any mp3 file with the following command: mpg123 filename.mp3.

If you want to do this process in Python just create a .py file and use the next lines:

import os

 

os.system("mpg123 filename.mp3")

I hope this works for you,

Regards,

 

-Leonardo

View solution in original post

1 Reply
idata
Community Manager
163 Views

Hi Khoa,

We tried to install AVbin on the Intel Edison and we could not do it, but we found another way to play mp3 files using the mpg123 library, this library is in AlexT repo so you can use opkg to download it (http://alextgalileo.altervista.org/edison-package-repo-configuration-instructions.html http://alextgalileo.altervista.org/edison-package-repo-configuration-instructions.html), after you updated the opkg you can install mpg123 using the command: opkg install mpg123.

Once you have mpg123 you can play any mp3 file with the following command: mpg123 filename.mp3.

If you want to do this process in Python just create a .py file and use the next lines:

import os

 

os.system("mpg123 filename.mp3")

I hope this works for you,

Regards,

 

-Leonardo
Reply