A terminal-based music player in Python that can play local songs, YouTube songs, and manage playlists. Built using curses for UI and vlc for audio playback.
- Browse and play local songs from the
songsfolder - Search and play songs from YouTube
- Create, view, and play playlists (sequential or shuffled)
- Real-time progress bar and playback controls
- Preloads next songs for smoother playback
The program relies on VLC for audio playback.
-
Windows:
Install VLC from here.
(You can download the .exe file for the 3.0.21 version from the prerequisites folder) -
Linux:
Install VLC using your package manager. For example:sudo apt install vlc
Install the required Python libraries using pip:
pip install curses
pip install python-vlc
pip install yt-dlp
pip install requestsNote: For Windows, you need to run the command pip install windows-curses instead of pip install curses.
- Clone or download this repository.
- Ensure VLC is installed.
- Make sure to have the folder named
songsand add your local audio files (e.g.,.mp3,.wav).
Run the program using:
python main.pyYou’ll see a terminal menu with options:
- Folder: Browse and play local songs
- Playlist: View, add, or play songs from your playlist
- Web Search: Search YouTube and play songs
- Exit: Quit the program
- P: Pause / Resume
- R: Restart current song
- Q: Quit player
- N: Next song (in playlist mode)
- B: Previous song (in playlist mode)