All Projects → NISH1001 → Playx

NISH1001 / Playx

Licence: mit
Search and play any song from terminal

Programming Languages

python
139335 projects - #7 most used programming language

Projects that are alternatives of or similar to Playx

Javascriptmusic
Live coding music and synthesis in Javascript / AssemblyScript (WebAssembly)
Stars: ✭ 193 (-0.52%)
Mutual labels:  audio, music
Mirdata
Python library to work with Music Information Retrieval datasets
Stars: ✭ 170 (-12.37%)
Mutual labels:  audio, music
Datmusic Api
Alternative for VK Audio API
Stars: ✭ 160 (-17.53%)
Mutual labels:  audio, music
Muspy
A toolkit for symbolic music generation
Stars: ✭ 151 (-22.16%)
Mutual labels:  audio, music
Youtag
iOS music player app that downloads music from the internet, even YouTube
Stars: ✭ 193 (-0.52%)
Mutual labels:  audio, music
Audioowl
Fast and simple music and audio analysis using RNN in Python 🕵️‍♀️ 🥁
Stars: ✭ 151 (-22.16%)
Mutual labels:  audio, music
Supriya
A Python API for SuperCollider
Stars: ✭ 167 (-13.92%)
Mutual labels:  audio, music
Airsonic
📡 ☁️ 🎶Airsonic, a Free and Open Source community driven media server (fork of Subsonic and Libresonic)
Stars: ✭ 1,876 (+867.01%)
Mutual labels:  audio, music
Aubio
a library for audio and music analysis
Stars: ✭ 2,601 (+1240.72%)
Mutual labels:  audio, music
Awesome Deep Learning Music
List of articles related to deep learning applied to music
Stars: ✭ 2,195 (+1031.44%)
Mutual labels:  audio, music
Supysonic
Supysonic is a Python implementation of the Subsonic server API.
Stars: ✭ 187 (-3.61%)
Mutual labels:  audio, music
Mixxx
Mixxx is Free DJ software that gives you everything you need to perform live mixes.
Stars: ✭ 2,510 (+1193.81%)
Mutual labels:  audio, music
Essentia
C++ library for audio and music analysis, description and synthesis, including Python bindings
Stars: ✭ 1,985 (+923.2%)
Mutual labels:  audio, music
Ni Media
NI Media is a C++ library for reading and writing audio streams.
Stars: ✭ 158 (-18.56%)
Mutual labels:  audio, music
Musicplayer
A minimal music player built on electron.
Stars: ✭ 145 (-25.26%)
Mutual labels:  audio, music
Torch Audiomentations
Fast audio data augmentation in PyTorch. Inspired by audiomentations. Useful for deep learning.
Stars: ✭ 164 (-15.46%)
Mutual labels:  audio, music
Amplipi
Whole House Audio System 🔊
Stars: ✭ 125 (-35.57%)
Mutual labels:  audio, music
Yt Audio
A simple, configurable youtube-dl wrapper to download and manage youtube audio
Stars: ✭ 132 (-31.96%)
Mutual labels:  audio, music
Tonejs Instruments
A small instrument sample library with quick-loader for tone.js
Stars: ✭ 172 (-11.34%)
Mutual labels:  audio, music
Zen Audio Player.github.io
Listen to YouTube videos, without the distracting visuals.
Stars: ✭ 180 (-7.22%)
Mutual labels:  audio, music

Search and play any song from terminal.

Philosophy   |   Requirements   |   Installation   |   Features   |   Usage   |   Example   |   Contribution   |   To-DO   |   Acknowledgements

playx in action

Philosophy

Play any songs that come in your mind.

Hoping to make it an awesome music assistant


Installation

  • For Arch Linux users, it is available in AUR with the name playx.

  • For others, it can be installed manually.

    Make sure all the dependencies are installed.

    Run the following command in the root directory to install playx.

    pip install -e .
    

    Or install using setup.py as:

    python setup.py install
    

    This method is the recommended one.


Requirements/Dependencies

  1. Python3.x

  2. pip3

  3. MPV

  1. Chromium

Note: These dependencies in linux can be installed in other variants.
For arch linux, you can use pacman package manager accordingly. Numpy is used for Markov-Chain based playlist.


Releases

These releases are almost stable.


Features

  • play by query
  • play by youtube url
  • play a youtube playlist
  • play a billboard chart
  • play a spotify playlist
  • play from soundcloud playlist
  • play from JioSaavn playlist
  • play from gaana playlist.
  • play from local playlist
  • play from Youtube Music playlist
  • cache support
  • CLI using mpv
  • auto generate playlist

Usage

For now, the application is in development phase.

usage: playx [-h] [-rsearch [RSEARCH [RSEARCH ...]]] [-p] [-n] [-a] [-d] [-r] [-k] [-c] [--sync-pl PLAYLIST] [-l] [--shuffle] [--repeat [NUMBER]] [--pl-start START] [--pl-end END]
             [--level LEVEL] [--disable-file] [--list-level]
             [song [song ...]]

playx - Search and play any song that comes to your mind. If you have any issues, raise an issue in the github (https://github.com/NISH1001/playx) page

positional arguments:
  song                  Name or youtube link of song to download

optional arguments:
  -h, --help            show this help message and exit
  -rsearch [RSEARCH [RSEARCH ...]], --rsearch [RSEARCH [RSEARCH ...]]
                        Play based on terms provided
  -p, --play-cache      Play all songs from the cache. The cache is located at [~/.playx/songs/] by default
  -n, --no-cache        Don't download the song for later use.
  -a, --auto            Auto generate playlist
  -d, --skip-cached     Don't search the song in the cache.
  -r, --no-related      Disable playing related songs extracted from YouTube
  -k, --disable-kw      Disable addition of keywords while searching the song on YouTube.
  -c, --clean           Clean(fix) broken references
  --sync-pl PLAYLIST    Sync the playlists. Pass the name as argument. If all the playlists are to be synced, just pass [All].
  -l, --lyrics          Show lyircs of the song.
  --shuffle             Shuffle the playlist in case it is one, else the option will have no effect.
  --repeat [NUMBER]     Put the passed entity on repeat , be it a playlist or a song. If an arg is not passed, infinite loop is considered. (default = Infinite)
  --pl-start START      Start position in case a playlist is passed. If passed without a playlist it has no effect.
  --pl-end END          End position in case a playlist is passed. If passed without a playlist it has no effect.

Logger:
  --level LEVEL         The level of the logger that will be used while verbosing. Use `--list-level` to check available options.
  --disable-file        Disable logging to files
  --list-level          List all the available logger levels.

Example

Play by song name

playx <song name>

Play by youtube link

playx <YT url>

Play by soundcloud links

playx https://api.soundcloud.com/tracks/232673157

This plays soundcloud track

Play from youtube playlist

playx <YT playlist URL>

Play from a Billboard Chart

playx hot-100

Play from spotify playlist

playx https://open.spotify.com/playlist/37i9dQZF1DX5Ozry5U6G0d

This plays the songs from Spotify Summer Party playlist.

Play from soundcloud playlist

playx https://soundcloud.com/devintracy/sets/goodafternoon

This plays the songs from SoundCloud playlist

Play from JioSaavn playlist

playx https://www.jiosaavn.com/featured/magical-amit-trivedi/IGYxX3V4T7w_

This plays songs from the JioSaavn playlist

Play from YouTube Music Playlist

playx <YT Music playlist url>

Play from local playlist

The local playlist should have an extension .playx in order for us to recognize it as a playlist.

playx example.playx

This plays a playlist named example.playx

For a playlist every line is considered an entry. Refer to example.playx.

Auto-Generate Playlist

playx --auto

This will automatically generate a playlist by using the frequency of songs played that has been logged in the log file.

Term-Based Search

playx --rsearch <search terms>

This will automatically generate a playlist of cached songs containing the provided terms.


Cache Directory Structure

By default, playx creates a directory in the home as ~/.playx (which is a hidden folder). Structure is like:

.playx
    |- songs/
    |- logs/
    |- playlist/
    |- playxlist/

songs: This stores all the songs logs: This stores the log for user activities of songs that are searched and played with creation date. This will be used for recommendation of songs in future version playlist: This stores all the cached playlists files. playxlist: Stores all the playxlist files.


Having Issues? (We're not perfect!)

First update youtube-dl

youtube-dl is the core through which we fetch stream urls for any song or any YT playlist.
So, update it first

pip install -U youtube-dl

youtube-dl keeps on rolling out updates actively because the YouTube keeps on updating its internals for html. So, the parser/crawler should be updated periodically.

Second try cleaning the broken cache as

playx --clean

Chances are you have a url in the urls.json but the local mp3 might not exist in ~/.playx/songs/. So, cleaning and running the playx might mitigate that.

See The Partial Log

Log is found at logs/partial_log

See Playlist File

Files can be found inside playlist/. Chances are there might be empty links or names.

Selenium Web Driver Issue

Maybe you don't have the chromedriver that's required to crawl.
One example of how we use chromedriver is here.

Not having proper setup of the driver may result in empty playlists, especially related playlist one.

Please Create An Issue In GitHub here


Contributions

Contributions are warmly welcome. Please do go through CONTRIBUTING.


Module-level Dependency Graph

This is generated using pydeps. The codebase is kinda messy, isn't it? :D


TO-DO

  • caching of downloaded songs (if the song exists locally, play it right away else play from youtube)
  • speed up the whole search->download->convert->play process
  • stream/play while downloading the song
  • play all the songs from the cache
  • search lyrics
  • play from youtube playlist
  • play from local playlist (may be a list of song names)
  • play from other playlist (spotify, billboard, etc.)
  • log activity
  • auto generate playlist
  • use Markov Chains to improve auto-playlist
  • local search based on term matching
  • use Factorization Machines to improve auto-playlist
  • use logs to create simple recommendations
  • Add 3rd-party integration like Spotify (using authentication mechanism). [Priority - Low]

Acknowledgements

  • Thanks to Deepjyoti Barman for doing all the major contributions (parallelizing streaming + downloads , playlist, logger)
  • Thanks to Mirza Zulfan for logo for playx. It's neat (and cool)
  • Thanks to Mattwmaster58 for creating packaging structure with setup file
  • A good blog by Deepjyoti about copyright infringement and licensing issues we encountered for playx can be found here.
Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].