MP3 Player with Tkinter and Pygame in Python
This is created for fun. Also because all the .mp3 players I have has the same issue, high CPU and RAM usage.
So I decided to create my own so that I can listen to music while I'm gaming without lag
P.S: I'm not professional with Tkinter / Pygame. And I'm bad at UI designing :P
Outdated images, will be updated soon
Create a .env
file and put the path to the .mp3
files directory into it. Like this:
MP3_FOLDER_PATH=THE_PATH/TO/THE/MP3_FILES/DIRECTORY
THEME_JSON_FILE_NAME=default.json
See requirements.txt
Actually just run python main.py
will do the job
I added .bat
file for quick restart which is for debugging and developing
- Lists all
.mp3
files found in given directory - Supports scrolling
- Double click to play selected song
- Right click to refresh song list
- From 0 ~ 100
- Located in the right bottom corner
- Click to play previous / next song
- Pause / resume playing
- You can enable / disable looping anytime you want
- Located in the middle (bottom)
- You can drag it to control time position
- Displays current time position & song length
- Only support
.lrc
file - Only
offset
meta data is supported (Both + / - in ms) .lrc
file name has to be the same as the.mp3
file and in the same directory as the.mp3
file doesThe time might not be very accurate sinceround()
is being used in parsing- Examples here
- Click to select and play a random song from song list
Themes were added in this update, you can also create your own theme. Copy the default.json
(It's basically a template) located in themes
and rename it, edit the color values inside it and change the value of THEME_JSON_FILE_NAME
in .env
file.
To apply the updated colors, simply restart the player will do the job.
I tried this editor and it's easy to use and works like a charm
- Add time control (Time slider?)
- Add more comment for the codes (Added in current version)
- Rework with better and clearer code (Moved old codes into
v1
dir) - Lyrics display (.lrc file) with status bar
-
Add lyrics display (Maybe LRC File? 維基 / wiki) - Random song button
- Play next song automatically after the current one ends
- Press
M
to mute / unmute
- Might unable to load some .mp3 files (Due to encoding issue?)
- See Issues