A simple interface for playing music from an MP3 file.
Project description
Allows your Windows Python program to play and stop MP3s, without opening an external player or requiring any external programs. A very simple interface for the common case (playing an entire MP3), with an API for more complex tasks (e.g. playing from seconds 30 to 45 of an MP3).
Note: if you are looking for complex cross-platform audio control, try pyglet. After easy_installing pyglet, it requires a separate manual installation of AVlib libraries, which is why I wrote mp3play as an easy_installable alternative.
Example
Play the first 30 seconds of a file:
import mp3play filename = r'C:\Documents and Settings\Michael\Desktop\music.mp3' clip = mp3play.load(filename) clip.play() import time time.sleep(min(30, clip.seconds())) clip.stop()
Requirements
Requires Windows XP at the moment, but the goal is to make a cross-platform module. Feel free to send patches to add Linux and Mac support!
Resources
Homepage: http://mp3play.googlecode.com/
Source:
Browse at http://code.google.com/p/mp3play/source/browse/trunk/
Get with svn co http://mp3play.googlecode.com/svn/trunk/ mp3play-read-only
Please let me know if you like or use this module - it would make my day!
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distributions
File details
Details for the file mp3play-0.1.10.zip
.
File metadata
- Download URL: mp3play-0.1.10.zip
- Upload date:
- Size: 9.9 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 55054f1431ff1322761e53c3afa96d233b391ee86a2bd6a7e4492e581cec106a |
|
MD5 | cd8377b949222b3d577169fca8cfb6a4 |
|
BLAKE2b-256 | bf47d35995333b3033af3211d39459417210522e3797575869ceb0a88fbe464d |
File details
Details for the file mp3play-0.1.10-py2.5.egg
.
File metadata
- Download URL: mp3play-0.1.10-py2.5.egg
- Upload date:
- Size: 6.3 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | b3b884c598147249ffdb834fe34980971b885b83aa4572ba3b17b860016e1c3c |
|
MD5 | 3aad15cbb9d2cae22374fecae2152755 |
|
BLAKE2b-256 | db14e874beb0ed812d061c56e287a00a946952b9e804d4650664157c4f7947cc |
File details
Details for the file mp3play-0.1.10-py2.4.egg
.
File metadata
- Download URL: mp3play-0.1.10-py2.4.egg
- Upload date:
- Size: 3.5 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 0fb2ec13882532de248dc288470f473d0eda1fa4a6a17f0956cc321d3860bcc2 |
|
MD5 | ba25c0366a6862b1efc53b4bdf69825c |
|
BLAKE2b-256 | 1773d5f4452633efee24ad8993d6120158153fd95a54ba9ede08f997433093eb |