Skip to content

satvikvirmani/musicfp

Folders and files

NameName
Last commit message
Last commit date

Latest commit

ย 

History

11 Commits
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 

Repository files navigation

๐ŸŽต musicfp

A sleek, terminal-based media player built for programmers who love their command line.

Python Version License: MIT Development Status


๐ŸŽฏ What is musicfp?

musicfp (music for programmers) is a powerful yet minimalist media player that lives entirely in your terminal. No GUI bloat, no unnecessary featuresโ€”just pure, efficient audio playback controlled by simple commands. Perfect for developers who want to stay in the terminal while enjoying their favorite music.

โœจ Features

  • ๐ŸŽผ Dual Playback Modes - Play single files or entire directories
  • ๐Ÿ”€ Shuffle Support - Randomize your playlist with a simple flag
  • ๐ŸŽš๏ธ Real-time Volume Control - Adjust volume on the fly
  • โฏ๏ธ Complete Playback Controls - Pause, skip, next, previous, and more
  • ๐Ÿงต Multi-threaded Architecture - Responsive controls that don't block playback
  • ๐Ÿ“Š Metadata Display - See song and album information for single files
  • ๐ŸŽญ Wide Format Support - Supports MP3, FLAC, M4A, MP4, WAV, WMA, AAC, and MKV
  • ๐Ÿ’ป Terminal-native - Stay productive without leaving your workflow

๐Ÿš€ Installation

Using pip (Recommended)

pip install musicfp

From Source

git clone https://github.com/SatvikVirmani/musicfp.git
cd musicfp
pip install -e .

Requirements

  • Python 3.0 or higher
  • python-vlc library (automatically installed)

๐Ÿ“– Usage

Basic Commands

# Play a single audio file
musicfp /path/to/song.mp3

# Play all songs in a directory
musicfp /path/to/music/folder

# Play with shuffle enabled
musicfp /path/to/music/folder --shuffle
# or
musicfp /path/to/music/folder -s

# Play all songs in current directory
musicfp current

In-Player Commands

When Playing a Single File

Command Description
skip Skip the current song
pause Pause playback
resume Resume playback
repeat Restart the current song
vol<number> Set volume (e.g., vol75 for 75%)
quit Exit the player
help Show available commands

When Playing Multiple Files (Directory)

Command Description
pause Pause/resume playback
next Play next song
previous Play previous song
vol<number> Set volume (e.g., vol50 for 50%)
quit Exit the player
help Show available commands

๐ŸŽฎ Examples

Example 1: Playing a Single Song

$ musicfp ~/Music/favorite-song.mp3
Playing "Favorite Song" from "Best Album"
>>  vol80
Volume set to 80%
>>  pause
Paused
>>  resume
Resumed
>>  quit

Example 2: Playing a Directory with Shuffle

$ musicfp ~/Music/Playlist --shuffle
Playing all songs from directory: /home/user/Music/Playlist with shuffle ON
>>  next
>>  vol60
Volume set to 60%
>>  quit

Example 3: Quick Play from Current Directory

$ cd ~/Music/WorkoutMix
$ musicfp current -s
Playing all songs from directory: /home/user/Music/WorkoutMix with shuffle ON
>>  

๐ŸŽจ Supported Formats

musicfp supports a wide range of audio and video formats:

  • Audio: MP3, FLAC, M4A, WAV, WMA, AAC
  • Video: MP4, MKV (audio extraction)

๐Ÿ—๏ธ Project Structure

musicfp/
โ”œโ”€โ”€ LICENSE                 # MIT License
โ”œโ”€โ”€ pyproject.toml         # Build configuration
โ”œโ”€โ”€ setup.py               # Package setup
โ”œโ”€โ”€ README.md              # This file
โ””โ”€โ”€ src/
    โ””โ”€โ”€ musicfp/
        โ”œโ”€โ”€ __init__.py    # Package initializer
        โ””โ”€โ”€ __main__.py    # Main application logic

๐Ÿ”ง How It Works

musicfp uses a multi-threaded architecture to provide responsive controls:

  1. Playback Thread - Handles media loading and playback using VLC
  2. Input Thread - Listens for user commands without blocking playback

The application leverages python-vlc, Python bindings for the powerful VLC media player, ensuring robust and reliable playback across all supported formats.


๐Ÿ‘จโ€๐Ÿ’ป About the Author

Satvik Virmani


๐Ÿ› Bug Reports & Feature Requests

Found a bug or have an idea for a new feature?

  • Report issues: GitHub Issues
  • Contribute: Pull requests are welcome!

๐Ÿ“„ License

This project is licensed under the MIT License - see the LICENSE file for details.

Copyright (c) 2018 The Python Packaging Authority

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.

๐ŸŒŸ Show Your Support

If you find musicfp useful, please consider:

  • โญ Starring the repository
  • ๐Ÿฆ Sharing it with fellow developers
  • ๐Ÿด Forking and contributing improvements

๐Ÿ’ก Why musicfp?

As developers, we spend countless hours in the terminal. Why switch contexts just to control music? musicfp keeps you in your flow state, letting you control your soundtrack with the same efficiency you bring to your code.

Stay in the terminal. Stay productive. Stay in the zone.


Made with โค๏ธ by Satvik Virmani

โฌ† back to top